int count = 0;
HWND hwndChild=::GetWindow(m_hWnd,GW_CHILD); //列出所有控件
while(hwndChild)
{
count++;
int woc=::GetDlgCtrlID(hwndChild);//取得ID
GetDlgItem(woc)->EnableWindow(FALSE);
hwndChild=::GetWindow(hwndChild, GW_HWNDNEXT);
}
CString str;
str.Format(_T("Count:%d"), count);
MessageBox(str);获取所有子控件
最新推荐文章于 2023-03-07 12:40:54 发布
1795

被折叠的 条评论
为什么被折叠?



