Print Page | Close Window

Change the tick icon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5794
Printed Date: 03 May 2025 at 6:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change the tick icon
Posted By: ContactGT
Subject: Change the tick icon
Date 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)?



Replies:
Posted By: Oleg
Date Posted: 14 December 2006 at 1:34pm
Hi,
yes, just set any icon for this item - this icon will be in rectangle instead check mark.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ContactGT
Date Posted: 14 December 2006 at 5:47pm
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.


Posted By: Oleg
Date Posted: 15 December 2006 at 12:48am

hi,

you have to set icons to imagemanager for Controls Ids.
 
pCommandBars->GetImageManager()->SetIcons(..);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net