Reputation: 377
Is there some way to get all control IDs of current MFC dialog box? (to change WindowText of all controls)
Upvotes: 0
Views: 1331
Reputation: 1346
You can do something like that:
for(CWnd* pWnd = GetWindow(GW_CHILD); pWnd != NULL; pWnd = pWnd->GetWindow(GW_HWNDNEXT))
{
pWnd->SetWindowText(_T("MyText"));
}
Of course, you can check ID or type of control id if you need.
Upvotes: 3