Cannot capture XTPWM_PROPERTYGRID_NOTIFY |
Post Reply |
Author | |
eam74
Groupie Joined: 18 June 2014 Location: USA Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 07 July 2014 at 2:30pm |
As the title says, I am unable to capture any event from the property grid in my frame. I have tried catching both in parent and child frame but the function is never called.
Here are the relevant parts of my code, let me know what else might help: ChildFrame.h: protected: afx_msg LRESULT OnGridNotify(WPARAM wParam, LPARAM lParam); DECLARE_MESSAGE_MAP() ChildFrame.cpp: IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) ON_WM_CREATE() ON_MESSAGE(XTPWM_DOCKINGPANE_NOTIFY, OnDockingPaneNotify) ON_MESSAGE(XTPWM_PROPERTYGRID_NOTIFY, OnGridNotify) //IDR_PANE_PROPERTIES END_MESSAGE_MAP() ... //in OnDockingPaneNotify: m_colPropertyGrid.Create(CRect(0,0,125,125), this, 0); LRESULT CChildFrame::OnGridNotify(WPARAM wParam, LPARAM lParam) { TRACE0("Property Grid Notify from CHILD FRAME\n"); return 0; } I am able to capture the SendNotifyMessage in my derived class (ColPropertyGrid) but this is not where I want to catch the message. I tried commenting it out thinking maybe that was blocking the message from being sent, but no difference. I have been looking at the DrawClient sample for this but I can't figure out what I'm missing. Any help would be appreciated. |
|
Xtreme ToolkitPro (C++) v16.1.0, Windows 7
|
|
eam74
Groupie Joined: 18 June 2014 Location: USA Status: Offline Points: 15 |
Post Options
Thanks(0)
|
looked at the MDIPanes Sample and tried adding a notify to that:
in ChildFrm.h added protected: afx_msg LRESULT OnGridNotify(WPARAM wParam, LPARAM lParam); in ChildFrm.cpp added ON_MESSAGE(XTPWM_PROPERTYGRID_NOTIFY, OnGridNotify) LRESULT CChildFrame::OnGridNotify(WPARAM wParam, LPARAM lParam) { TRACE0("GRID NOTIFY\n"); return TRUE; } and it prints out the message as expected. This seems to be precisely what I was doing... could it be that I am overriding something else that I shouldn't be?? |
|
Xtreme ToolkitPro (C++) v16.1.0, Windows 7
|
|
eam74
Groupie Joined: 18 June 2014 Location: USA Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Aha - the problem was in the OnDockingPaneNotify function instead. I was missing the line
m_colPropertyGrid.SetOwner(this); after calling Create. I'm not sure why that doesn't happen automatically given that you pass in a parameter for the parent window during Create, but it works now! |
|
Xtreme ToolkitPro (C++) v16.1.0, Windows 7
|
|
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 |