|
-
Sep 7th, 2001, 11:20 PM
#1
Thread Starter
Hyperactive Member
subclassing
i wanna write a class for my owner-drawn menus.. the problem is how could i get the class to get all the menus(and sub-menus) on the window, and then allow a function such as AttachMenus(HWND hwnd) to modify all of them to the way i want using other functions in teh class...how would i get all the menus to subclass at run time?
Thanks
Amon Ra
The Power of Learning.
-
Sep 7th, 2001, 11:27 PM
#2
Thread Starter
Hyperactive Member
..
basically i would wanna be able to have a varying number of menus, and change them rite when the program starts... if i dont wanna have a definite number of menus, i just call my AttachMenu function adn then it owner-draws all the menus in my prog without having me give the individual names..
Thanks
Amon Ra
The Power of Learning.
-
Sep 8th, 2001, 10:24 PM
#3
Thread Starter
Hyperactive Member
I dont want anyone to tell me how to do the whole thing(otherwise whats the point of learning??), but just to tell me how to have a function that would dynamically retrieve the names of all the menus and change them to owner-drawn.
that's all..thanks
Amon Ra
Amon Ra
The Power of Learning.
-
Sep 9th, 2001, 01:05 AM
#4
Probably use EnumWindows(), and EnumChildWindows(), and loop through all windows, check for a menu, if it exists, change the setting. Should work, although it is off the top of my head.
Z.
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
|