这几天学了点VC,觉得比JAVA难多了,写这些笔记主要是给自己看。
一、MFC中弹出窗口
1、::AfxMessageBox( L"ddd",MB_OK);
2、::MessageBox(NULL,str,L"d",MB_OK);
3、=============================================
CString str;
str.Format(_T("%I64u"), pftpfile->GetLength());
::MessageBox(NULL,str,L"d",MB_OK);
二、取得EditBox里的值
CString str;
GetDlgItem(IDC_EDIT_FILEPATH)->GetWindowTextA(str); //把 IDC_EDIT_FILEPATH里的值赋给str
三、取得主窗口的句柄:
Ctest7Dlg * pTest7Dlg = (Ctest7Dlg*) AfxGetMainWnd();
pTest7Dlg->m_hWnd;
一、MFC中弹出窗口
1、::AfxMessageBox( L"ddd",MB_OK);
2、::MessageBox(NULL,str,L"d",MB_OK);
3、=============================================
CString str;
str.Format(_T("%I64u"), pftpfile->GetLength());
::MessageBox(NULL,str,L"d",MB_OK);
二、取得EditBox里的值
CString str;
GetDlgItem(IDC_EDIT_FILEPATH)->GetWindowTextA(str); //把 IDC_EDIT_FILEPATH里的值赋给str
三、取得主窗口的句柄:
Ctest7Dlg * pTest7Dlg = (Ctest7Dlg*) AfxGetMainWnd();
pTest7Dlg->m_hWnd;