Print Page | Close Window

Using the event sink methods

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=17393
Printed Date: 21 November 2024 at 5:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Using the event sink methods
Posted By: cyrilthom
Subject: Using the event sink methods
Date Posted: 07 October 2010 at 10:06am
Hi,
    I am using the  CXTPPropertyGrid class to create a grid for my application.
Later on i realised that i would need to use the event sink methods.For this purpose i decided to use an object of a class derived from the CXTPPropertyGrid class.
 
 For Eg.

class CPane : public  CXTPPropertyGrid {

//constructors...
 
public:
DECLARE_EVENTSINK_MAP()
 
//functions include...
 
afx_msg void OnDblClick();
afx_msg void OnScroll();
afx_msg void OnLeaveCell();
};
 
 
Now in my cpp i have included the events map as shown..

BEGIN_EVENTSINK_MAP(CPane , CXTPPropertyGrid )

ON_EVENT_REFLECT(CPane , -601 /* DblClick */, OnDblClick, VTS_NONE)

ON_EVENT_REFLECT(CPane , 73 /* Scroll */, OnScroll, VTS_NONE)

ON_EVENT_REFLECT(CPane , 72 /* LeaveCell */, OnLeaveCell, VTS_NONE)

END_EVENTSINK_MAP()

and defined the functions.....
 
but on executing if i double click on any cell it never hits the "OnDblClick" function ,not dos the leavecell method work.
 
If I am to use a CMSFlexGrid object the same way it works fine.Seeing that both of them are derived from CWnd I am not sure why it does not work in the in case of the "CXTPPropertyGrid " class.
I would be really grateful if some one could tell me where i am going wrong.
 
Thanks :)
 



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