Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subclassing menus

Status
Not open for further replies.

davidrobin

Programmer
Aug 17, 2000
50
0
0
GB
I am wanting to write an app that has custom menus. This has lead me to learn about subclassing. I have managed to subclass a the form so my custom WindProc function handles activation messages and changes the form caption.

Now I want to move on to redraw the menu I create at run-time with different fonts and background colours, icons etc.

Can anyone help especially by providing example code.

I have looked through MSDN and at but their damos are not explanatory enough.

Thanks. David
Visual Basic 6 Ent
 
When it comes to subclassing menus, my posts a couple a weeks ago might help (thread711-416853).
Icons in menus can be added using then SetMenuItemBitmaps or ModifyMenu (using the MF_BITMAP flag) function. I've done this before, but I can't seem to find any source code on my pc's. But there should be a lot about this topic on the web.

Fonts and background colors are normally handled by the system. You can change it (through code), but it will effect every menu in the os (including the start menu).
I'm not sure, but I think there's is still a possibility setting the MF_OWNERDRAW flag, and hooking for a WM_DRAWITEM message.

I aware that I'm not really providing any source code, but maybe it'll help finding it. If I come across any, I'll post it.

Remedy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top