1、获取控件文字:CString temp;
m_OpenCloseCtrl.GetWindowText(temp);///获取按钮的文本
m_OpenCloseCtrl.SetWindowText(_T("打开串口"));///设置按钮文字为"打开串口"
if (temp == _T("停止发送"))
{
KillTimer(1);
m_SendCtrl.SetWindowText(_T("自动发送"));
}
2、 数据快速显示:(利用定时器)
m_showdata = iPointNumber;
SetDlgItemInt(IDC_EDIT_show, m_showdata);
3、强制支持中文路径:
setlocale(LC_ALL, "Chinese-simplified");//强制识别中文路径 #include <locale.h>