win32- Menus: a MF_POPUP menu, can have an image?

i'm testing my menu class. but seems that something isn't right, so i must ask: a MF_POPUP menu can have an image?
i'm gettig problems even when i change the caption :(
Although I don't know the specifics, I do know there is an excellent article / chapter on menus (Which includes how to add custom images) by Charles Petzold.

Programming for Windows (Fifth Edition) - Charles Petzold
https://www-user.tu-chemnitz.de/~heha/petzold/

Chapter 10 (C) - Menus
https://www-user.tu-chemnitz.de/~heha/petzold/ch10c.htm

Although it is not a direct answer to your question, I urge you to read this book (Or related chapters). As it is very informative and useful.
Last edited on
finally i did that ;)
1
2
3
4
if(ispopup==false)
                    SetMenuItemBitmaps(MenuHandle,ID,MF_BYCOMMAND,imgMenu ,imgMenu);
                else
                    SetMenuItemBitmaps(MenuPopup,menuposition,MF_BYPOSITION,imgMenu ,imgMenu);

please correct me more that let me confused.
i know the HMENU it's a menu handle. when we add a menu item we use the popup menu handle for it. until here i seems to understand. but if we add an image to menu item, we must use the menu popup handle with it's position or ID. but for the popup we must use it's handle and it's ID.
please corrrect these that it's make me a little confused :(
Topic archived. No new replies allowed.