I assume that you are checking when your window gets focus through the subclassing way (why else would you post this in the API forum). So when you check for the WM_ACTIVATEAPP message the lParam value contains the ThreadID of the previous application if wParam = false.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.