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

    CPropertySheet Button Messages

    Hi
    Does anyone know how to get the APPLY and OK button messages on a property sheet, and is there any possibility to activate th APPLY button on any change of the pages
    thanx for help.


    --
    -=SKULK=-

  2. #2
    Join Date
    Apr 1999
    Location
    Portland, OR, USA
    Posts
    18

    Re: CPropertySheet Button Messages

    To handle the mesages, just add to each of your CPropertyPage derived classes add the following handlers with the ClassWizard:

    OnApply()
    OnOK()

    As for making the Apply button active... I assume that you have some sort of handler function that gets called whenever the user changes the state or contents of each UI widget on your dialog, right? Such as OnBnCLicked()? If not, then do it.

    Once that's done, you need to add the following to each of those handlers:
    SetModified(TRUE);

    This will cause the Apply button to activate. Then, in your OnApply() handler, you call SetModified(FALSE); to make the button inactive.

    Good luck, and happy coding!

    Valerie Bradley
    http://www.synthcom.com/~val
    [email protected]

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