The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: RHL on February 02, 2012, 03:07:43 AM

Title: detect active window and redraw?
Post by: RHL on February 02, 2012, 03:07:43 AM
Hello all! : )
well, I came to ask for help, I know how I can detect when a window goes of background to active or when a window is redraws?
some reference or code, please  :U
Title: Re: detect active window and redraw?
Post by: dedndave on February 02, 2012, 03:21:03 AM
the window receives a WM_SIZE message
wParam carries additional information
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632646%28v=vs.85%29.aspx

you can also use WM_ACTIVATE
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646274%28v=vs.85%29.aspx

but, WM_SIZE carries more info - the window is sent both messages, along with a few others
Title: Re: detect active window and redraw?
Post by: RHL on February 02, 2012, 07:25:01 AM
thanks dedndave, I will make tests and comment  :thumbu