Click here to Skip to main content
15,917,617 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Is there any way to know application change event???

ie, I have an application in MFC feature pack.
I need to update the CView while the user switches back to my application after doing some work in another application.

Hope you understand my problem???
Posted

1 solution

Hi Vineeth,

You can do this by handling WM_ACTIVATE message, it will give you the current application state[ Active or Inactive]. You can find more explanation from this link http://msdn.microsoft.com/en-us/library/windows/desktop/ms646274(v=vs.85).aspx[^]

Note:
If you are new to MFC, it is better to use MFC Class Wizard to add event handler for WM_ACTIVATE. If you had experience in MFC, please ignore this note.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900