CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: OK button text

  1. #1
    Guest

    OK button text

    Hi;
    I want to change the text on the OK button in a Property Sheet. How can i do that?

    Thanks

    Steve White


  2. #2
    Join Date
    Apr 1999
    Location
    WA, USA
    Posts
    15

    Re: OK button text


    //You have to do the following

    //1) derive CMyPropertySheet from CPropertySheet;
    //2) Use CMyPropertySheet in your application instead with following modification.
    //3) Using class wizard, override the OnInitDialog() as below.

    BOOL CMyProgSheet::OnInitDialog()
    {
    BOOL bResult = CPropertySheet::OnInitDialog();

    // TODO: Add your specialized code here
    GetDlgItem(IDOK)->SetWindowText("Hello");
    return bResult;
    }


    //this changes OK buttons text to "hello".

    - qed.


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