-
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
-
..
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
-
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
-
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.