6 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * Based on Winefile, Copyright 2000 martin Fuchs <martin-fuchs@gmx.net>
35 #endif // _MSC_VER > 1000
41 ////////////////////////////////////////////////////////////////////////////////
43 #define MAX_LOADSTRING 100
44 #define BUFFER_LEN 1024
46 #define WM_DISPATCH_COMMAND 0xBF80
48 ////////////////////////////////////////////////////////////////////////////////
49 // range for drive bar command ids: 0x9000..0x90FF
50 #define ID_DRIVE_FIRST 0x9001
53 #define _NO_EXTENSIONS
56 IMG_NONE
=-1, IMG_FILE
=0, IMG_DOCUMENT
, IMG_EXECUTABLE
,
57 IMG_FOLDER
, IMG_OPEN_FOLDER
, IMG_FOLDER_PLUS
,IMG_OPEN_PLUS
, IMG_OPEN_MINUS
,
58 IMG_FOLDER_UP
, IMG_FOLDER_CUR
61 #define IMAGE_WIDTH 16
62 #define IMAGE_HEIGHT 13
65 #define IDW_STATUSBAR 0x100
66 #define IDW_TOOLBAR 0x101
67 #define IDW_DRIVEBAR 0x102
68 #define IDW_DRIVEBOX 0x103
70 #define IDW_FIRST_CHILD 0xC000 //0x200
72 #define IDW_TREE_LEFT 3
73 #define IDW_TREE_RIGHT 6
74 #define IDW_HEADER_LEFT 2
75 #define IDW_HEADER_RIGHT 5
77 #define IDW_STATUS_WINDOW 7
79 ////////////////////////////////////////////////////////////////////////////////
80 void _wsplitpath(const WCHAR
* path
, WCHAR
* drv
, WCHAR
* dir
, WCHAR
* name
, WCHAR
* ext
);
81 void _splitpath(const CHAR
* path
, CHAR
* drv
, CHAR
* dir
, CHAR
* name
, CHAR
* ext
);
84 #define _tsplitpath _wsplitpath
86 #define _tsplitpath _splitpath
89 ////////////////////////////////////////////////////////////////////////////////
92 OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT
= 0x01,
93 OPTIONS_MINIMISE_ON_USE
= 0x02,
94 OPTIONS_SAVE_ON_EXIT
= 0x04,
97 ////////////////////////////////////////////////////////////////////////////////
103 COL_ATTRIBUTES
= 0x08,
105 #ifdef _NO_EXTENSIONS
106 COL_ALL
= COL_SIZE
|COL_DATE
|COL_TIME
|COL_ATTRIBUTES
|COL_DOSNAMES
110 COL_ALL
= COL_SIZE
|COL_DATE
|COL_TIME
|COL_ATTRIBUTES
|COL_DOSNAMES
|COL_INDEX
|COL_LINKS
114 #define USE_GLOBAL_STRUCT
115 #ifdef USE_GLOBAL_STRUCT
136 TCHAR drives
[BUFFER_LEN
];
137 BOOL prescan_node
; //TODO
140 UINT wStringTableOffset
;
141 enum OPTION_FLAGS Options
;
145 extern WINFILE_GLOBALS Globals
;
147 #define STRINGID(id) (Globals.wStringTableOffset + 0x##id)
151 extern HINSTANCE hInstance
;
152 extern HACCEL hAccel
;
153 extern HWND hMainWnd
;
154 extern HMENU hMenuFrame
;
155 extern HMENU hWindowsMenu
;
156 extern HMENU hLanguageMenu
;
157 extern HMENU hMenuView
;
158 extern HMENU hMenuOptions
;
159 extern HWND hMDIClient
;
160 extern HWND hStatusBar
;
161 extern HWND hToolBar
;
162 extern HWND hDriveBar
;
165 extern TCHAR num_sep
;
166 extern SIZE spaceSize
;
167 extern HIMAGELIST himl
;
169 extern TCHAR drives
[BUFFER_LEN
];
170 extern BOOL prescan_node
; //TODO
172 extern LPCSTR lpszLanguage
;
173 extern UINT wStringTableOffset
;
179 extern UINT OemCodePage
;
180 extern UINT AnsiCodePage
;
181 extern LCID UserDefaultLCID
;
183 extern HINSTANCE hInst
;
184 extern TCHAR szTitle
[];
185 extern TCHAR szFrameClass
[];
186 extern TCHAR szChildClass
[];
189 void SetupStatusBar(BOOL bResize
);
190 void UpdateStatusBar(void);