The FMExtensionProc function is an application-defined callback function that processes menu commands and messages sent to a File Manager extension dynamic-link library (DLL).
LONG WINAPI FMExtensionProc(
HWND hwnd, |
// handle to extension window |
WORD wEvent, |
// menu-item identifier, or message |
LONG lParam |
// additional message information |
); |
Value |
Meaning |
1-99 |
The user selected the menu item identified by this number. |
FMEVENT_INITMENU |
User selected the extension’s menu. |
FMEVENT_LOAD |
File Manager is loading the extension DLL. |
FMEVENT_SELCHANGE |
Selection changed in File Manager’s directory window or in Search Results window. |
FMEVENT_UNLOAD |
File Manager is unloading the extension DLL. |
FMEVENT_USER_REFRESH |
User chose the Refresh command from the Window menu. |
The callback function should return the result of the message processing. The actual return value depends on the message 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 File Manager. It is not necessary for the extension to send the FM_REFRESH_WINDOWS message to notify File Manager to repaint its windows.