--- mstools/samples/filer/globals.h 2018/08/09 18:20:59 1.1 +++ mstools/samples/filer/globals.h 2018/08/09 18:24:29 1.1.1.2 @@ -1,18 +1,14 @@ -/******************************Module*Header*******************************\ -* Module Name: globals.h -* -* Header file -* -* Created: 5-05-92 -* Author: Colin Stuart [] -* -* Copyright (c) 1992 Microsoft Corporation -* -* -* -* Dependencies: -* -\**************************************************************************/ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + #include // @@ -26,7 +22,7 @@ #define UI_FILERICON 2001 // -// DialogBox IDs +// DialogBox Control IDs // #define SB_OK 3001 #define SB_CANCEL 3002 @@ -35,16 +31,19 @@ #define SB_SOURCE 3005 #define SB_DEST 3006 #define SB_STATIC 3007 +#define SB_KEY 3008 +#define SB_VALUE 3009 +#define SB_SCROLL 3010 // // String Table IDs // -#define STR_EXE 2001 -#define STR_COM 2002 -#define STR_CMD 2003 -#define STR_BAT 2004 +#define STR_EXE 4001 +#define STR_COM 4002 +#define STR_CMD 4003 +#define STR_BAT 4004 -#define STR_DEF_EDITOR 2101 +#define STR_DEF_EDITOR 4101 // // Bitmap IDs @@ -60,11 +59,12 @@ #define UB_FIXED2 5008 // -// Drv-CHILD child window IDs +// Command line window and Drv-CHILD child window IDs // -#define TEXT_WINDOW_ID 6001 -#define LISTL_ID 6002 -#define LISTR_ID 6003 +#define COMMAND_ID 6001 // Command Line Window +#define TEXT_WINDOW_ID 6002 // Title Bar +#define LISTDIR_ID 6003 // Directory ListBox +#define LISTFILE_ID 6004 // File ListBox // // Internal Main window IDs @@ -82,12 +82,16 @@ #define MM_RENAME 8005 #define MM_MKDIR 8006 #define MM_DELDIR 8007 +#define MM_VERSION 8008 +#define MM_EXIT 8009 #define MM_REFRESH 8101 #define MM_ACTIVEDRV 8102 #define MM_TAB 8103 #define MM_SWAP 8104 #define MM_ORIENT 8105 +#define MM_EXPAND 8106 +#define MM_KEEPCMD 8107 #define MM_ESCAPE 8112 #define MM_TOGGLE 8113 @@ -110,9 +114,9 @@ #define DRIVE_BITMAP_HEIGHT 14 // assoc. w/ bitmap IDs above. #define DRIVE_LETTER_SPACING 2 // Space between drv bmp and drv letter label #define DRIVE_BITMAP_SPACING 6 // Space on either side of drv bitmap-labels -#define NUM_BITMAPS 8 // Number of Drive Bitmaps to be loaded. +#define NUM_BITMAPS 8 // # types of Drive Bitmaps to be loaded. -#define DIRECTORY_STRING_SIZE 100 // Size of max allowable direcory path +#define DIRECTORY_STRING_SIZE MAX_PATH // Size of max allowable direcory path #define LIST_BORDER 2 // Space between listbox and Drv child frame @@ -134,17 +138,25 @@ #define NUM_POSSIBLE_REMOVABLE_DRIVES 26 // A-Z -#define MSEC_WAIT_RD 3000 // Msecs to wait for +#define MUTEX_TIMEOUT 50 // LB Mutex timeout in milliseconds + +// The following are used in the .EXE Version retrieval code in DRVPROC.C +#define NUM_VERSION_INFO_KEYS 12 // See FilerGetVersion() +#define VERSION_DLG_LB_HEIGHT 10 // height in text lines of version dlg LBs + +#define VERSION_INFO_KEY_ROOT TEXT("\\StringFileInfo\\") +#define VERSION_INFO_LANG_ID TEXT("040904B0") +// end .EXE Version code constants // // Drive enumeration strucure // typedef struct _PerDriveInfo { - char DriveLetter; - LPSTR DriveName; - char FileSystem[FILE_SYSTEM_STRING_SIZE]; + TCHAR DriveLetter; + LPTSTR DriveName; + TCHAR FileSystem[FILE_SYSTEM_STRING_SIZE]; UINT DriveType; struct _PerDriveInfo *next; } DRVINFO, *LPDINFO; @@ -153,16 +165,20 @@ typedef struct _PerDriveInfo { // Instance data for each Drv child window // typedef struct _PerWndInfo { - HWND hParent; - HWND hTextWnd; - HWND hwndLL; - HWND hwndLR; - HANDLE hDirThread; - BOOL fAlive; - CRITICAL_SECTION CritSecL; - CRITICAL_SECTION CritSecR; - LPDINFO lpDriveInfo; - CHAR CaptionBarText[DIRECTORY_STRING_SIZE]; + HWND hwnd; // Handle to Drive child window + HWND hParent; // Handle to Filer main window + HWND hTextWnd; // Handle to Drive child Title Bar + HWND hFileLB; // Handle to Drv child File LB + HWND hDirLB; // Handle to Drv child Dir LB + HANDLE hDirThread; // Handle to ExpDir or FullExpand thread + HANDLE hDirMutex; // Protects Dir LB from mult. access + HANDLE hFileMutex; // Protects File LB from mult. access + BOOL fDirLeft; // Flag: the Dir LB is on left + BOOL fDirExpand; // Flag: the Dir LB is fully expanded + BOOL fSuicide; // Flag: kills ExpDir/FullExpand thread + BOOL fEscape; // Flag: User aborted Expand thread + LPDINFO lpDriveInfo; // pointer to current _PerDriveInfo + TCHAR CaptionBarText[DIRECTORY_STRING_SIZE]; // Drv Child Title text } DRVCHILDINFO, *LPCINFO; typedef struct _PerButtonInfo { @@ -175,6 +191,12 @@ typedef struct _PerButtonInfo { typedef struct _SelectDlgInfo { HWND hwnd; DWORD dwAction; - LPSTR szAction; - LPSTR szToFrom; + LPTSTR szAction; + LPTSTR szToFrom; } SELECTINFO, *LPSINFO; + +// .EXE version information key structure: for FilerGetVersion() in DRVPROC.C +typedef struct _VersionKeyInfo { + TCHAR const *szKey; + TCHAR *szValue; +} VKINFO, *LPVKINFO;