| 1 | /* $Id: filedlgbrowser.h,v 1.2 1999-11-02 20:37:43 sandervl Exp $ */ | 
|---|
| 2 | /* | 
|---|
| 3 | *  Implementation of IShellBrowser for the File Open common dialog | 
|---|
| 4 | * | 
|---|
| 5 | * | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef SHBROWSER_H | 
|---|
| 9 | #define SHBROWSER_H TRUE | 
|---|
| 10 |  | 
|---|
| 11 | #include "shlobj.h" | 
|---|
| 12 | #include "winbase.h" | 
|---|
| 13 | #include "objbase.h" | 
|---|
| 14 | #include "commdlg.h" | 
|---|
| 15 |  | 
|---|
| 16 | /*********************************************************************** | 
|---|
| 17 | * Defines and global variables | 
|---|
| 18 | */ | 
|---|
| 19 | #define _ICOM_THIS_FromICommDlgBrowser(Class,name) Class* This = (Class*) (((char*)name)-sizeof(void *)) | 
|---|
| 20 |  | 
|---|
| 21 | /* dialog internal property */ | 
|---|
| 22 |  | 
|---|
| 23 | #define FODPROP_SAVEDLG 0x0001  /* File dialog is a Save file dialog */ | 
|---|
| 24 | #define FODPROP_USEVIEW 0x0002  /* Indicates the user selection must be taken | 
|---|
| 25 | from the IShellView */ | 
|---|
| 26 |  | 
|---|
| 27 | /*********************************************************************** | 
|---|
| 28 | * Data structure | 
|---|
| 29 | */ | 
|---|
| 30 |  | 
|---|
| 31 |  | 
|---|
| 32 | typedef struct | 
|---|
| 33 | { | 
|---|
| 34 |  | 
|---|
| 35 | ICOM_VTABLE(IShellBrowser)* lpVtbl;         /* IShellBrowser VTable */ | 
|---|
| 36 | ICOM_VTABLE(ICommDlgBrowser)* lpVtbl2;      /* ICommDlgBrowser VTable */ | 
|---|
| 37 | DWORD ref;                                  /* Reference counter */ | 
|---|
| 38 | HWND hwndOwner;                             /* Owner dialog of the interface */ | 
|---|
| 39 |  | 
|---|
| 40 | } IShellBrowserImpl; | 
|---|
| 41 |  | 
|---|
| 42 | typedef struct | 
|---|
| 43 | { | 
|---|
| 44 |  | 
|---|
| 45 | OPENFILENAMEA ofnInfos; | 
|---|
| 46 | struct { | 
|---|
| 47 | IShellBrowser *FOIShellBrowser; | 
|---|
| 48 | IShellFolder *FOIShellFolder; | 
|---|
| 49 | IShellView *FOIShellView; | 
|---|
| 50 | } Shell; | 
|---|
| 51 |  | 
|---|
| 52 | struct { | 
|---|
| 53 | HWND hwndOwner; | 
|---|
| 54 | HWND hwndView; | 
|---|
| 55 | RECT rectView; | 
|---|
| 56 | FOLDERSETTINGS folderSettings; | 
|---|
| 57 | LPITEMIDLIST pidlAbsCurrent; | 
|---|
| 58 | LPWSTR lpstrCurrentFilter; | 
|---|
| 59 | } ShellInfos; | 
|---|
| 60 |  | 
|---|
| 61 | struct { | 
|---|
| 62 | HWND hwndFileTypeCB; | 
|---|
| 63 | HWND hwndLookInCB; | 
|---|
| 64 | HWND hwndFileName; | 
|---|
| 65 | DWORD dwDlgProp; | 
|---|
| 66 | } DlgInfos; | 
|---|
| 67 |  | 
|---|
| 68 | } FileOpenDlgInfos; | 
|---|
| 69 |  | 
|---|
| 70 | /*********************************************************************** | 
|---|
| 71 | * Prototypes for the methods of the IShellBrowserImpl class | 
|---|
| 72 | */ | 
|---|
| 73 | /* Constructor */ | 
|---|
| 74 | IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner); | 
|---|
| 75 |  | 
|---|
| 76 | /* IUnknown */ | 
|---|
| 77 | HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, | 
|---|
| 78 | REFIID riid, | 
|---|
| 79 | LPVOID *ppvObj); | 
|---|
| 80 |  | 
|---|
| 81 | ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface); | 
|---|
| 82 |  | 
|---|
| 83 | ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface); | 
|---|
| 84 |  | 
|---|
| 85 | /* IOleWindow */ | 
|---|
| 86 | HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface, | 
|---|
| 87 | HWND * phwnd); | 
|---|
| 88 |  | 
|---|
| 89 | HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser * iface, | 
|---|
| 90 | BOOL fEnterMode); | 
|---|
| 91 |  | 
|---|
| 92 | /* IShellBrowser */ | 
|---|
| 93 |  | 
|---|
| 94 | HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, | 
|---|
| 95 | LPCITEMIDLIST pidl, | 
|---|
| 96 | UINT wFlags); | 
|---|
| 97 |  | 
|---|
| 98 | HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, | 
|---|
| 99 | BOOL fEnable); | 
|---|
| 100 |  | 
|---|
| 101 | HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface, | 
|---|
| 102 | UINT id, | 
|---|
| 103 | HWND *lphwnd); | 
|---|
| 104 |  | 
|---|
| 105 | HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, | 
|---|
| 106 | DWORD grfMode, | 
|---|
| 107 | LPSTREAM *ppStrm); | 
|---|
| 108 |  | 
|---|
| 109 | HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, | 
|---|
| 110 | HMENU hmenuShared, | 
|---|
| 111 | LPOLEMENUGROUPWIDTHS lpMenuWidths); | 
|---|
| 112 |  | 
|---|
| 113 | HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, | 
|---|
| 114 | IShellView *ppshv); | 
|---|
| 115 |  | 
|---|
| 116 |  | 
|---|
| 117 | HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, | 
|---|
| 118 | IShellView **ppshv); | 
|---|
| 119 |  | 
|---|
| 120 | HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, | 
|---|
| 121 | HMENU hmenuShared); | 
|---|
| 122 |  | 
|---|
| 123 | HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, | 
|---|
| 124 | UINT id, | 
|---|
| 125 | UINT uMsg, | 
|---|
| 126 | WPARAM wParam, | 
|---|
| 127 | LPARAM lParam, | 
|---|
| 128 | LRESULT *pret); | 
|---|
| 129 |  | 
|---|
| 130 | HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, | 
|---|
| 131 | HMENU hmenuShared, | 
|---|
| 132 | HOLEMENU holemenuReserved, | 
|---|
| 133 | HWND hwndActiveObject); | 
|---|
| 134 |  | 
|---|
| 135 | HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, | 
|---|
| 136 | LPCOLESTR lpszStatusText); | 
|---|
| 137 |  | 
|---|
| 138 |  | 
|---|
| 139 | HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface, | 
|---|
| 140 | LPTBBUTTON lpButtons, | 
|---|
| 141 | UINT nButtons, | 
|---|
| 142 | UINT uFlags); | 
|---|
| 143 |  | 
|---|
| 144 | HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, | 
|---|
| 145 | LPMSG lpmsg, | 
|---|
| 146 | WORD wID); | 
|---|
| 147 |  | 
|---|
| 148 |  | 
|---|
| 149 | /* ICommDlgBrowser */ | 
|---|
| 150 |  | 
|---|
| 151 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface, | 
|---|
| 152 | REFIID riid, | 
|---|
| 153 | LPVOID *ppvObj); | 
|---|
| 154 |  | 
|---|
| 155 | ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface); | 
|---|
| 156 |  | 
|---|
| 157 | ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface); | 
|---|
| 158 |  | 
|---|
| 159 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface, | 
|---|
| 160 | IShellView *ppshv); | 
|---|
| 161 |  | 
|---|
| 162 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface, | 
|---|
| 163 | IShellView *ppshv, | 
|---|
| 164 | ULONG uChange); | 
|---|
| 165 |  | 
|---|
| 166 | HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, | 
|---|
| 167 | IShellView * ppshv, | 
|---|
| 168 | LPCITEMIDLIST pidl); | 
|---|
| 169 |  | 
|---|
| 170 |  | 
|---|
| 171 |  | 
|---|
| 172 | LPITEMIDLIST GetSelectedPidl(IShellView *ppshv); | 
|---|
| 173 |  | 
|---|
| 174 | #endif /*SHBROWSER_H*/ | 
|---|