Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItemDate notifications in OnDockin
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItemDate notifications in OnDockin

 Post Reply Post Reply
Author
Message
andrewg View Drop Down
Groupie
Groupie


Joined: 24 September 2007
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote andrewg Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItemDate notifications in OnDockin
    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,

 

 

 

Back to Top
link View Drop Down
Groupie
Groupie


Joined: 02 July 2009
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote link Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2011 at 9:17am
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.
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.156 seconds.