Sync up with trunk r61578.
[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 /***********************************************************************
26 * Defines and global variables
27 */
28
29 /* dialog internal property */
30
31 #define FODPROP_SAVEDLG 0x0001 /* File dialog is a Save file dialog */
32 #define FODPROP_USEVIEW 0x0002 /* Indicates the user selection must be taken
33 from the IShellView */
34
35 /***********************************************************************
36 * Data structure
37 */
38
39
40 typedef struct
41 {
42 LPOPENFILENAMEW ofnInfos;
43 BOOL unicode;
44 LPWSTR initdir;
45 LPWSTR filename;
46 LPCWSTR title;
47 LPCWSTR defext;
48 LPCWSTR filter;
49 LPCWSTR customfilter;
50 SIZE sizedlg; /* remember the size of the dialog */
51 POINT initial_size; /* remember the initial size of the dialog */
52 struct {
53 IShellBrowser *FOIShellBrowser;
54 IShellFolder *FOIShellFolder;
55 IShellView *FOIShellView;
56 IDataObject *FOIDataObject;
57 } Shell;
58
59 struct {
60 HWND hwndOwner;
61 HWND hwndView;
62 FOLDERSETTINGS folderSettings;
63 LPITEMIDLIST pidlAbsCurrent;
64 LPWSTR lpstrCurrentFilter;
65 } ShellInfos;
66
67 struct {
68 HWND hwndFileTypeCB;
69 HWND hwndLookInCB;
70 HWND hwndFileName;
71 HWND hwndTB;
72 HWND hwndGrip;
73 HWND hwndCustomDlg;
74 DWORD dwDlgProp;
75 } DlgInfos;
76
77 struct {
78 UINT fileokstring;
79 UINT lbselchstring;
80 UINT helpmsgstring;
81 UINT sharevistring;
82 } HookMsg;
83
84 } FileOpenDlgInfos;
85
86 /***********************************************************************
87 * Control IDs
88 */
89 #define IDS_FILENOTFOUND 114
90 #define IDS_VERIFYFILE 115
91 #define IDS_CREATEFILE 116
92 #define IDS_OVERWRITEFILE 119
93 #define IDS_INVALID_FILENAME_TITLE 120
94 #define IDS_INVALID_FILENAME 121
95 #define IDS_PATHNOTEXISTING 122
96 #define IDS_FILENOTEXISTING 123
97
98 /* File Dialog Tooltips string IDs */
99
100 #define IDS_UPFOLDER 150
101 #define IDS_NEWFOLDER 151
102 #define IDS_LISTVIEW 152
103 #define IDS_REPORTVIEW 153
104 #define IDS_TODESKTOP 154
105
106 #define IDC_OPENREADONLY chx1
107
108 #define IDC_TOOLBARSTATIC stc1
109 #define IDC_FILETYPESTATIC stc2
110 #define IDC_FILENAMESTATIC stc3
111 #define IDC_LOOKINSTATIC stc4
112
113 #define IDC_SHELLSTATIC lst1
114
115 #define IDC_FILETYPE cmb1
116 #define IDC_LOOKIN cmb2
117
118 #define IDC_FILENAME edt1
119
120 #define IDC_TOOLBAR 1
121
122 /***********************************************************************
123 * Prototypes for the methods of the IShellBrowserImpl class
124 */
125 /* Constructor */
126 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner) DECLSPEC_HIDDEN;
127
128
129 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) DECLSPEC_HIDDEN;
130
131 /* Functions used by the EDIT box */
132 void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN;
133
134 /**************************************************************************
135 * External Prototypes
136 */
137 extern const char FileOpenDlgInfosStr[] DECLSPEC_HIDDEN;
138
139 extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN;
140 extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
141
142 extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
143 extern LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) DECLSPEC_HIDDEN;
144
145 #endif /*SHBROWSER_H*/