-
Bitmaps on menu items
I'm completely confused.
I've used the getmenu etc api stuff to put some bitmaps onto my menus, but I cant figure out how to put a picture onto a sub menu, e.g.
File
Open
Etc
Send To >
3.5 Floppy <-- Pic on this item
My Docs
Exit
Any ideas would be appreciated. The rest of the menu is mapped up lovely.
Thanx in advance
Nick
-
Oops
That menu structures came out wrong
it should be
File
Open
etc
Send to >
............3.5 Floppy
............My docs
Close
if you get what I mean.
The send to is a sub menu inside a sub menu.
Sorry about that
-
Sorted
I just worked out how to do it.
Sorry but I thought i'd share it with the group.
Basically, follow the guide from vb-online.com
then add 1 extra line:
lngMenu = GetMenu(frmMain.hwnd)
lngSubMenu = GetSubMenu(lngMenu, 0)
lngSubSubMenu = GetSubMenu(lngSubMenu, 11)
lngMenuItemID = GetMenuItemID(lngSubSubMenu, 3)
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID, 0, frmMain.picMyDoc.Picture, frmMain.picMyDoc.Picture)
Just that 1 little blue line of code.
:)