|
-
May 17th, 2000, 05:00 AM
#1
Thread Starter
Hyperactive Member
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
-
May 17th, 2000, 05:22 AM
#2
Frenzied Member
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.
-
May 17th, 2000, 05:30 AM
#3
Fanatic Member
Sam!
The term "subclassing" is new to me. What does it mean?
Chemically Formulated As:
Dr. Nitro
-
May 17th, 2000, 08:42 PM
#4
Thread Starter
Hyperactive Member
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
-
May 17th, 2000, 11:00 PM
#5
Lively Member
I believe it is WM_NCPAINT.
- Steve
Real programmers use COPY CON PROGRAM.EXE
-
May 17th, 2000, 11:03 PM
#6
Thread Starter
Hyperactive Member
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.
-
May 18th, 2000, 12:45 AM
#7
Lively Member
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?
- Steve
Real programmers use COPY CON PROGRAM.EXE
-
May 18th, 2000, 12:49 AM
#8
Thread Starter
Hyperactive Member
I need this b/c I'm bringing a parent form's menu down into its children forms.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|