BrowseCallbackProcBrowseCallbackProc*
*



Contents  *



Index  *Topic Contents
*Previous Topic: Callback Functions
*Next Topic: FMExtensionProc

BrowseCallbackProc


int CALLBACK BrowseCallbackProc(
    HWND hwnd, 
    UINT uMsg, 
    LPARAM lParam, 
    LPARAM lpData
    ); 

Specifies an application-defined callback function used with the SHBrowseForFolder function. The browse dialog box calls this function to notify it about events.

hwnd
Window handle to the browse dialog box. The callback function can send the following messages to this window:
BFFM_ENABLEOK Enables or disables the dialog's OK button. If the message's lParam is nonzero, the button is enabled. If the message's lParam is zero, the button is disabled.
BFFM_SETSELECTION Selects the specified folder. The message's lParam is the PIDL of the folder to select if wParam is FALSE, or the path of the folder otherwise.
BFFM_SETSTATUSTEXT Sets the status text to the null-terminated string specified by the message's lParam parameter.
uMsg
Value identifying the event. This can be one of the following values:
BFFM_INITIALIZED Indicates the browse dialog box has finished initializing. The lParam parameter is NULL.
BFFM_SELCHANGED Indicates the selection has changed. The lParam parameter contains the address of the item identifier list for the newly selected folder.
BFFM_VALIDATEFAILED Version 4.71. Indicates the user typed an invalid name into the edit box of the browse dialog. The lParam parameter is the address of a character buffer that contains the invalid name. An application can use this message to inform the user that the name entered was not valid. Return zero to allow the dialog to be dismissed or nonzero to keep the dialog displayed.
lParam
Value dependent upon the message contained in the uMsg parameter.
lpData
Application-defined value that was specified in the lParam member of the BROWSEINFO structure.

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