CWnd* pWnd=GetTopWindow();
while(pWnd!=NULL)
{
int i=pWnd->GetDlgCtrlID();
CString str;
str.Format(_T("ID是:%d"),i);
pWnd->SetWindowTextW(str);
pWnd=pWnd->GetNextWindow();
}
CWnd* pWnd=GetTopWindow();
while(pWnd!=NULL)
{
int i=pWnd->GetDlgCtrlID();
CString str;
str.Format(_T("ID是:%d"),i);
pWnd->SetWindowTextW(str);
pWnd=pWnd->GetNextWindow();
}