Calling thread activating CWnd


I'm looking for a method, to determine the calling thread-ID or window handle when a CWnd::OnActivate is triggered in MFC.
In my application, I use the MFC function

OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)

which is activated by an ON_WM_ACTIVATE message.
Now I'm looking for any option, to determine, which thread or window made this call.
Any ideas?
Use GetCurrentThreadId() inside of the callback function and write the value it returns to a file maybe?:

Topic archived. No new replies allowed.