Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Using the event sink methods
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using the event sink methods

 Post Reply Post Reply
Author
Message
cyrilthom View Drop Down
Newbie
Newbie


Joined: 23 September 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote cyrilthom Quote  Post ReplyReply Direct Link To This Post Topic: Using the event sink methods
    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 :)
 
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.187 seconds.