MFC改变按钮文字Button

https://blog.csdn.net/salony/article/details/44597845

MFC改变按钮文字Button,下面代码可以使按钮单击后从默认的开始变为停止,如果按钮标题是停止,那么再次单击后便变为开始。
    CString i;
    GetDlgItemText(IDOK,i); //取按钮标题
    if (i==_T("开始"))
        GetDlgItem(IDOK)->SetWindowText(_T("停止")); 
    else
        GetDlgItem(IDOK)->SetWindowText(_T("开始"));

使用性很强的代码,一定记得收藏!
--------------------- 
作者:运维爱编程 
来源:CSDN 
原文:https://blog.csdn.net/salony/article/details/44597845 
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/active2489595970/article/details/88856235