View Single Post
Old 23 November 2021, 09:47   #2
Registered User
thomas's Avatar
Join Date: Jan 2002
Location: Germany
Posts: 6,463
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, 25 views)
thomas is online now  
Page generated in 0.07484 seconds with 12 queries