DefScreenSaverProcDefScreenSaverProc*
*Contents  *Index  *Topic Contents
*Previous Topic: CPlApplet
*Next Topic: DragAcceptFiles

DefScreenSaverProc

Provides default processing for any messages that a screen saver application does not process.

Syntax

LONG DefScreenSaverProc(
    HWND hWnd,
    UINT msg,
    WPARAM wParam,
    LPARAM lParam
);

Parameters

hWnd
Identifier of the screen saver window.
msg
Message to be processed. The DefScreenSaverProc function responds to messages that affect the screen saver's operation, as detailed in the Remarks section.
If a screen saver application must perform a different action in response to any of these messages, the application's ScreenSaverProc window procedure should process the message.
wParam
Additional message-specific information.
lParam
Additional message-specific information.

Return Values

The return value specifies the result of the message processing and depends on the message sent.

Remarks

A screen saver application's ScreenSaverProc window procedure should use DefScreenSaverProc instead of the DefWindowProc function to provide default message processing. The DefScreenSaverProc function passes any messages that do not affect screen saver operation to DefWindowProc.

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 a WM_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 the PostQuitMessage 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.

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.