[英]how to change caption of button present on MFC dialog box
I have a MFC dialog box with small text box and button for ok and cancel. 我有一个带有小文本框和确定和取消按钮的MFC对话框。 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
有没有办法在CDialog类的OnInitdialog方法之外执行此操作
Thanks Niraj Rathi 感谢Niraj Rathi
您可以随时使用SetWindowText
函数更改这些文本(当存在对话框窗口时),例如:
GetDlgItem(IDOK)->SetWindowText("Yes");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.