Reputation: 50137
Is there any way to get the handle to the control that has focus? I am looking for a way to get the ID of control on focus in my app.
After that it would be easy to get the id with GetDlgCtrlID.
CWnd *pwnd = GetWindowOnFocus();
int wID = pwnd->GetDlgCtrlID();
It's the GetWindowOnFocus part that I am missing!
Upvotes: 4
Views: 3967