当前位置:网站首页>MFC handy notes
MFC handy notes
2022-07-26 09:33:00 【Flying 123_ one hundred and twenty-three】
1、cstring go to char*
CString strPort;
USES_CONVERSION;
char* port = (LPSTR)(LPCSTR)strPort; //cstring go to char*
2、 obtain combo box Information about
CString strPort;
CComboBox* pComboPort = (CComboBox*)GetDlgItem(IDC_COMBO_PORT);
pComboPort->GetWindowText(strPort);
3、 Get and set button Information on the button
CString str;
GetDlgItemText(IDC_BUTTON_OPEN, str);// Get the information on the button
CButton* pBtnOpen = (CButton*)GetDlgItem(IDC_BUTTON_OPEN);
pBtnOpen->SetWindowText(_T(" close "));// Set the information on the button
4、 Set up button
GetDlgItem(IDC_BUT_RunStatus)->EnableWindow(FALSE);// Turn grey , Unavailable , so
GetDlgItem(IDC_BUT_RunStatus)->EnableWindow(TRUE);// Restore to normal , You can use , so
5、String It's transformed into int type
int m_Index;
CString index;
m_Index = _ttoi(index);
6、C***Dialog Call the master C***View
1) add to #include "C***Doc.h" And #include "C***View.h" The header file
2)C***Dialog Add in CView Base class pointer m_pView.
3)C**View Created in Dialog Time assignment C***Dialog.m_pView=this
4)C***Dialog Call in function ((C***View)*m_pView)->Function();
边栏推荐
猜你喜欢
随机推荐
PMM(Percona Monitoring and Management )安装记录
服务器环境配置全过程
matlab simulink实现模糊pid对中央空调时延温度控制系统控制
配置ADCS后访问certsrv的问题
Antd treeselect gets the value of the parent node
Does volatile rely on the MESI protocol to solve the visibility problem? (top)
Solve "note: one or more layouts are missing the layout_width or layout_height attributes."
Basic use of ArcGIS 1
青少年软件编程等级考试标准解读_二级
Add DLL
注册模块用例编写
JS output diamond on the console
POJ 1012 Joseph
el-table的formatter属性的用法
malloc分配空间失败,并且不返回null
asp. Net using redis cache (2)
opencv 类的使用
Use of OpenCV class
高斯消元求解矩阵的逆(gauss)
mysql5.7.25主从复制(单向)