GLOBALS.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:6k
源码类别:

Windows编程

开发平台:

Visual C++

  1. // GLOBALS.H
  2. #ifndef GLOBALS_INCLUDED
  3. #define GLOBALS_INCLUDED
  4. #include "TABLE.H"
  5. #define DEBUGMSGS
  6. #define DEBUGGING
  7. #define NOSTRICT
  8. #define BUF_SIZE 1000
  9. #define PATH_SIZE 600
  10. #define HEADER_SIZE 256
  11. #define SHA_SIZE 20
  12. #define RANDOM_NAME_LENGTH 8
  13. #define EXPORTER
  14. #define ENCRYPT_DECRYPT 1
  15. #define SIGN 2
  16. #define VERIFY 3
  17. #define MAXBLOBLEN 200
  18. //
  19. // Accellerator IDs
  20. //
  21. #define ACCEL_ID        1001
  22. //
  23. // Icon IDs
  24. //
  25. #define UI_CRYPTFILERICON    2001
  26. //
  27. // DialogBox Control IDs
  28. //
  29. #define SB_OK           3001
  30. #define SB_CANCEL       3002
  31. #define SB_ACTION       3003
  32. #define SB_TOFROM       3004
  33. #define SB_SOURCE       3005
  34. #define SB_DEST         3006
  35. #define SB_STATIC       3007
  36. #define SB_KEY          3008
  37. #define SB_VALUE        3009
  38. #define SB_SCROLL       3010
  39. //
  40. // String Table IDs
  41. //
  42. #define STR_EXE         4001
  43. #define STR_COM         4002
  44. #define STR_CMD         4003
  45. #define STR_BAT         4004
  46. #define STR_DEF_EDITOR  4101
  47. //
  48. // Bitmap IDs
  49. //
  50. #define UB_BMP_MARKER   5001    // This should be the same as the first bitmap.
  51. #define UB_FLOPPY1      5001    // THESE BITMAP IDs MUST BE CONTIGUOUS AND
  52. #define UB_FLOPPY2      5002    //   IN THIS ORDER!  For 'ease of loading'.
  53. #define UB_REMOTE1      5003
  54. #define UB_REMOTE2      5004
  55. #define UB_CD1          5005
  56. #define UB_CD2          5006
  57. #define UB_FIXED1       5007
  58. #define UB_FIXED2       5008
  59. //
  60. // Command line window and Drv-CHILD child window IDs
  61. //
  62. #define COMMAND_ID      6001    // Command Line Window
  63. #define TEXT_WINDOW_ID  6002    // Title Bar
  64. #define LISTDIR_ID      6003    // Directory ListBox
  65. #define LISTFILE_ID     6004    // File ListBox
  66. //
  67. // Internal Main window IDs
  68. //
  69. #define MM_FILLDIR      7001
  70. #define MM_FILLFILE     7002
  71. //
  72. // Menu ID's, VKEYs, & other WM_COMMAND messages
  73. //
  74. #define MM_COPY         8002
  75. #define MM_DELETE       8003
  76. #define MM_MOVE         8004
  77. #define MM_RENAME       8005
  78. #define MM_MKDIR        8006
  79. #define MM_DELDIR       8007
  80. #define MM_VERSION      8008
  81. #define MM_EXIT         8009
  82. #define MM_REFRESH      8101
  83. #define MM_ACTIVEDRV    8102
  84. #define MM_TAB          8103
  85. #define MM_SWAP         8104
  86. #define MM_ORIENT       8105
  87. #define MM_EXPAND       8106
  88. #define MM_KEEPCMD      8107
  89. #define MM_ESCAPE       8112
  90. #define MM_TOGGLE       8113
  91. #define MM_ABOUT        8201
  92. #define MM_DRIVE_NUM    8301       // ...Through 8226, one for each drive letter
  93.                     //   .
  94.                     //   .
  95.                     //  8326
  96. //
  97. // constants
  98. //
  99. #define MAIN_WIDTH          605    // Default width and height of main window
  100. #define MAIN_HEIGHT         400
  101. #define DRIVE_BITMAP_WIDTH  23     // Width and height of drive toolbar bitmaps
  102. #define DRIVE_BITMAP_HEIGHT 14     //   assoc. w/ bitmap IDs above.
  103. #define DRIVE_LETTER_SPACING 2     // Space between drv bmp and drv letter label
  104. #define DRIVE_BITMAP_SPACING 6     // Space on either side of drv bitmap-labels
  105. #define NUM_BITMAPS          8     // # types of Drive Bitmaps to be loaded.
  106. #define DIRECTORY_STRING_SIZE MAX_PATH  // Size of max allowable direcory path
  107. #define LIST_BORDER         2      // Space between listbox and Drv child frame
  108. #define DRIVE_MENU_NUM      2      // This is the 'Drives' submenu
  109. #define LISTBOX_TAB_SIZE    8      // Size of the tabs in the Drv child LBs
  110. #define OVER_UNDER          0      // Relative positions of Drv children
  111. #define SIDE_BY_SIDE        1
  112. #define BOLD_FONT           700    // GetDeviceCaps sez this value is for bold
  113.                                    //   in the lfWeight LOGFONT member
  114. #define NUM_EXTENSION_STRINGS   4  // Lists number of file ext. in stringtable
  115. #define EXTENSION_LENGTH        5  // Tot. number of characters in extension,
  116.                                    //  including '' char.
  117. #define FILE_SYSTEM_STRING_SIZE         20      // Must be >= 8
  118. #define NUM_POSSIBLE_REMOVABLE_DRIVES   26      // A-Z
  119. #define MUTEX_TIMEOUT       50     // LB Mutex timeout in milliseconds
  120. // The following are used in the .EXE Version retrieval code in DRVPROC.C
  121. #define NUM_VERSION_INFO_KEYS    12     // See FilerGetVersion()
  122. #define VERSION_DLG_LB_HEIGHT    10     // height in text lines of version dlg LBs
  123. #define VERSION_INFO_KEY_ROOT    TEXT("\StringFileInfo\")
  124. #define VERSION_INFO_LANG_ID  TEXT("040904B0")
  125. // end .EXE Version code constants
  126. //
  127. // Drive enumeration strucure
  128. //
  129. typedef struct _PerDriveInfo {
  130.     TCHAR   DriveLetter;
  131.     LPTSTR  DriveName;
  132.     UINT    DriveType;
  133.     struct _PerDriveInfo *next;
  134. } DRVINFO, *LPDINFO;
  135. //
  136. // Instance data for each Drv child window
  137. //
  138. typedef struct _PerWndInfo {
  139.     HWND    hwnd;                       // Handle to Drive child window
  140.     HWND    hParent;                    // Handle to Filer main window
  141.     HWND    hTextWnd;                   // Handle to Drive child Title Bar
  142.     HWND    hFileLB;                    // Handle to Drv child File LB
  143.     HWND    hDirLB;                     // Handle to Drv child Dir LB
  144.     HANDLE  hDirThread;                 // Handle to ExpDir or FullExpand thread
  145.     HANDLE  hDirMutex;                  // Protects Dir LB from mult. access
  146.     HANDLE  hFileMutex;                 // Protects File LB from mult. access
  147.     BOOL    fDirLeft;                   // Flag: the Dir LB is on left
  148.     BOOL    fDirExpand;                 // Flag: the Dir LB is fully expanded
  149.     BOOL    fSuicide;                   // Flag: kills ExpDir/FullExpand thread
  150.     BOOL    fEscape;                    // Flag: User aborted Expand thread
  151.     LPDINFO lpDriveInfo;                // pointer to current _PerDriveInfo
  152.     TCHAR   CaptionBarText[BUF_SIZE];  // Drv Child Title text
  153. TABLE DirTable;
  154. TABLE FileTable;
  155. } DRVCHILDINFO, *LPCINFO;
  156. typedef struct _PerButtonInfo {
  157.     HANDLE          hButton;
  158.     BOOL            fButtonDown;
  159.     LPDINFO         lpDrive;
  160.     struct _PerButtonInfo  *next;
  161. }   BINFO, *LPBINFO;
  162. typedef struct _SelectDlgInfo {
  163.     HWND    hwnd;
  164.     DWORD   dwAction;
  165.     LPTSTR  szAction;
  166.     LPTSTR  szToFrom;
  167. } SELECTINFO, *LPSINFO;
  168. //  .EXE version information key structure: for FilerGetVersion() in DRVPROC.C
  169. typedef struct _VersionKeyInfo {
  170.     TCHAR const *szKey;
  171.     TCHAR       *szValue;
  172. } VKINFO, *LPVKINFO;
  173. #endif