4ac957eb738b5d0ec9edb02a4ebc9c7e6ddf3eb2
[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 BOOL ole_initialized;
85 } FileOpenDlgInfos;
86
87 /***********************************************************************
88 * Control IDs
89 */
90 #define IDS_FILENOTFOUND 114
91 #define IDS_VERIFYFILE 115
92 #define IDS_CREATEFILE 116
93 #define IDS_OVERWRITEFILE 119
94 #define IDS_INVALID_FILENAME_TITLE 120
95 #define IDS_INVALID_FILENAME 121
96 #define IDS_PATHNOTEXISTING 122
97 #define IDS_FILENOTEXISTING 123
98 #define IDS_INVALID_FOLDERNAME 124
99
100 /* File Dialog Tooltips string IDs */
101
102 #define IDS_UPFOLDER 150
103 #define IDS_NEWFOLDER 151
104 #define IDS_LISTVIEW 152
105 #define IDS_REPORTVIEW 153
106 #define IDS_TODESKTOP 154
107
108 #define IDC_OPENREADONLY chx1
109
110 #define IDC_TOOLBARSTATIC stc1
111 #define IDC_FILETYPESTATIC stc2
112 #define IDC_FILENAMESTATIC stc3
113 #define IDC_LOOKINSTATIC stc4
114
115 #define IDC_SHELLSTATIC lst1
116
117 #define IDC_FILETYPE cmb1
118 #define IDC_LOOKIN cmb2
119
120 #define IDC_FILENAME edt1
121
122 #define IDC_TOOLBAR 1
123
124 /***********************************************************************
125 * Prototypes for the methods of the IShellBrowserImpl class
126 */
127 /* Constructor */
128 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner) DECLSPEC_HIDDEN;
129
130
131 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) DECLSPEC_HIDDEN;
132
133 /* Functions used by the EDIT box */
134 void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN;
135
136 /**************************************************************************
137 * External Prototypes
138 */
139 extern FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd) DECLSPEC_HIDDEN;
140
141 extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN;
142 extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
143
144 extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl) DECLSPEC_HIDDEN;
145 extern LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) DECLSPEC_HIDDEN;
146
147 #endif /*SHBROWSER_H*/