home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / wfext.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  7KB  |  186 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * wfext.h -     Windows File Manager Extensions definitions (Win32 variant)   *
  4. *                                                                             *
  5. *               Version 3.10                                                  *
  6. *                                                                             *
  7. *               Copyright 1991-1998, Microsoft Corp. All rights reserved. *
  8. *                                                                             *
  9. *******************************************************************************/
  10.  
  11. #ifndef _INC_WFEXT
  12. #define _INC_WFEXT            /* #defined if wfext.h has been included */
  13.  
  14. #ifdef __cplusplus            /* Assume C declaration for C++ */
  15. extern "C" {
  16. #endif  /* __cplusplus */
  17.  
  18. #define MENU_TEXT_LEN           40
  19.  
  20. #define FMMENU_FIRST            1
  21. #define FMMENU_LAST             99
  22.  
  23. #define FMEVENT_LOAD            100
  24. #define FMEVENT_UNLOAD          101
  25. #define FMEVENT_INITMENU        102
  26. #define FMEVENT_USER_REFRESH    103
  27. #define FMEVENT_SELCHANGE       104
  28. #define FMEVENT_TOOLBARLOAD     105
  29. #define FMEVENT_HELPSTRING      106
  30. #define FMEVENT_HELPMENUITEM    107
  31.  
  32. #define FMFOCUS_DIR             1
  33. #define FMFOCUS_TREE            2
  34. #define FMFOCUS_DRIVES          3
  35. #define FMFOCUS_SEARCH          4
  36.  
  37. #define FM_GETFOCUS           (WM_USER + 0x0200)
  38. #define FM_GETSELCOUNT        (WM_USER + 0x0202)
  39. #define FM_GETSELCOUNTLFN     (WM_USER + 0x0203)  /* LFN versions are odd */
  40. #define FM_REFRESH_WINDOWS    (WM_USER + 0x0206)
  41. #define FM_RELOAD_EXTENSIONS  (WM_USER + 0x0207)
  42.  
  43. #define FM_GETDRIVEINFOA      (WM_USER + 0x0201)
  44. #define FM_GETFILESELA        (WM_USER + 0x0204)
  45. #define FM_GETFILESELLFNA     (WM_USER + 0x0205)  /* LFN versions are odd */
  46.  
  47. #define FM_GETDRIVEINFOW      (WM_USER + 0x0211)
  48. #define FM_GETFILESELW        (WM_USER + 0x0214)
  49. #define FM_GETFILESELLFNW     (WM_USER + 0x0215)  /* LFN versions are odd */
  50.  
  51. #ifdef UNICODE
  52. #define FM_GETDRIVEINFO    FM_GETDRIVEINFOW
  53. #define FM_GETFILESEL      FM_GETFILESELW
  54. #define FM_GETFILESELLFN   FM_GETFILESELLFNW
  55. #else
  56. #define FM_GETDRIVEINFO    FM_GETDRIVEINFOA
  57. #define FM_GETFILESEL      FM_GETFILESELA
  58. #define FM_GETFILESELLFN   FM_GETFILESELLFNA
  59. #endif
  60.  
  61.  
  62. typedef struct _FMS_GETFILESELA {
  63.    FILETIME ftTime;
  64.    DWORD dwSize;
  65.    BYTE bAttr;
  66.    CHAR szName[260];          // always fully qualified
  67. } FMS_GETFILESELA, FAR *LPFMS_GETFILESELA;
  68.  
  69. typedef struct _FMS_GETFILESELW {
  70.    FILETIME ftTime ;
  71.    DWORD dwSize;
  72.    BYTE bAttr;
  73.    WCHAR szName[260];          // always fully qualified
  74. } FMS_GETFILESELW, FAR *LPFMS_GETFILESELW;
  75.  
  76. #ifdef UNICODE
  77. #define FMS_GETFILESEL   FMS_GETFILESELW
  78. #define LPFMS_GETFILESEL LPFMS_GETFILESELW
  79. #else
  80. #define FMS_GETFILESEL   FMS_GETFILESELA
  81. #define LPFMS_GETFILESEL LPFMS_GETFILESELA
  82. #endif
  83.  
  84.  
  85. typedef struct _FMS_GETDRIVEINFOA {      // for drive
  86.    DWORD dwTotalSpace;
  87.    DWORD dwFreeSpace;
  88.    CHAR  szPath[260];                    // current directory
  89.    CHAR  szVolume[14];                   // volume label
  90.    CHAR  szShare[128];                   // if this is a net drive
  91. } FMS_GETDRIVEINFOA, FAR *LPFMS_GETDRIVEINFOA;
  92.  
  93. typedef struct _FMS_GETDRIVEINFOW {      // for drive
  94.    DWORD dwTotalSpace;
  95.    DWORD dwFreeSpace;
  96.    WCHAR szPath[260];                    // current directory
  97.    WCHAR szVolume[14];                   // volume label
  98.    WCHAR szShare[128];                   // if this is a net drive
  99. } FMS_GETDRIVEINFOW, FAR *LPFMS_GETDRIVEINFOW;
  100.  
  101. #ifdef UNICODE
  102. #define FMS_GETDRIVEINFO   FMS_GETDRIVEINFOW
  103. #define LPFMS_GETDRIVEINFO LPFMS_GETDRIVEINFOW
  104. #else
  105. #define FMS_GETDRIVEINFO   FMS_GETDRIVEINFOA
  106. #define LPFMS_GETDRIVEINFO LPFMS_GETDRIVEINFOA
  107. #endif
  108.  
  109.  
  110. typedef struct _FMS_LOADA {
  111.    DWORD dwSize;                        // for version checks
  112.    CHAR  szMenuName[MENU_TEXT_LEN];     // output
  113.    HMENU hMenu;                         // output
  114.    UINT  wMenuDelta;                    // input
  115. } FMS_LOADA, FAR *LPFMS_LOADA;
  116.  
  117. typedef struct _FMS_LOADW {
  118.    DWORD dwSize;                        // for version checks
  119.    WCHAR szMenuName[MENU_TEXT_LEN];     // output
  120.    HMENU hMenu;                         // output
  121.    UINT  wMenuDelta;                    // input
  122. } FMS_LOADW, FAR *LPFMS_LOADW;
  123.  
  124. #ifdef UNICODE
  125. #define FMS_LOAD   FMS_LOADW
  126. #define LPFMS_LOAD LPFMS_LOADW
  127. #else
  128. #define FMS_LOAD   FMS_LOADA
  129. #define LPFMS_LOAD LPFMS_LOADA
  130. #endif
  131.  
  132.  
  133. // Toolbar definitions
  134.  
  135. typedef struct tagEXT_BUTTON {
  136.    WORD idCommand;                 /* menu command to trigger */
  137.    WORD idsHelp;                   /* help string ID */
  138.    WORD fsStyle;                   /* button style */
  139. } EXT_BUTTON, FAR *LPEXT_BUTTON;
  140.  
  141. typedef struct tagFMS_TOOLBARLOAD {
  142.    DWORD dwSize;                   /* for version checks */
  143.    LPEXT_BUTTON lpButtons;         /* output */
  144.    WORD cButtons;                  /* output, 0==>no buttons */
  145.    WORD cBitmaps;                  /* number of non-sep buttons */
  146.    WORD idBitmap;                  /* output */
  147.    HBITMAP hBitmap;                /* output if idBitmap==0 */
  148. } FMS_TOOLBARLOAD, FAR *LPFMS_TOOLBARLOAD;
  149.  
  150. typedef struct tagFMS_HELPSTRINGA {
  151.    INT   idCommand;       /* input, -1==>the menu was selected */
  152.    HMENU hMenu;           /* input, the extensions menu */
  153.    CHAR  szHelp[128];     /* output, the help string */
  154. } FMS_HELPSTRINGA, FAR *LPFMS_HELPSTRINGA;
  155.  
  156. typedef struct tagFMS_HELPSTRINGW {
  157.    INT   idCommand;       /* input, -1==>the menu was selected */
  158.    HMENU hMenu;           /* input, the extensions menu */
  159.    WCHAR szHelp[128];     /* output, the help string */
  160. } FMS_HELPSTRINGW, FAR *LPFMS_HELPSTRINGW;
  161.  
  162. #ifdef UNICODE
  163. #define FMS_HELPSTRING   FMS_HELPSTRINGW
  164. #define LPFMS_HELPSTRING LPFMS_HELPSTRINGW
  165. #else
  166. #define FMS_HELPSTRING   FMS_HELPSTRINGA
  167. #define LPFMS_HELPSTRING LPFMS_HELPSTRINGA
  168. #endif
  169.  
  170.  
  171. typedef DWORD (APIENTRY *FM_EXT_PROC)(HWND, WORD, LONG);
  172. typedef DWORD (APIENTRY *FM_UNDELETE_PROC)(HWND, LPTSTR);
  173.  
  174. #ifdef UNICODE
  175. LONG WINAPI FMExtensionProcW(HWND hwnd, WORD wEvent, LONG lParam);
  176. #else
  177. LONG WINAPI FMExtensionProc(HWND hwnd, WORD wEvent, LONG lParam);
  178. #endif
  179.  
  180. #ifdef __cplusplus
  181. }                  /* End of extern "C" { */
  182. #endif             /* __cplusplus */
  183.  
  184. #endif             /* _INC_WFEXT */
  185.  
  186.