Print Page | Close Window

How can we know,which tab is clicked on ribbon bar

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=11245
Printed Date: 19 April 2024 at 9:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How can we know,which tab is clicked on ribbon bar
Posted By: vijaymahajan
Subject: How can we know,which tab is clicked on ribbon bar
Date Posted: 28 June 2008 at 6:11am

Hello,

i have one issue about tabs in my application. programatically, can we know,which tab is clicked in the ribbon bar?
 
i want to do some changes in the view when some particualar tab is clicked. i want to set one particular tool on the cursor when particualr tab is clicked.For each tab,there is separate tool.
So my need is,i want to know which tab is in clicked condition.
How can i do this?
Can i get the tab information?
 
Please guide me accordingly.
 
Thanks And Regards,
Vijay.



Replies:
Posted By: Oleg
Date Posted: 28 June 2008 at 11:36am
Hi,
 
Add
 
ON_XTP_EXECUTE(XTP_ID_RIBBONCONTROLTAB, OnTabClicked)
 
void CxxxView::OnTabClicked(NMHDR* pNMHDR, LRESULT* pResult)
{
}


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


Posted By: vijaymahajan
Date Posted: 30 June 2008 at 12:45am
Hello,
i added this code in my message map -
ON_XTP_EXECUTE(ID_TAB_EDIT, OnTabClicked)
 
also did the entry in .h file as -
afx_msg void OnTabClicked(NMHDR* pNMHDR, LRESULT* pResult);
 
and difined the function as -
void CMainFrame::OnTabClicked(NMHDR* pNMHDR, LRESULT* pResult){m_EnhancementTab.onTabEnhancemtMode();}
 
But this didnt worked. i tried the same thing in your samples code also but it didnt worked.
 
Please guide me,How can i catch the tab click event.
 
Thanks And Regards,
Vijay.


Posted By: Oleg
Date Posted: 30 June 2008 at 1:50am
Hi,
Use XTP_ID_RIBBONCONTROLTAB


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


Posted By: vijaymahajan
Date Posted: 03 July 2008 at 2:31am

Hello,

From which parameter can we get the ID of the tab which we have clicked?

i tried with pNMHDR->idFrom,pNMHDR->code.These both are UINT,so i thought we may get the tab id from these variables.

i put a condition on tab event handler like -

if(pNMHDR->idFrom == ID_TAB_COLLECTION),but it didnt worked.

Also i tried if(pNMHDR->code == ID_TAB_COLLECTION),this too didnt worked.

How can i check my tab id on the tab event handler?

please guide me accordingly in details.Its very urgent.

Thanks And Regards,

Vijay

 

 

 

 

 



Posted By: Oleg
Date Posted: 03 July 2008 at 7:33am
Hi,
 
Just call pRibbonBar->GetSelectedTab();


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