Print Page | Close Window

CXTPPropertyGridItemDate notifications in OnDockin

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=13701
Printed Date: 05 May 2024 at 8:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridItemDate notifications in OnDockin
Posted By: andrewg
Subject: CXTPPropertyGridItemDate notifications in OnDockin
Date 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,

 

 

 




Replies:
Posted By: link
Date 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.



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