![]() |
How can we know,which tab is clicked on ribbon bar |
Post Reply ![]() |
Author | |
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Add
ON_XTP_EXECUTE(XTP_ID_RIBBONCONTROLTAB, OnTabClicked)
void CxxxView::OnTabClicked(NMHDR* pNMHDR, LRESULT* pResult)
{ } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Use XTP_ID_RIBBONCONTROLTAB
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Just call pRibbonBar->GetSelectedTab();
|
|
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 |