Print Page | Close Window

How to capture click event of ribbon tab

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=10887
Printed Date: 04 December 2024 at 2:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to capture click event of ribbon tab
Posted By: raghmod81
Subject: How to capture click event of ribbon tab
Date 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.



Replies:
Posted By: Oleg
Date Posted: 03 June 2008 at 9:17am
Hi,
 
You can override CXTPRibbonBar and catch WM_LBUTTONDOWN.


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


Posted By: raghmod81
Date Posted: 04 June 2008 at 1:35am
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.



Posted By: raghmod81
Date Posted: 05 June 2008 at 4:31am
Hi,
can you please solve my above mentioned problem


Posted By: znakeeye
Date Posted: 30 July 2008 at 3:12am
Did you try WM_NCLBUTTONDOWN and WM_NCLBUTTONDBLCLK?



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