![]() |
Change the tick icon |
Post Reply ![]() |
Author | |
ContactGT ![]() Newbie ![]() Joined: 30 October 2006 Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() Posted: 14 December 2006 at 11:14am |
I have a menu item that turns on/off a window. Is it possible to use a custom icon or bitmap for the tick next to a menu item when SetCheck(true), instead of the grey tick. Also, can I show something when the item is SetCheck(false)?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
yes, just set any icon for this item - this icon will be in rectangle instead check mark.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ContactGT ![]() Newbie ![]() Joined: 30 October 2006 Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
Thanks, but how do I get to the item? In my MainFrame::OnCreate(), I have:
// Add the menu bar
CXTPCommandBar* pMenuBar = pCommandBars->SetMenu( _T("Menu Bar"), IDR_MAINFRAME); if(pMenuBar == NULL) { TRACE0("Failed to create menu bar.\n"); return -1; // fail to create } pMenuBar->SetFlags(xtpFlagHideMinimizeBox | xtpFlagHideMaximizeBox); CMenu *menu = pMenuBar->GetMenu();
CMenu *subMenu = menu->GetSubMenu(3); But the pMenuBar->GetMenu() returns NULL, so I can't get to the items in the menus to set the check and uncheck icons.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
hi, you have to set icons to imagemanager for Controls Ids.
pCommandBars->GetImageManager()->SetIcons(..);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |