Print Page | Close Window

GetSelectedTab() of CXTPRibbonTab returns NULL

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=17867
Printed Date: 19 June 2025 at 3:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GetSelectedTab() of CXTPRibbonTab returns NULL
Posted By: danielbu
Subject: GetSelectedTab() of CXTPRibbonTab returns NULL
Date Posted: 11 February 2011 at 4:40pm
Hi,

I call GetSelectedTab() in OnCmdMsg method of my main window class and it returns NULL. This is odd as I clearly select t ab on my ribbon.  Any clues?? 

Here is the code in my override of OnCmdMsg:

CXTPRibbonBar* pRibbon = tabHost->GetRibbon();
if (pRibbon) {
CXTPRibbonTab* pTab = pRibbon->GetSelectedTab();  // here I get NULL :(
if (pTab) {
int tabId = pTab->GetID();
switch (tabId) {
case ID_TAB_EXPLORER:
if (m_pExplorerHost) {
m_pExplorerHost->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
RibbonPaneSetFocus(IDR_PANE_EXPLORER, tabId);
}
return TRUE;
...
}
}

Help is greatly appreciated.


-------------
dan



Replies:
Posted By: danielbu
Date Posted: 14 February 2011 at 8:58am
In addition to the above need to mention this:
Use ToolkitPro 13 on Windows Vista 64 bit machine.



-------------
dan



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