查看单个帖子
旧 2007-05-31, 04:01 PM   #1
yogy
高级会员
 
注册日期: 06-11
帖子: 1527
精华: 15
现金: 6353 标准币
资产: 6353 标准币
yogy 向着好的方向发展
默认 遍历对话框里的static控件

LPCTSTR lpWindowName = _T("QQ用户登录");
CWnd *pDialog = FindWindow(NULL, lpWindowName);
CWnd * pChild = pDialog->GetWindow(GW_CHILD);

CString sText;

for (; pChild; )
{
pChild->GetWindowText(sText);
if (sText == _T("deg"))
pChild->SetWindowText("mdeg");

pChild = pChild->GetNextWindow(GW_HWNDNEXT);
}
yogy离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)