|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Chris Anderson
|
Nov 8, 2007 - 6:20 PM
|
I’m wondering whether it’s a bug or I missed something here. We were not able to set/add a bitmap to a menu item of system menu.
Our legacy app would dynamically change the system menu of the main frame window. The main frame wnd is derived from CExtNCW<CUfcFrameWnd>, we also use CExtMenuControlBar inside the main frame window
Based on the context, we need to update the system menu or insert a new menu item. what we did was
- get the system menu handler
hMenu = ::GetSystemMenu(hWndFrame, FALSE);
- update the system menu ::ModifyMenu( hmenu, nPos, MF_BYPOSITION | MF_BITMAP, uMenuID, (LPCTSTR)hBmp );
But when I looked at the system menu, it shows an empty menu item, there is neither icon nor string. This approach works well with the text, as I can add new string menu item without any problem. Another problem I found is that owner draw menu doesn’t work.
any suggestion ? Should I overwrite CExtMenuControlBar::_TrackFrameSystemMenu() ?
thanks
|
|
Chris Anderson
|
Nov 11, 2007 - 11:47 AM
|
sorry for the typo when I copied and pasted the code snippet. I just send a sample project which shows the problem, could you take a look
thanks
|
|