0

Hi all,

I have two problems, the first being the most important:

1.
I have a Win32 (Non-MFC) app with a window and a win32 menu on it (HMENU), and I've been searching all day for a way to display shortcuts (like "Ctrl+C") on the menu items. I know there's the RegisterHotkey function but that doesn't make the shortcut to display on the menu item. There MUST be a way to do this without owner drawing the menu! Does anybody know how to achieve this?

2.
How can I display 32-bit icons in the menu items? I know how to use SetMenuItemInfo, but the problem comes when loading the bitmap. LoadBitmap works only with 24-bit bitmaps or less. LoadImage doesn't work either. I can use LoadIcon, but it is not compatible with HBITMAP, required by the MENUITEMINFO structure. Maybe a clue on how to transform a 32-bit PNG resource to an HBITMAP?

Thanks in advance

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by bheron
0

Literally, all you have to do is this...

Give the name to AppendMenu like this:

"Open\tCtrl-O"

This will have the effect you're looking for. Very simple, but unfortunately, poorly documented. :)

GC

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.