|
-
July 13th, 1999, 03:57 PM
#1
ImageList Manipulation
I am trying to obtain a handle to a bitmap in the imagelist and use that bitmap in the SetMenuItemBitmap method. The following snippet shows this:
IMAGEINFO iInfo;
CBitmap bmp;
iList.GetImageInfo(&iInfo);
bmp.Attach(iInfo.hbmImage);
pPopup->SetMenuItemBitmaps(0, MF_BYPOSITION, &bmp, &bmp);//pPopup is
the popup menu item.
The above code does not work.
However if I create a bitmap resource and use LoadBitmap to load the bitmap
resource and then use SetMenuItemBitmaps, it works. I have tried several
other things as well but I could not get it working. I am stumped! I would appreciate any suggestion.
-
July 13th, 1999, 04:50 PM
#2
Re: ImageList Manipulation
Look in the MENU code section on this site. There are some excellent articles on rendering bitmap menus.
HTH,
Mike
Gort...Klaatu, Barada Nikto!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|