How to get into Focus CWindow?

Is there a way to get a handle to a focus control? I am looking for a way to get the control id in focus in my application.

After that, it would be easy to get the identifier with GetDlgCtrlID.

CWnd *pwnd = GetWindowOnFocus(); int wID = pwnd->GetDlgCtrlID(); 

This is the part of GetWindowOnFocus that I am missing!

+4
source share
1 answer

Take a look at the static method CWnd :: GetFocus .

+4
source

All Articles