1. 程式人生 > >VC遍歷窗口上的控件

VC遍歷窗口上的控件

VC 遍歷控件

CWnd *pChild = this->GetWindow(GW_CHILD); TCHAR szClassName[255] = { 0 }; while (pChild) { //獲得類名 GetClassName(pChild->GetSafeHwnd(), szClassName, 255); CString strTemp=_T(""); //清空控件 pChild->SendMessage(WM_SETTEXT, 0, (LPARAM)(LPWSTR)(LPCWSTR)strTemp ); pChild = pChild->GetWindow(GW_HWNDNEXT); }


VC遍歷窗口上的控件