View Single Post
Old 23 November 2021, 08:47   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,005
Normally you would maintain the flags of the MenuItem. The NewMenu array is only needed for the initial creation of the menu strip. After that you can throw it away.

Attached is a full example.

One challenge is to find the address of the item you want to manipulate in the menu strip. The example uses ItemAddress with a fixed menu number. In a more complex example I would rather write a function which traverses the menu strip and finds the item with the corresponding code in the user data field. This way I am independent of menu changes in later versions.
Attached Files
File Type: c gtmenu.c (4.1 KB, 60 views)
thomas is offline  
 
Page generated in 0.04451 seconds with 12 queries