WM_WINDOWPOSCHANGING
pwp = (WINDOWPOS FAR*) lParam; /* address of WINDOWPOS structure */
The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or z-order is about to change as a result of a call to SetWindowPos or another window-management function.
pwp
Value of lParam. Points to a WINDOWPOS data structure that contains information about the window's new size and position. The WINDOWPOS structure has the following form:
typedef struct tagWINDOWPOS { /* wp */
HWND hwnd;
HWND hwndInsertAfter;
int x;
int y;
int cx;
int cy;
UINT flags;
} WINDOWPOS;
An application should return zero if it processes this message.
During this message, modifying any of the values in the WINDOWPOS structure affects the new size, position, or z-order. An application can prevent changes to the window by setting or clearing the appropriate bits in the flags member of the WINDOWPOS structure.
For a window with the WS_OVERLAPPED or WS_THICKFRAME style, the DefWindowProc function handles a WM_WINDOWPOSCHANGING message by sending a WM_GETMINMAXINFO message to the window. This is done to validate the new size and position of the window and to enforce the CS_BYTEALIGNCLIENT and CS_BYTEALIGN client styles. An application can override this by not passing the WM_WINDOWPOSCHANGING message to the DefWindowProc function.