DefScreenSaverProc  3UI99S5 

The DefScreenSaverProc function provides default processing for any messages that a screen saver application does not process.

LONG DefScreenSaverProc(

    HWND hWnd,

// handle to screen saver window

    UINT msg,

// message

    WPARAM wParam,

// first message parameter

    LPARAM lParam

// second message parameter

   );

 

 

Parameters

hWnd

Identifies the screen saver window.

msg

Specifies the 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 ScreenSaverProc199UTF2 window procedure should process the message.

wParam

Specifies additional message-specific information.

lParam

Specifies 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 DefWindowProc32D1NBH 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:

Message

Action

WM_ACTIVATE2YI0_ZT, WM_ACTIVATEAPP1NY17RN, WM_NCACTIVATE2IP40JW

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_CLOSEESA43N message.

WM_SETCURSOR3.0B0YT

Removes the cursor from the screen by setting the cursor to NULL.

WM_LBUTTONDOWN065J6U, WM_RBUTTONDOWN0T6FUI, WM_MBUTTONDOWNCZVB.J, WM_KEYDOWNCXJO_P, WM_KEYUP1UBR_9N, WM_MOUSEMOVE1MQ_IQ2

Calls the PostQuitMessage2A2_SS3 function to close the screen saver.

WM_DESTROY0YQMHO

Posts a WM_CLOSE message to close the screen saver window.

WM_SYSCOMMAND3XMTV4T

Returns FALSE if the wParam parameter of WM_SYSCOMMAND is either SC_CLOSE or SC_SCREENSAVE.

 

See Also

DefWindowProc, PostQuitMessage, ScreenSaverProc, WM_ACTIVATE, WM_ACTIVATEAPP, WM_CLOSE, WM_DESTROY, WM_KEYDOWN, WM_KEYUP, WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_MOUSEMOVE, WM_NCACTIVATE, WM_RBUTTONDOWN, WM_SETCURSOR, WM_SYSCOMMAND