Print Page | Close Window

how to find sub-menu items

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=8072
Printed Date: 06 October 2024 at 1:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to find sub-menu items
Posted By: Pearl
Subject: how to find sub-menu items
Date Posted: 18 September 2007 at 5:17pm
Hi
 
I want to find a menu item, for example, Select Surface, which is seat in the main menu Edit -> Selection Tools -> Select Surface, and its identifier ID is ID_SELECT_OBJECT. My code is like
 
   CMainFrame *mainframe = (CMainFrame *)theApp.m_pMainWnd;
    CXTPCommandBars* pCommandBars = mainframe->pCommandBars;
    CXTPControl* pSubMenu = pCommandBars->FindControl(xtpControlPopup, ID_SELECT_OBJECT, TRUE, TRUE);
 
 
However, it's never found out, what's wrong with my code?
 
Thanks in advance
 
Pearl
 



Replies:
Posted By: Oleg
Date Posted: 19 September 2007 at 4:54am
Hi,
try instead xtpControlPopup use xtpControlButton


-------------
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