Click to See Complete Forum and Search --> : Accesing the Dialog of a CPropertyPage


edmz
September 1st, 1999, 12:37 PM
I am writing an app that requires a Grid Control to be embedded in
each page of a PropertySheet.

After checking codeguru, i decided to use MFCGridCtrl. This controls
sends a notification to the parent when some event happens. The notification
that i am having problems with is when you change cells. The message
gets sent to the parent, which seems to be the dialog that the property
page uses.

I havent found a way to access this dialog, it seems CPropertyPage encapsulates
it so i cant handle the message. I used SPY++ to find this dialog, but i cant
find it. My guess is that i need to access this
dialog to be able to handle that message.

I am stuck at this point. Any help is greatly appreciated. I can post more
code if necessary. Thanks again.

Sef
September 1st, 1999, 10:07 PM
I'm not sure what the problem is here. "CPropertyPage" is derived from "CDialog" so it doesn't encapsulate the dialog, it IS the dialog. Your property page's message map should be able to handle all messages from your grid control normally. You haven't clearly spelled out what the precise problem is however. I can only infer your trying to trap some notification in the property page but it's not arriving. I see no normal reason why it shouldn't be unless you haven't mapped it correctly. Make sure the property page is in fact the parent, that its message map is set up to handle the notifications, and finally, check your grid control's properties on the dialog resource editor itself to ensure that it has no specific property set that may be fouling things up (unlikely but nevertheless, check for any child/parent properties that may be present). You should certainly be able to see where the notifications are going with Spy++.