I want t set a focus on a button. When I use the shown code in MFC for an edit control:
everything goes OK. But when I try it for a button it failes.Code:::SetFocus( ::GetDlgItem( GetSafeHwnd(), // HWND of the dialog window <id> ) );
However this code:
works well in both cases. What is the difference.Code:GetDlgItem( <id> )->SetFocus();
At last, what I must to do to set focus to a button in WINAPI, if my method is wrong?




Reply With Quote