CXTPPropertyGridItemDate notifications in OnDockin |
Post Reply |
Author | |
andrewg
Groupie Joined: 24 September 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
Posted: 16 March 2009 at 3:41pm |
We are using a CXTPPropertyGrid in a Pane (actually in a view in a Pane) to edit data, and we need to detect when the user leaves the Grid in order to handle update logic (such as unsaved changes, etc). In the application's CMainFrame class, we handle XTPWM_DOCKINGPANE_NOTIFY, and look for XTP_PANE_ACTION. We want to handle any deactivation of the Property Pane. The code is like this:if (wParam == XTP_DPN_ACTION) {XTP_DOCKINGPANE_ACTION * pAction = (XTP_DOCKINGPANE_ACTION *)lParam; // CString dbg; dbg.LoadStringA(pAction->pPane->GetID()); // TRACE3("%s: ID %d, action %d, ", dbg.GetBuffer(), pAction->pPane->GetID(), pAction->action); if(pAction->pPane->GetID() == IDR_PANE_PROPERTIES) {XTPDockingPaneAction action = pAction->action; if(action == xtpPaneActionDeactivated) {TRACE( "Deactivating Property Pane\n");CWnd * window = pAction->pPane->GetChild(); window->SendMessageToDescendants(WM_CFTPO_CLOSEVIEW); } } } This works well, with one exception. The problem we have is that we get this message, and fall into the "Deactivating Property Pane" code, if the user selects a value in a drop down calendar in a CXTPPropertyGridItemDate object. It seems that the drop down calendar is a CWnd of its own, and that it therefore Posts the deactivation notification regarding the Property Grid, just as though it were some external window. Is there a way to avoid this? If there was a way to tell if the xtpPaneActionDeactivated notification was provoked by a move into a Child window of the property pane, then notifications from a Calendar drop down could be ignored. I am sure that we are not the only people using CXTPPropertyGridItemDates and trying to detect departures from the CXTPPropertyGrid -- has anyone else come across the issue? Any help or hints appreciated,
|
|
link
Groupie Joined: 02 July 2009 Status: Offline Points: 20 |
Post Options
Thanks(0)
|
Hi, did you ever receive a solution to this problem? Experiencing the same here.
Oleg, you have anything to offer?
In summary, xtpPaneActionDeactivated action is called in OnGridNotify(...) when date selector object gains focus in a CXTPPropertyGridItemDate item in property grid.
|
|
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 |