Platform SDK: Active Directory, ADSI, and Directory Services |
The _BrowseCallBack function is a callback function implemented by the caller of the function to handle relevant messages (see the msg parameter for a list of messages) dispatched from the browse dialog, for example, to override some default behavior, or to provide extra filtering.
int CALLBACK _BrowseCallBack( HWND hwnd, UINT msg, LPARAM lpData, LPARAM lParam );
Message | Description |
---|---|
DSBM_CHANGEIMAGESTATE | Called before the image state in the tree view is changed. |
DSBM_CONTEXTMENU | Used to forward WM_CONTEXTMENU messages from the dialog to the callback function. |
DSBM_HELP | Used to forward the WM_HELP message from the dialog to the callback function. |
DSBM_QUERYINSERT | Called before each item is inserted into the tree view, which allows the caller to override the display information for a particular node, including its display name, icon, and so on. |
The function should return TRUE if it handles the message, FALSE if it ignores the message.
You must declare and implement a callback function following the prototype discussed above. You specify the callback function in the pfnCallback field of the DSBROWSEINFO structure.
Upon receiving a DSBM_QUERYINSERT message, the callback function can modify the structure and update any of the fields before returning to the caller. If the structure has been modified, the callback function should return TRUE. An item will be hidden when the callback function sets the DSBS_HIDDEN flag and returns TRUE.
The DSBM_HELP message uses the lpData parameter to receive lParam from WM_HELP. The DSBM_CONTEXTMENU uses the lpData parameter to receive wParam from WM_CONTEXTMENU.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Dsclient.h.