How to rename the "OK" and "Cancel" in a property sheet
-
Please tell me how to rename the "OK" and "Cancel" button in a property sheet dialog and also how to rename the property pages in the sheet.
You could try OK or Cancel
CPropertySheet oProp("Title"); CWnd *pWnd = oProp.GetDlgItem(IDOK); if(::IsWindows(pWnd)) pWnd->SetWindowText("button text");
you could rename the property page by changing the properties page resource's properties - caption. Or you could try .SetWindowText(..); By the way, you need to set your propertypage to be premature exist byCPropertyPage.m_psp.dwFlags |= PSP_PREMATURE;
I did not test the codes. Hope it works. Sonork 100.41263:Anthony_Yio -
Please tell me how to rename the "OK" and "Cancel" button in a property sheet dialog and also how to rename the property pages in the sheet.
- Create a class derived from CPropertySheet. - Override the virtual function OnInitDialog()
BOOL CMyPropertySheet::OnInitDialog() { BOOL bResult = CPropertySheet::OnInitDialog(); CWnd *pWndOk = this->GetDlgItem(IDOK); if (pWndOk != NULL) { pWndOk->SetWindowText("&Save"); } pWndOk = this->GetDlgItem(IDCANCEL); if (pWndOk != NULL) { pWndOk->SetWindowText("&Quit"); } return bResult; }