Create this branch to work on loading of different Kernel-Debugger DLL providers...
[reactos.git] / dll / win32 / comdlg32 / filedlgbrowser.h
1 /*
2 * Implementation of IShellBrowser for the File Open common dialog
3 *
4 * Copyright 1999 Francois Boisvert
5 * Copyright 1999, 2000 Juergen Schmied
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22 #ifndef SHBROWSER_H
23 #define SHBROWSER_H
24
25 #define WIN32_NO_STATUS
26 #define _INC_WINDOWS
27 #define COM_NO_WINDOWS_H
28
29 //#ifndef RC_INVOKED
30 //#include <stdarg.h>
31 //#endif
32
33 //#include "windef.h"
34 //#include "winbase.h"
35 //#include "winuser.h"
36 #include <shlobj.h>
37 //#include "objbase.h"
38 //#include "commdlg.h"
39
40 /***********************************************************************
41 * Defines and global variables
42 */
43
44 /* dialog internal property */
45
46 #define FODPROP_SAVEDLG 0x0001 /* File dialog is a Save file dialog */
47 #define FODPROP_USEVIEW 0x0002 /* Indicates the user selection must be taken
48 from the IShellView */
49
50 /***********************************************************************
51 * Data structure
52 */
53
54
55 typedef struct
56 {
57 LPOPENFILENAMEW ofnInfos;
58 BOOL unicode;
59 LPWSTR initdir;
60 LPWSTR filename;
61 LPCWSTR title;
62 LPCWSTR defext;
63 LPCWSTR filter;
64 LPCWSTR customfilter;
65 SIZE sizedlg; /* remember the size of the dialog */
66 POINT initial_size; /* remember the initial size of the dialog */
67 struct {
68 IShellBrowser *FOIShellBrowser;
69 IShellFolder *FOIShellFolder;
70 IShellView *FOIShellView;
71 IDataObject *FOIDataObject;
72 } Shell;
73
74 struct {
75 HWND hwndOwner;
76 HWND hwndView;
77 FOLDERSETTINGS folderSettings;
78 LPITEMIDLIST pidlAbsCurrent;
79 LPWSTR lpstrCurrentFilter;
80 } ShellInfos;
81
82 struct {
83 HWND hwndFileTypeCB;
84 HWND hwndLookInCB;
85 HWND hwndFileName;
86 HWND hwndTB;
87 HWND hwndGrip;
88 HWND hwndCustomDlg;
89 DWORD dwDlgProp;
90 } DlgInfos;
91
92 struct {
93 UINT fileokstring;
94 UINT lbselchstring;
95 UINT helpmsgstring;
96 UINT sharevistring;
97 } HookMsg;
98
99 } FileOpenDlgInfos;
100
101 /***********************************************************************
102 * Control IDs
103 */
104 #define IDS_FILENOTFOUND 114
105 #define IDS_VERIFYFILE 115
106 #define IDS_CREATEFILE 116
107 #define IDS_OVERWRITEFILE 119
108 #define IDS_INVALID_FILENAME_TITLE 120
109 #define IDS_INVALID_FILENAME 121
110 #define IDS_PATHNOTEXISTING 122
111 #define IDS_FILENOTEXISTING 123
112
113 /* File Dialog Tooltips string IDs */
114
115 #define IDS_UPFOLDER 150
116 #define IDS_NEWFOLDER 151
117 #define IDS_LISTVIEW 152
118 #define IDS_REPORTVIEW 153
119 #define IDS_TODESKTOP 154
120
121 #define IDC_OPENREADONLY chx1
122
123 #define IDC_TOOLBARSTATIC stc1
124 #define IDC_FILETYPESTATIC stc2
125 #define IDC_FILENAMESTATIC stc3
126 #define IDC_LOOKINSTATIC stc4
127
128 #define IDC_SHELLSTATIC lst1
129
130 #define IDC_FILETYPE cmb1
131 #define IDC_LOOKIN cmb2
132
133 #define IDC_FILENAME edt1
134
135 #define IDC_TOOLBAR 1
136
137 /***********************************************************************
138 * Prototypes for the methods of the IShellBrowserImpl class
139 */
140 /* Constructor */
141 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner) DECLSPEC_HIDDEN;
142
143
144 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) DECLSPEC_HIDDEN;
145
146 /* Functions used by the EDIT box */
147 void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN;
148
149 /**************************************************************************
150 * External Prototypes
151 */
152 extern const char FileOpenDlgInfosStr[] DECLSPEC_HIDDEN;
153
154 extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN;
155 extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
156
157 extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
158 extern LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) DECLSPEC_HIDDEN;
159
160 #endif /*SHBROWSER_H*/