|
|
|
|
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 |
|
deimos
|
Apr 9, 2003 - 8:34 AM
|
I asked: >>> Whether I can set an icon on pop-up item of the application‘s main menu?
You have answered: All menus and toolbars are based on the global command manager (g_CmdManager variable). They take information about commands (menu text, toolbar text, status tip, toolbar tip, icon) from the command manager. You should update your command description: VERIFY( g_CmdManager->CmdSetIcon( strProfileName, nCommadID, hIcon, false // true - use copy of hIcon, false - use hIcon as is ) );
This code used for assign icon to command.
But I want to assign an icon to a pop-up! menu, instead of the command.
|
|
Sergiy Lavrynenko
|
Apr 9, 2003 - 10:29 AM
|
Hi,
To assign an icon for existing popup submenu item you should call CExtPopupMenuWnd::ItemSetPopupIcon(nPos, hIcon) method. Item at position nPos should be submenu – not a command.
To specify icon during new the sub menu construction just pass it as a parameter of CExtPopupMenuWnd::ItemInsert() method.
Best regards, Sergiy.
|
|
deimos
|
Apr 10, 2003 - 1:03 AM
|
Thanks for consultation. But I want to assign an icon for existing popup submenu item of the application’s main menu (CExtMenuControlBar).
|
|