hi there. small question: do menu items with those small icons on the left (like in the menu-weblink example on the iczelion page) have to be ownerdrawn or is there a way to let windows draw the whole item?
Posted on 2001-06-07 13:08:00 by Somebody
No there's no standard way to do this. There probably will be some day but right now you'll have to use owner-drawn menus. Thomas
Posted on 2001-06-07 15:42:00 by Thomas
Hi somebody, Well, u can let Windows draw the menuitems (I mean with or not a bitmap), just use ;############################################### invoke LoadBitmap, hInstance, ID_BMP mov hBmp, eax invoke SetMenuItemBitmaps, hMenu, IDM_ITEM1, MF_BYCOMMAND, hBmp, hBmp ;############################################### If u want, there is a prog on my site which set a bitmap to an item (bitmap at the left and text). U can of course set just a bitmap without text, or just text without bitmap. By this way, Windows will draw the item, but u must know that when u move the cursor on an item, the color of the bitmap is reversed, but when u draw it owner, it can keep his colors, but u must draw all : the icon, the text, the backgnd color of the text... If u want I made a prog (not on my site, just mail me) which uses many things for a menu. Hope I answered your question
Posted on 2001-06-07 15:42:00 by Vom-bonjour:-()
Although Vom-bonjour is right about the SetMenuItemBitmaps method, those bitmaps are inverted when the menu item is selected. That can be a problem. I've been playing with menus with bitmaps for a while, and I'm thinking about a reusable implementation of a standard owner-draw-procedure that handles the bitmaps correctly (including selected/disabled/grayed/etc.). But right now I have to focus on other things in my program that are more important. But when I make such a thing I'll let you know. Thomas
Posted on 2001-06-07 15:53:00 by Thomas
thank you for all your answers. i've already writte a program with ownerdrawn menuitems with icons on the left, so i don't really need another code example. i just wanted to know if it really has to be so "complicated" :)
Posted on 2001-06-08 03:56:00 by Somebody