home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / WFEXT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  6.2 KB  |  185 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * wfext.h -     Windows File Manager Extensions definitions                   *
  4. *                                                                             *
  5. *******************************************************************************/
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 6.0
  9.  *
  10.  *      Copyright (c) 1987, 1993 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __WFEXT_H       /* prevent multiple includes */
  16. #define __WFEXT_H
  17.  
  18. #ifndef __WINDOWS_H
  19. #include <windows.h>    /* <windows.h> must be included */
  20. #endif  /* __WINDOWS_H */
  21.  
  22. #if !defined(WINVER) || (WINVER < 0x030a)
  23. #error File Manager extensions require Windows 3.1
  24. #endif
  25.  
  26. #ifndef RC_INVOKED
  27. #pragma option -a-      /* Assume byte packing throughout */
  28. #endif  /* RC_INVOKED */
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {            /* Assume C declarations for C++ */
  32. #endif  /* __cplusplus */
  33.  
  34. #ifndef __FLAT__
  35.  
  36. #define MENU_TEXT_LEN           40
  37.  
  38. #define FMMENU_FIRST            1
  39. #define FMMENU_LAST             99
  40.  
  41. #define FMEVENT_LOAD            100
  42. #define FMEVENT_UNLOAD          101
  43. #define FMEVENT_INITMENU        102
  44. #define FMEVENT_USER_REFRESH    103
  45. #define FMEVENT_SELCHANGE       104
  46.  
  47. #define FMFOCUS_DIR             1
  48. #define FMFOCUS_TREE            2
  49. #define FMFOCUS_DRIVES          3
  50. #define FMFOCUS_SEARCH          4
  51.  
  52. #define FM_GETFOCUS             (WM_USER + 0x0200)
  53. #define FM_GETDRIVEINFO         (WM_USER + 0x0201)
  54. #define FM_GETSELCOUNT          (WM_USER + 0x0202)
  55. #define FM_GETSELCOUNTLFN       (WM_USER + 0x0203)      /* LFN versions are odd */
  56. #define FM_GETFILESEL           (WM_USER + 0x0204)
  57. #define FM_GETFILESELLFN        (WM_USER + 0x0205)      /* LFN versions are odd */
  58. #define FM_REFRESH_WINDOWS      (WM_USER + 0x0206)
  59. #define FM_RELOAD_EXTENSIONS    (WM_USER + 0x0207)
  60.  
  61. typedef struct tagFMS_GETFILESEL
  62. {
  63.         UINT wTime;
  64.         UINT wDate;
  65.         DWORD dwSize;
  66.         BYTE bAttr;
  67.         char szName[260];               /* always fully qualified */
  68. } FMS_GETFILESEL, FAR *LPFMS_GETFILESEL;
  69.  
  70. typedef struct tagFMS_GETDRIVEINFO       /* for drive */
  71. {
  72.         DWORD dwTotalSpace;
  73.         DWORD dwFreeSpace;
  74.         char szPath[260];               /* current directory */
  75.         char szVolume[14];              /* volume label */
  76.         char szShare[128];              /* if this is a net drive */
  77. } FMS_GETDRIVEINFO, FAR *LPFMS_GETDRIVEINFO;
  78.  
  79. typedef struct tagFMS_LOAD
  80. {
  81.         DWORD dwSize;                           /* for version checks */
  82.         char  szMenuName[MENU_TEXT_LEN];        /* output */
  83.         HMENU hMenu;                            /* output */
  84.         UINT  wMenuDelta;                       /* input */
  85. } FMS_LOAD, FAR *LPFMS_LOAD;
  86.  
  87. typedef DWORD (CALLBACK *FM_EXT_PROC)(HWND, UINT, LONG);
  88. typedef DWORD (CALLBACK *FM_UNDELETE_PROC)(HWND, LPSTR);
  89.  
  90. #else  /* __FLAT__  */
  91.  
  92. #define MENU_TEXT_LEN           40
  93.  
  94. #define FMMENU_FIRST            1
  95. #define FMMENU_LAST             99
  96.  
  97. #define FMEVENT_LOAD            100
  98. #define FMEVENT_UNLOAD          101
  99. #define FMEVENT_INITMENU        102
  100. #define FMEVENT_USER_REFRESH    103
  101. #define FMEVENT_SELCHANGE       104
  102. #define FMEVENT_TOOLBARLOAD     105
  103. #define FMEVENT_HELPSTRING      106
  104. #define FMEVENT_HELPMENUITEM    107
  105.  
  106. #define FMFOCUS_DIR             1
  107. #define FMFOCUS_TREE            2
  108. #define FMFOCUS_DRIVES          3
  109. #define FMFOCUS_SEARCH          4
  110.  
  111. #define FM_GETFOCUS           (WM_USER + 0x0200)
  112. #define FM_GETDRIVEINFO       (WM_USER + 0x0201)
  113. #define FM_GETSELCOUNT        (WM_USER + 0x0202)
  114. #define FM_GETSELCOUNTLFN     (WM_USER + 0x0203)  /* LFN versions are odd */
  115. #define FM_GETFILESEL         (WM_USER + 0x0204)
  116. #define FM_GETFILESELLFN      (WM_USER + 0x0205)  /* LFN versions are odd */
  117. #define FM_REFRESH_WINDOWS    (WM_USER + 0x0206)
  118. #define FM_RELOAD_EXTENSIONS  (WM_USER + 0x0207)
  119.  
  120.  
  121. typedef struct _FMS_GETFILESEL {
  122.    FILETIME ftTime ;
  123.    DWORD dwSize;
  124.    BYTE bAttr;
  125.    CHAR  szName[260];               // always fully qualified
  126. } FMS_GETFILESEL, FAR *LPFMS_GETFILESEL;
  127.  
  128. typedef struct _FMS_GETDRIVEINFO {       // for drive
  129.    DWORD dwTotalSpace;
  130.    DWORD dwFreeSpace;
  131.    CHAR  szPath[260];                    // current directory
  132.    CHAR  szVolume[14];                   // volume label
  133.    CHAR  szShare[128];                   // if this is a net drive
  134. } FMS_GETDRIVEINFO, FAR *LPFMS_GETDRIVEINFO;
  135.  
  136. typedef struct _FMS_LOAD {
  137.    DWORD dwSize;                        // for version checks
  138.    CHAR  szMenuName[MENU_TEXT_LEN];     // output
  139.    HMENU hMenu;                         // output
  140.    UINT  wMenuDelta;                    // input
  141. } FMS_LOAD, FAR *LPFMS_LOAD;
  142.  
  143.  
  144. // Toolbar definitions
  145.  
  146. typedef struct tagEXT_BUTTON {
  147.    WORD idCommand;                 /* menu command to trigger */
  148.    WORD idsHelp;                   /* help string ID */
  149.    WORD fsStyle;                   /* button style */
  150. } EXT_BUTTON, FAR *LPEXT_BUTTON;
  151.  
  152. typedef struct tagFMS_TOOLBARLOAD {
  153.    DWORD dwSize;                   /* for version checks */
  154.    LPEXT_BUTTON lpButtons;         /* output */
  155.    WORD cButtons;                  /* output, 0==>no buttons */
  156.    WORD cBitmaps;                  /* number of non-sep buttons */
  157.    WORD idBitmap;                  /* output */
  158.    HBITMAP hBitmap;                /* output if idBitmap==0 */
  159. } FMS_TOOLBARLOAD, FAR *LPFMS_TOOLBARLOAD;
  160.  
  161. typedef struct tagFMS_HELPSTRING
  162. {
  163.    INT   idCommand;       /* input, -1==>the menu was selected */
  164.    HMENU hMenu;           /* input, the extensions menu */
  165.    CHAR  szHelp[128];     /* output, the help string */
  166. } FMS_HELPSTRING, FAR *LPFMS_HELPSTRING;
  167.  
  168. typedef DWORD (APIENTRY *FM_EXT_PROC)(HWND, WORD, LONG);
  169. typedef DWORD (APIENTRY *FM_UNDELETE_PROC)(HWND, LPSTR);
  170.  
  171. LONG WINAPI FMExtensionProc(HWND hwnd, WORD wEvent, LONG lParam);
  172.  
  173. #endif  /* __FLAT__ */
  174.  
  175. #ifdef __cplusplus
  176. }                       /* End of extern "C" { */
  177. #endif  /* __cplusplus */
  178.  
  179. #ifndef RC_INVOKED
  180. #pragma option -a.      /* Revert to default packing */
  181. #endif  /* RC_INVOKED */
  182.  
  183. #endif  /* __WFEXT_H */
  184.  
  185.