home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / WFEXT.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  10KB  |  281 lines

  1. /*
  2.  *      C/C++ Run Time Library - Version 6.5
  3.  *
  4.  *      Copyright (c) 1994 by Borland International
  5.  *      All Rights Reserved.
  6.  *
  7.  */
  8.  
  9. #if !defined(__FLAT__)
  10. /*****************************************************************************\
  11. *                                                                             *
  12. * wfext.h -     Windows File Manager Extensions definitions              *
  13. *                                                                             *
  14. *               Version 3.10                                                  *                   *
  15. *                                                                             *
  16. *               Copyright (c) 1991-1992, Microsoft Corp. All rights reserved. *
  17. *                                                                             *
  18. *******************************************************************************/
  19.  
  20. #ifndef _INC_WFEXT
  21. #define _INC_WFEXT    /* #defined if wfext.h has been included */
  22.  
  23. #ifndef RC_INVOKED
  24. #pragma pack(1)         /* Assume byte packing throughout */
  25. #endif  /* RC_INVOKED */
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {            /* Assume C declarations for C++ */
  29. #endif    /* __cplusplus */
  30.  
  31. #define MENU_TEXT_LEN        40
  32.  
  33. #define FMMENU_FIRST        1
  34. #define FMMENU_LAST        99
  35.  
  36. #define FMEVENT_LOAD        100
  37. #define FMEVENT_UNLOAD        101
  38. #define FMEVENT_INITMENU    102
  39. #define FMEVENT_USER_REFRESH    103
  40. #define FMEVENT_SELCHANGE    104
  41.  
  42. #define FMFOCUS_DIR        1
  43. #define FMFOCUS_TREE        2
  44. #define FMFOCUS_DRIVES        3
  45. #define FMFOCUS_SEARCH        4
  46.  
  47. #define FM_GETFOCUS        (WM_USER + 0x0200)
  48. #define FM_GETDRIVEINFO        (WM_USER + 0x0201)
  49. #define FM_GETSELCOUNT        (WM_USER + 0x0202)
  50. #define FM_GETSELCOUNTLFN    (WM_USER + 0x0203)    /* LFN versions are odd */
  51. #define FM_GETFILESEL        (WM_USER + 0x0204)
  52. #define FM_GETFILESELLFN    (WM_USER + 0x0205)    /* LFN versions are odd */
  53. #define FM_REFRESH_WINDOWS    (WM_USER + 0x0206)
  54. #define FM_RELOAD_EXTENSIONS    (WM_USER + 0x0207)
  55.  
  56. typedef struct tagFMS_GETFILESEL
  57. {
  58.         UINT wTime;
  59.         UINT wDate;
  60.     DWORD dwSize;
  61.     BYTE bAttr;
  62.         char szName[260];               /* always fully qualified */
  63. } FMS_GETFILESEL, FAR *LPFMS_GETFILESEL;
  64.  
  65. typedef struct tagFMS_GETDRIVEINFO       /* for drive */
  66. {
  67.     DWORD dwTotalSpace;
  68.     DWORD dwFreeSpace;
  69.     char szPath[260];        /* current directory */
  70.     char szVolume[14];        /* volume label */
  71.     char szShare[128];        /* if this is a net drive */
  72. } FMS_GETDRIVEINFO, FAR *LPFMS_GETDRIVEINFO;
  73.  
  74. typedef struct tagFMS_LOAD
  75. {
  76.     DWORD dwSize;                /* for version checks */
  77.     char  szMenuName[MENU_TEXT_LEN];    /* output */
  78.     HMENU hMenu;                /* output */
  79.         UINT  wMenuDelta;                       /* input */
  80. } FMS_LOAD, FAR *LPFMS_LOAD;
  81.  
  82. typedef DWORD (CALLBACK *FM_EXT_PROC)(HWND, UINT, LONG);
  83. typedef DWORD (CALLBACK *FM_UNDELETE_PROC)(HWND, LPSTR);
  84.  
  85. #ifndef RC_INVOKED
  86. #pragma pack()          /* Revert to default packing */
  87. #endif  /* RC_INVOKED */
  88.  
  89. #ifdef __cplusplus
  90. }                       /* End of extern "C" { */
  91. #endif    /* __cplusplus */
  92.  
  93. #endif  /* _INC_WFEXT */
  94.  
  95. #else  /* __FLAT__  */
  96. /*****************************************************************************\
  97. *                                                                             *
  98. * wfext.h -     Windows File Manager Extensions definitions (Win32 variant)   *
  99. *                                                                             *
  100. *               Version 3.10                                                  *
  101. *                                                                             *
  102. *               Copyright (c) 1991-1993, Microsoft Corp. All rights reserved. *
  103. *                                                                             *
  104. *******************************************************************************/
  105.  
  106. #ifndef _INC_WFEXT
  107. #define _INC_WFEXT            /* #defined if wfext.h has been included */
  108.  
  109. #ifdef __cplusplus            /* Assume C declaration for C++ */
  110. extern "C" {
  111. #endif  /* __cplusplus */
  112.  
  113. #define MENU_TEXT_LEN           40
  114.  
  115. #define FMMENU_FIRST            1
  116. #define FMMENU_LAST             99
  117.  
  118. #define FMEVENT_LOAD            100
  119. #define FMEVENT_UNLOAD          101
  120. #define FMEVENT_INITMENU        102
  121. #define FMEVENT_USER_REFRESH    103
  122. #define FMEVENT_SELCHANGE       104
  123. #define FMEVENT_TOOLBARLOAD     105
  124. #define FMEVENT_HELPSTRING      106
  125. #define FMEVENT_HELPMENUITEM    107
  126.  
  127. #define FMFOCUS_DIR             1
  128. #define FMFOCUS_TREE            2
  129. #define FMFOCUS_DRIVES          3
  130. #define FMFOCUS_SEARCH          4
  131.  
  132. #define FM_GETFOCUS           (WM_USER + 0x0200)
  133. #define FM_GETSELCOUNT        (WM_USER + 0x0202)
  134. #define FM_GETSELCOUNTLFN     (WM_USER + 0x0203)  /* LFN versions are odd */
  135. #define FM_REFRESH_WINDOWS    (WM_USER + 0x0206)
  136. #define FM_RELOAD_EXTENSIONS  (WM_USER + 0x0207)
  137.  
  138. #define FM_GETDRIVEINFOA      (WM_USER + 0x0201)
  139. #define FM_GETFILESELA        (WM_USER + 0x0204)
  140. #define FM_GETFILESELLFNA     (WM_USER + 0x0205)  /* LFN versions are odd */
  141.  
  142. #define FM_GETDRIVEINFOW      (WM_USER + 0x0211)
  143. #define FM_GETFILESELW        (WM_USER + 0x0214)
  144. #define FM_GETFILESELLFNW     (WM_USER + 0x0215)  /* LFN versions are odd */
  145.  
  146. #ifdef UNICODE
  147. #define FM_GETDRIVEINFO    FM_GETDRIVEINFOW
  148. #define FM_GETFILESEL      FM_GETFILESELW
  149. #define FM_GETFILESELLFN   FM_GETFILESELLFNW
  150. #else
  151. #define FM_GETDRIVEINFO    FM_GETDRIVEINFOA
  152. #define FM_GETFILESEL      FM_GETFILESELA
  153. #define FM_GETFILESELLFN   FM_GETFILESELLFNA
  154. #endif
  155.  
  156.  
  157. typedef struct _FMS_GETFILESELA {
  158.    FILETIME ftTime;
  159.    DWORD dwSize;
  160.    BYTE bAttr;
  161.    CHAR szName[260];          // always fully qualified
  162. } FMS_GETFILESELA, FAR *LPFMS_GETFILESELA;
  163.  
  164. typedef struct _FMS_GETFILESELW {
  165.    FILETIME ftTime ;
  166.    DWORD dwSize;
  167.    BYTE bAttr;
  168.    WCHAR szName[260];          // always fully qualified
  169. } FMS_GETFILESELW, FAR *LPFMS_GETFILESELW;
  170.  
  171. #ifdef UNICODE
  172. #define FMS_GETFILESEL   FMS_GETFILESELW
  173. #define LPFMS_GETFILESEL LPFMS_GETFILESELW
  174. #else
  175. #define FMS_GETFILESEL   FMS_GETFILESELA
  176. #define LPFMS_GETFILESEL LPFMS_GETFILESELA
  177. #endif
  178.  
  179.  
  180. typedef struct _FMS_GETDRIVEINFOA {      // for drive
  181.    DWORD dwTotalSpace;
  182.    DWORD dwFreeSpace;
  183.    CHAR  szPath[260];                    // current directory
  184.    CHAR  szVolume[14];                   // volume label
  185.    CHAR  szShare[128];                   // if this is a net drive
  186. } FMS_GETDRIVEINFOA, FAR *LPFMS_GETDRIVEINFOA;
  187.  
  188. typedef struct _FMS_GETDRIVEINFOW {      // for drive
  189.    DWORD dwTotalSpace;
  190.    DWORD dwFreeSpace;
  191.    WCHAR szPath[260];                    // current directory
  192.    WCHAR szVolume[14];                   // volume label
  193.    WCHAR szShare[128];                   // if this is a net drive
  194. } FMS_GETDRIVEINFOW, FAR *LPFMS_GETDRIVEINFOW;
  195.  
  196. #ifdef UNICODE
  197. #define FMS_GETDRIVEINFO   FMS_GETDRIVEINFOW
  198. #define LPFMS_GETDRIVEINFO LPFMS_GETDRIVEINFOW
  199. #else
  200. #define FMS_GETDRIVEINFO   FMS_GETDRIVEINFOA
  201. #define LPFMS_GETDRIVEINFO LPFMS_GETDRIVEINFOA
  202. #endif
  203.  
  204.  
  205. typedef struct _FMS_LOADA {
  206.    DWORD dwSize;                        // for version checks
  207.    CHAR  szMenuName[MENU_TEXT_LEN];     // output
  208.    HMENU hMenu;                         // output
  209.    UINT  wMenuDelta;                    // input
  210. } FMS_LOADA, FAR *LPFMS_LOADA;
  211.  
  212. typedef struct _FMS_LOADW {
  213.    DWORD dwSize;                        // for version checks
  214.    WCHAR szMenuName[MENU_TEXT_LEN];     // output
  215.    HMENU hMenu;                         // output
  216.    UINT  wMenuDelta;                    // input
  217. } FMS_LOADW, FAR *LPFMS_LOADW;
  218.  
  219. #ifdef UNICODE
  220. #define FMS_LOAD   FMS_LOADW
  221. #define LPFMS_LOAD LPFMS_LOADW
  222. #else
  223. #define FMS_LOAD   FMS_LOADA
  224. #define LPFMS_LOAD LPFMS_LOADA
  225. #endif
  226.  
  227.  
  228. // Toolbar definitions
  229.  
  230. typedef struct tagEXT_BUTTON {
  231.    WORD idCommand;                 /* menu command to trigger */
  232.    WORD idsHelp;                   /* help string ID */
  233.    WORD fsStyle;                   /* button style */
  234. } EXT_BUTTON, FAR *LPEXT_BUTTON;
  235.  
  236. typedef struct tagFMS_TOOLBARLOAD {
  237.    DWORD dwSize;                   /* for version checks */
  238.    LPEXT_BUTTON lpButtons;         /* output */
  239.    WORD cButtons;                  /* output, 0==>no buttons */
  240.    WORD cBitmaps;                  /* number of non-sep buttons */
  241.    WORD idBitmap;                  /* output */
  242.    HBITMAP hBitmap;                /* output if idBitmap==0 */
  243. } FMS_TOOLBARLOAD, FAR *LPFMS_TOOLBARLOAD;
  244.  
  245. typedef struct tagFMS_HELPSTRINGA {
  246.    INT   idCommand;       /* input, -1==>the menu was selected */
  247.    HMENU hMenu;           /* input, the extensions menu */
  248.    CHAR  szHelp[128];     /* output, the help string */
  249. } FMS_HELPSTRINGA, FAR *LPFMS_HELPSTRINGA;
  250.  
  251. typedef struct tagFMS_HELPSTRINGW {
  252.    INT   idCommand;       /* input, -1==>the menu was selected */
  253.    HMENU hMenu;           /* input, the extensions menu */
  254.    WCHAR szHelp[128];     /* output, the help string */
  255. } FMS_HELPSTRINGW, FAR *LPFMS_HELPSTRINGW;
  256.  
  257. #ifdef UNICODE
  258. #define FMS_HELPSTRING   FMS_HELPSTRINGW
  259. #define LPFMS_HELPSTRING LPFMS_HELPSTRINGW
  260. #else
  261. #define FMS_HELPSTRING   FMS_HELPSTRINGA
  262. #define LPFMS_HELPSTRING LPFMS_HELPSTRINGA
  263. #endif
  264.  
  265.  
  266. typedef DWORD (APIENTRY *FM_EXT_PROC)(HWND, WORD, LONG);
  267. typedef DWORD (APIENTRY *FM_UNDELETE_PROC)(HWND, LPTSTR);
  268.  
  269. #ifdef UNICODE
  270. LONG WINAPI FMExtensionProcW(HWND hwnd, WORD wEvent, LONG lParam);
  271. #else
  272. LONG WINAPI FMExtensionProc(HWND hwnd, WORD wEvent, LONG lParam);
  273. #endif
  274.  
  275. #ifdef __cplusplus
  276. }                  /* End of extern "C" { */
  277. #endif             /* __cplusplus */
  278.  
  279. #endif             /* _INC_WFEXT */
  280. #endif  /* __FLAT__ */
  281.