Window transition event

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Window transition event

Post by Natter »

Hi,

Is it possible to intercept the window transition event to the background/foreground ?
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Window transition event

Post by Antonio Linares »

Dear Yuri,
Use the WM_ACTIVATE message in the application's main window procedure. This message indicates window activation changes (activating/deactivating).
Combine with the LOWORD of wParam to check the activation state (e.g., WA_INACTIVE for background).
You may need to inherit a Class TMyWindow from TWindow and implement support for WM_ACTIVATE

There are some examples in these forums showing how to inherit and modify Method HandleEvent()

https://fivetechsupport.com/forums/view ... 5e#p258349
regards, saludos

Antonio Linares
www.fivetechsoft.com
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Window transition event

Post by Natter »

Thank you, Antonio! I'll try.
Post Reply