当前位置:网站首页>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();
边栏推荐
猜你喜欢
随机推荐
Simple pedestrian recognition code to 88% accuracy Zheng Zhedong preparation
cocoapods的安装和使用
Fiddler download and installation
Byte buffer stream & character stream explanation
Add DLL
C managed and unmanaged
Mo team learning notes (I)
POJ 1012 Joseph
malloc分配空间失败,并且不返回null
Force deduction brush questions, sum of three numbers
2019 ICPC Asia Yinchuan Regional(水题题解)
调用DLL开启线程的问题
arc-gis的基本使用2
Basic use of Arc GIS 2
v-for动态设置img的src
opencv 类的使用
nodejs中mysql的使用
Network flow learning notes
如何添加一个PDB
网络流学习笔记









