CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    South Africa
    Posts
    46

    Messaging between CPropertySheet and CPropertyPage

    Hi All,

    It seems I must be missing something fundimental.

    Generally: How to get a class to handle an event that originates in one of its members?

    Specifically: I've got a CPropertySheet that has several CPropertyPage's. One of the CPropertyPage's has a button, but I need the BN_CLICKED message to be handled by the CPropertySheet.

    Any help would me most appreciated.

    Thanks in advance
    Daniel



  2. #2
    Join Date
    May 1999
    Posts
    8

    Re: Messaging between CPropertySheet and CPropertyPage

    There are several ways you could do this:

    1) Have the property sheet object give the page object a pointer to itself and then the page can callback some special method of the sheet.

    2) From the page's handler of the BN_CLICKED notification you could resend the notification to the page's parent window (the sheet):
    GetParent()->SendMessage(WM_COMMAND, MAKEWPARAM(BN_CLICKED, buttonID), (LPARAM)GetDlgItem(buttonID)->m_hWnd);


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