16,472
社区成员
发帖
与我相关
我的任务
分享
HWND GetDlgItem(
HWND hDlg, // handle of dialog box
int nIDDlgItem // identifier of control
);
HWND hwnd=::FindWindow(NULL,TEXT("记事本"));
TCHAR str[128] = {0};
::SendDlgItemMessage(hwnd, IDC_mComboBox, WM_GETTEXT, (WPARAM)_countof(str), (LPARAM)str);
HWND hwnd=::FindWindow(NULL,"记事本");
CComboBox* cb=(CComboBox*)::GetDlgItem(hwnd,IDC_mComboBox);
CString str;
cb->GetWindowText(str);