1、获取 Edit control控件内容
CEdit* pUserName;
CString str_username;
pUserName = (CEdit*)GetDlgItem(IDC_EDIT1);
pUserName->GetWindowTextW(str_username);
2、获取控件的大小
CRect rect;
GetDlgItem(IDC_STATIC_PICTURE1)->GetClientRect(rect);
3、改变控件文字
GetDlgItem(IDC_STATIC_TITLE)->SetWindowText(_T("Uncomplete"));
4、显示和隐藏按钮控件
CMFCButton *buttonCource;
buttonCource->ShowWindow(TRUE);//显示按钮控件
buttonCource->ShowWindow(FALSE);//隐藏按钮控件
6、打开外部exe
ShellExecute(NULL, _T("open"), _T("MFCShare.exe"), NULL, NULL, SW_SHOWNORMAL);