Click to See Complete Forum and Search --> : OK button text


April 9th, 1999, 04:44 PM
Hi;
I want to change the text on the OK button in a Property Sheet. How can i do that?

Thanks

Steve White

Mallik Bulusu
April 9th, 1999, 06:00 PM
//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.