The following table describes how the DefScreenSaverProc processes a variety of window messages.
WM_ACTIVATE, WM_ACTIVATEAPP, WM_NCACTIVATE
Closes the screen saver if the wParam parameter is FALSE. A wParam value of FALSE indicates that the screen saver is losing the input focus. The screen saver is closed by sending aWM_CLOSE message.
WM_SETCURSOR
Removes the cursor from the screen by setting the cursor to NULL.
WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MBUTTONDOWN,WM_KEYDOWN, WM_KEYUP, WM_MOUSEMOVE
Calls thePostQuitMessage function to close the screen saver.
WM_DESTROY
Posts a WM_CLOSE message to close the screen saver window.
WM_SYSCOMMAND
Returns FALSE if the wParam parameter of WM_SYSCOMMAND is either SC_CLOSE or SC_SCREENSAVE.