Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How can we know,which tab is clicked on ribbon bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

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

 Post Reply Post Reply
Author
Message
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Topic: How can we know,which tab is clicked on ribbon bar
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2008 at 1:50am
Hi,
Use XTP_ID_RIBBONCONTROLTAB
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post 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

 

 

 

 

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2008 at 7:33am
Hi,
 
Just call pRibbonBar->GetSelectedTab();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.