CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Posts
    5,757

    PropertySheets :: MFC

    Hi.

    I have a propertysheet with a multiple propertypages. I would like get two functions working.

    1) enable/disable default buttons (IDOK, IDCANCEL, ID_APPLY_NOW) in the propertypage.

    2) be notified when the user navigate to and from different propertypage. If possible set the active propertypage programmically.

    Okay. I believe this is the way to enable/disable the default buttons of a propertysheet from within the propertysheet.

    -----
    // disable the OK button

    GetDlgItem(IDOK)->EnableWindow(FALSE);
    -----

    However, the code above does not work from within a propertypage. Is there a way to accomplish the above without sending a message to main frame?

    I have no idea on what message to catch as the user navigates to and from propertypages.

    Thanks,
    Kuphryn

  2. #2
    igbrus is offline Elite Member Power Poster
    Join Date
    Aug 2000
    Location
    Los Angeles
    Posts
    4,658
    GetParent()->GetDltItem(IDOK)->)->EnableWindow(FALSE);

  3. #3
    Join Date
    Feb 2002
    Posts
    5,757
    Nice! Thanks.

    Kuphryn

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