Reputation: 603
I have a MFC dialog box with small text box and button for ok and cancel. Now in some cases I want to change caption of OK and CANCEL button to YES and NO. Is there a way to do this outside of OnInitdialog method of CDialog class
Thanks Niraj Rathi
Upvotes: 1
Views: 13097
Reputation: 20993
You can change those text at any moment (when the dialog window exists) with SetWindowText
function, e.g.:
GetDlgItem(IDOK)->SetWindowText("Yes");
Upvotes: 5