How to capture click event of ribbon tab |
Post Reply |
Author | |
raghmod81
Newbie Joined: 07 May 2008 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 03 June 2008 at 7:08am |
I have tabs on ribbon bar. I want capture the click or double click event of this tab. How to do that? In ribbon sample I found only tab change event.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You can override CXTPRibbonBar and catch WM_LBUTTONDOWN.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
raghmod81
Newbie Joined: 07 May 2008 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Hi,
I've created my own class which is inherited from CXTPRibbonBar class
and created its object as :
class CMyXTPRibbonBar : public CXTPRibbonBar{public :DECLARE_DYNCREATE (CMyXTPRibbonBar) CMyXTPRibbonBar(); void myfunc();protected :afx_msg void OnLButtonDown(UINT nFlags, CPoint point);afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);DECLARE_MESSAGE_MAP() }; in cpp file added code :
BEGIN_MESSAGE_MAP(CMyXTPRibbonBar, CXTPRibbonBar) ON_WM_LBUTTONDOWN() ON_WM_LBUTTONDBLCLK() END_MESSAGE_MAP() and object created as follows:
m_pRibbonBar = (CMyXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CMyXTPRibbonBar));
I've implemented onLButtonDown and onLButtonDblClk in my class. But these functions are not getting called. |
|
raghmod81
Newbie Joined: 07 May 2008 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Hi,
can you please solve my above mentioned problem
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Did you try WM_NCLBUTTONDOWN and WM_NCLBUTTONDBLCLK?
|
|
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 |