#include <wfext.h> |
HMENU FAR PASCAL FMExtensionProc(hwnd, wMsg, lParam) | |||||
HWND hwnd; | /* handle of the extension window | */ | |||
WORD wMsg; | /* menu-item identifier or message | */ | |||
LONG lParam; | /* additional message information | */ |
The FMExtensionProc function, an application-defined callback function, processes menu commands and messages sent to a File Manager extension dynamic-link library (DLL).
hwnd
Identifies the File Manager window. An extension DLL should use this handle to specify the parent for any dialog boxes or message boxes that the DLL may display and to send request messages to File Manager.
wMsg
Specifies the message. This parameter may be one of the following values:
Value | Meaning |
1–99 | Identifier for the menu item that the user selected. |
FMEVENT_INITMENU | User selected the extension's menu. |
FMEVENT_LOAD | File Manager is loading the extension DLL. |
FMEVENT_SELCHANGE | Selection in File Manager's directory window, or Search Results window, changed. |
FMEVENT_UNLOAD | File Manager is unloading the extension DLL. |
FMEVENT_USER_REFRESH | User chose the Refresh command from the Window menu. |
lParam
Specifies 32 bits of additional message-dependent information.
The callback function should return the result of the message processing. The actual return value depends on the message that is processed.
Whenever File Manager calls the FMExtensionProc function, it waits to refresh its directory windows (for changes in the file system) until after the function returns. This allows the extension to perform large numbers of file operations without excessive repainting by the File Manager. The extension does not need to send the FM_REFRESH_WINDOWS message to notify File Manager to repaint its windows.