-
Hi, I need to redraw a menu that's dynamically generated. Because the entire menu is created at run-time, it disappears if it's not redrawn periodically. I'm subclassing so I can redraw it if I know what message is sent when the menu is deleted. Anyone know the window message or constant that's generated when the menubar is killed??
p.s. I tried WM_Paint - it's not always fired.
Thanks in advance,
Wade
-
When I need to do this I just subclass and print all the messages to debug, then try to cause the message (ie by deleting a menu) and see what I get.
-
Sam!
The term "subclassing" is new to me. What does it mean?
-
If I print all the messages to debug, I've got a tremendous amount of messages to sift through. Because so many are generated so quickly, it's hard for me to decipher which is the right message.
Anyone know which message is generated when a menu is deleted or redrawn?
Thanks,
Wade
-
I believe it is WM_NCPAINT.
-
Thanks. I found &H105A in an example and this works. Couldn't find it in the Win32api list that comes with vb, but it works.
-
As all messages over &H0400& are in the WM_USER range (i.e. application-defined), I'd love to see that example.
Incidentally, why are you drawing your own menu?
-
I need this b/c I'm bringing a parent form's menu down into its children forms.