Hello , i am not sure for what kind of focus you are talking but here are my suggestions
- if its only keyboard focus you easily can catch it with WM_SETFOCUS
WM_SETFOCUS
-if you want mouse focus you can use a variable for the status of the app and when
WM_KILLFOCUS is fired you will know when your app is not in focus and use it combined with WM_MOUSEMOVE
WM_MOUSEMOVE
(i would use MK_LBUTTON) and the variable for the status to determine if your app is in focus again
-if its both keyboard and mouse focus you just can combine the previous solutions
I hope this helps