CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Draw a menu

  1. #1
    Join Date
    Oct 2005
    Posts
    5

    Draw a menu

    I do something like this but it doesn't show anything for me..

    bmp=LoadBitmap(hinstance,"IDM_BITMAP1");
    menu=CreateMenu();
    AppendMenu(menu,MF_BITMAP,IDM_BITMAP1,MAKEINTRESOURCE(IDB_BMAP1));
    SetMenu(winHand,menu);
    DrawMenu(winHand);

    I would like to use bitmap call IDM_BITMAP1 whose ID is IDB_BMAP1 as a menu but nothing seems to work out for me.
    Thanks in advance for any help
    Oldletter

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Draw a menu

    AppendMenu requires a handle to the bitmap as last parameter and not the ID of the bitmap resource.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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

Featured