DlgGetPassword

3.1

  #include <scrnsave.h>    

  BOOL DlgGetPassword(hDlg, message, wParam, lParam)    
  HWND hDlg; /* handle of dialog box */
  UINT message; /* message */
  WPARAM wParam; /* first message parameter */
  LPARAM lParam; /* second message parameter */

The DlgGetPassword function receives messages from the dialog box that retrieves the user's password.

Parameters

hDlg

Identifies the dialog box that retrieves the user's password.

message

Specifies the message.

wParam

Specifies 16 bits of additional message-dependent information.

lParam

Specifies 32 bits of additional message-dependent information.

Return Value

The return value is nonzero if the function is successful; otherwise, it is zero.

Comments

The DlgGetPassword function is provided in SCRNSAVE.LIB. Most applications provide a dialog box template and export the function without explicitly calling it in their code. This reference information for DlgGetPassword is provided for applications that change the default behavior.

The DlgGetPassword function is called by the DefScreenSaverProc function to retrieve the password for a screen saver.

A password applies to all screen savers using SCRNSAVE.LIB. Whether the password is enabled, however, is specific to a particular screen saver.

The dialog box template for the dialog box that retrieves the user's password must use the DLG_ENTERPASSWORD identifier (defined as 2001).

The DlgGetPassword function must be exported by including it in an EXPORTS statement in the application's module-definition (.DEF) file.

See Also

DefScreenSaverProc, DlgChangePassword, DlgInvalidPassword