What is the best message to monitor to determine if a window has just been minimized, maximized, or restored?
I'm looking for something that works like WM_MOVE when the window is moved or WM_SIZE when the window is sized.
Hi msmith
Try this:
Quote
.elseif wMsg == WM_SIZE ; check if window size has changed
.if wParam == SIZE_MINIMIZED
mov bProg_active,FALSE
mov bMinimized,TRUE
mov bMaximized,FALSE
.elseif wParam == SIZE_MAXIMIZED
invoke Window_changed,hwnd ;restore window_rc
mov bMinimized,FALSE
mov bMaximized,TRUE
.elseif wParam == SIZE_RESTORED
.if (bMaximized)
invoke Window_changed,hwnd
mov bMaximized,FALSE
.elseif (bMinimized)
mov bProg_activ,TRUE
mov bMinimized,FALSE
.endif
.endif
return 0
.elseif wMsg == WM_EXITSIZEMOVE
invoke Window_changed,hwnd
return 0
Greetz Siekmanski
msmith, for these purposes there is WM_SYSCOMMAND with its parameters... Look it in help.
I use WM_SYSCOMMAND for other things, but had not considered that it would be good for this allso.
Thanks