CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    48

    Accesing the Dialog of a CPropertyPage

    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.


  2. #2
    Join Date
    Aug 1999
    Posts
    586

    Re: Accesing the Dialog of a CPropertyPage

    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++.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured