Results 1 to 3 of 3

Thread: Bitmaps on menu items

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    56

    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

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    56

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    56

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width