| 1 | /*
|
|---|
| 2 | * Implementation of IShellBrowser for the File Open common dialog
|
|---|
| 3 | *
|
|---|
| 4 | * Corel WINE 20000324 level
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #ifndef SHBROWSER_H
|
|---|
| 8 | #define SHBROWSER_H TRUE
|
|---|
| 9 |
|
|---|
| 10 | #include "shlobj.h"
|
|---|
| 11 | #include "winbase.h"
|
|---|
| 12 | #include "objbase.h"
|
|---|
| 13 | #include "commdlg.h"
|
|---|
| 14 |
|
|---|
| 15 | /***********************************************************************
|
|---|
| 16 | * Defines and global variables
|
|---|
| 17 | */
|
|---|
| 18 | #define _ICOM_THIS_FromICommDlgBrowser(Class,name) Class* This = (Class*) (((char*)name)-sizeof(void *))
|
|---|
| 19 |
|
|---|
| 20 | /* dialog internal property */
|
|---|
| 21 |
|
|---|
| 22 | #define FODPROP_SAVEDLG 0x0001 /* File dialog is a Save file dialog */
|
|---|
| 23 | #define FODPROP_USEVIEW 0x0002 /* Indicates the user selection must be taken
|
|---|
| 24 | from the IShellView */
|
|---|
| 25 |
|
|---|
| 26 | /***********************************************************************
|
|---|
| 27 | * Data structure
|
|---|
| 28 | */
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | typedef struct
|
|---|
| 32 | {
|
|---|
| 33 |
|
|---|
| 34 | ICOM_VTABLE(IShellBrowser)* lpVtbl; /* IShellBrowser VTable */
|
|---|
| 35 | ICOM_VTABLE(ICommDlgBrowser)* lpVtbl2; /* ICommDlgBrowser VTable */
|
|---|
| 36 | DWORD ref; /* Reference counter */
|
|---|
| 37 | HWND hwndOwner; /* Owner dialog of the interface */
|
|---|
| 38 |
|
|---|
| 39 | } IShellBrowserImpl;
|
|---|
| 40 |
|
|---|
| 41 | typedef struct
|
|---|
| 42 | {
|
|---|
| 43 |
|
|---|
| 44 | LPOPENFILENAMEA ofnInfos;
|
|---|
| 45 | struct {
|
|---|
| 46 | IShellBrowser *FOIShellBrowser;
|
|---|
| 47 | IShellFolder *FOIShellFolder;
|
|---|
| 48 | IShellView *FOIShellView;
|
|---|
| 49 | } Shell;
|
|---|
| 50 |
|
|---|
| 51 | struct {
|
|---|
| 52 | HWND hwndOwner;
|
|---|
| 53 | HWND hwndView;
|
|---|
| 54 | RECT rectView;
|
|---|
| 55 | FOLDERSETTINGS folderSettings;
|
|---|
| 56 | LPITEMIDLIST pidlAbsCurrent;
|
|---|
| 57 | LPWSTR lpstrCurrentFilter;
|
|---|
| 58 | } ShellInfos;
|
|---|
| 59 |
|
|---|
| 60 | struct {
|
|---|
| 61 | HWND hwndFileTypeCB;
|
|---|
| 62 | HWND hwndLookInCB;
|
|---|
| 63 | HWND hwndFileName;
|
|---|
| 64 | HWND hwndTB;
|
|---|
| 65 | HWND hwndCustomDlg;
|
|---|
| 66 | DWORD dwDlgProp;
|
|---|
| 67 | } DlgInfos;
|
|---|
| 68 |
|
|---|
| 69 | } FileOpenDlgInfos;
|
|---|
| 70 |
|
|---|
| 71 | /***********************************************************************
|
|---|
| 72 | * Control ID's
|
|---|
| 73 | */
|
|---|
| 74 | #define IDS_FILENOTFOUND 114
|
|---|
| 75 | #define IDS_VERIFYFILE 115
|
|---|
| 76 | #define IDS_CREATEFILE 116
|
|---|
| 77 | #define IDS_CREATEFOLDER_DENIED 117
|
|---|
| 78 | #define IDS_FILEOPEN_CAPTION 118
|
|---|
| 79 |
|
|---|
| 80 | /* File Dialog Tooltips string IDs */
|
|---|
| 81 |
|
|---|
| 82 | #define IDS_UPFOLDER 150
|
|---|
| 83 | #define IDS_NEWFOLDER 151
|
|---|
| 84 | #define IDS_LISTVIEW 152
|
|---|
| 85 | #define IDS_REPORTVIEW 153
|
|---|
| 86 |
|
|---|
| 87 | #define IDC_OPENREADONLY chx1
|
|---|
| 88 |
|
|---|
| 89 | #define IDC_TOOLBARSTATIC stc1
|
|---|
| 90 | #define IDC_FILETYPESTATIC stc2
|
|---|
| 91 | #define IDC_FILENAMESTATIC stc3
|
|---|
| 92 | #define IDC_LOOKINSTATIC stc4
|
|---|
| 93 |
|
|---|
| 94 | #define IDC_SHELLSTATIC lst1
|
|---|
| 95 |
|
|---|
| 96 | #define IDC_FILETYPE cmb1
|
|---|
| 97 | #define IDC_LOOKIN cmb2
|
|---|
| 98 |
|
|---|
| 99 | #define IDC_FILENAME edt1
|
|---|
| 100 |
|
|---|
| 101 | #define IDC_TOOLBAR ctl1
|
|---|
| 102 |
|
|---|
| 103 | /***********************************************************************
|
|---|
| 104 | * Prototypes for the methods of the IShellBrowserImpl class
|
|---|
| 105 | */
|
|---|
| 106 | /* Constructor */
|
|---|
| 107 | IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner);
|
|---|
| 108 |
|
|---|
| 109 | /* IUnknown */
|
|---|
| 110 | HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
|
|---|
| 111 | REFIID riid,
|
|---|
| 112 | LPVOID *ppvObj);
|
|---|
| 113 |
|
|---|
| 114 | ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface);
|
|---|
| 115 |
|
|---|
| 116 | ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface);
|
|---|
| 117 |
|
|---|
| 118 | /* IOleWindow */
|
|---|
| 119 | HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface,
|
|---|
| 120 | HWND * phwnd);
|
|---|
| 121 |
|
|---|
| 122 | HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser * iface,
|
|---|
| 123 | BOOL fEnterMode);
|
|---|
| 124 |
|
|---|
| 125 | /* IShellBrowser */
|
|---|
| 126 |
|
|---|
| 127 | HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
|
|---|
| 128 | LPCITEMIDLIST pidl,
|
|---|
| 129 | UINT wFlags);
|
|---|
| 130 |
|
|---|
| 131 | HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface,
|
|---|
| 132 | BOOL fEnable);
|
|---|
| 133 |
|
|---|
| 134 | HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface,
|
|---|
| 135 | UINT id,
|
|---|
| 136 | HWND *lphwnd);
|
|---|
| 137 |
|
|---|
| 138 | HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface,
|
|---|
| 139 | DWORD grfMode,
|
|---|
| 140 | LPSTREAM *ppStrm);
|
|---|
| 141 |
|
|---|
| 142 | HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface,
|
|---|
| 143 | HMENU hmenuShared,
|
|---|
| 144 | LPOLEMENUGROUPWIDTHS lpMenuWidths);
|
|---|
| 145 |
|
|---|
| 146 | HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface,
|
|---|
| 147 | IShellView *ppshv);
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 | HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface,
|
|---|
| 151 | IShellView **ppshv);
|
|---|
| 152 |
|
|---|
| 153 | HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface,
|
|---|
| 154 | HMENU hmenuShared);
|
|---|
| 155 |
|
|---|
| 156 | HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface,
|
|---|
| 157 | UINT id,
|
|---|
| 158 | UINT uMsg,
|
|---|
| 159 | WPARAM wParam,
|
|---|
| 160 | LPARAM lParam,
|
|---|
| 161 | LRESULT *pret);
|
|---|
| 162 |
|
|---|
| 163 | HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface,
|
|---|
| 164 | HMENU hmenuShared,
|
|---|
| 165 | HOLEMENU holemenuReserved,
|
|---|
| 166 | HWND hwndActiveObject);
|
|---|
| 167 |
|
|---|
| 168 | HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface,
|
|---|
| 169 | LPCOLESTR lpszStatusText);
|
|---|
| 170 |
|
|---|
| 171 |
|
|---|
| 172 | HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface,
|
|---|
| 173 | LPTBBUTTON lpButtons,
|
|---|
| 174 | UINT nButtons,
|
|---|
| 175 | UINT uFlags);
|
|---|
| 176 |
|
|---|
| 177 | HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface,
|
|---|
| 178 | LPMSG lpmsg,
|
|---|
| 179 | WORD wID);
|
|---|
| 180 |
|
|---|
| 181 |
|
|---|
| 182 | /* ICommDlgBrowser */
|
|---|
| 183 |
|
|---|
| 184 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface,
|
|---|
| 185 | REFIID riid,
|
|---|
| 186 | LPVOID *ppvObj);
|
|---|
| 187 |
|
|---|
| 188 | ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface);
|
|---|
| 189 |
|
|---|
| 190 | ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface);
|
|---|
| 191 |
|
|---|
| 192 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface,
|
|---|
| 193 | IShellView *ppshv);
|
|---|
| 194 |
|
|---|
| 195 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface,
|
|---|
| 196 | IShellView *ppshv,
|
|---|
| 197 | ULONG uChange);
|
|---|
| 198 |
|
|---|
| 199 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface,
|
|---|
| 200 | IShellView * ppshv,
|
|---|
| 201 | LPCITEMIDLIST pidl);
|
|---|
| 202 |
|
|---|
| 203 |
|
|---|
| 204 |
|
|---|
| 205 | LPITEMIDLIST GetSelectedPidl(IShellView *ppshv);
|
|---|
| 206 | BOOL EnumSelectedPidls(IShellView *ppshv, UINT nPidlIndex, LPITEMIDLIST *pidlSelected);
|
|---|
| 207 | UINT GetNumSelected(IShellView *ppshv);
|
|---|
| 208 |
|
|---|
| 209 | #endif /*SHBROWSER_H*/
|
|---|