locked
how to send message from a property sheet page to another page? RRS feed

  • Question

  • Hi,

    I have one property sheet in which I am having 3 pages[dialogs]

    I want to send message from one page to another one.

    How Can i do it?

     

    Regards,

    Koushik

    Thursday, June 16, 2011 11:37 AM

Answers

  • Hi,
     
    I have one property sheet in which I am having 3 pages[dialogs]
     
    I want to send message from one page to another one.
     
    How Can i do it?
    If you have each page hold a pointer to the parent sheet, the you can use CPropertySheet::GetPage() to get a pointer to another page.
     
    But in order to do this you need to know the indexing of the pages. Better, IMHO, is to call a method in the CProprtySheet, and have this method contact the other page. This can also be done with a custom method, avoiding the need for using SendMessage().
     
    While coupling between classes of this type is generally bad, in the case of CPropertySheet/CPropertyPage I think it is OK.
     

    David Wilkinson | Visual C++ MVP
    Thursday, June 16, 2011 12:11 PM