Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

506 lines
23 KiB

  1. #ifndef _SHBROWS2_H
  2. #define _SHBROWS2_H
  3. #include "iface.h"
  4. #include "commonsb.h"
  5. #include "browmenu.h"
  6. #include "bsmenu.h"
  7. #include "fldset.h"
  8. #include <iethread.h>
  9. #define MAX_SB_TEXT_LEN 256
  10. class CIEFrameAuto;
  11. // Define structure to be used at head of state stream that is
  12. // not dependent on 16 or 32 bits...
  13. typedef struct _CABSHOLD // Cabinet Stream header
  14. {
  15. DWORD dwSize; // Offset to where the View streamed additional info
  16. // First stuff from the window placement
  17. DWORD flags;
  18. DWORD showCmd;
  19. POINTL ptMinPosition;
  20. POINTL ptMaxPosition;
  21. RECTL rcNormalPosition;
  22. // Stuff from Folder Settings;
  23. DWORD ViewMode; // View mode (FOLDERVIEWMODE values)
  24. DWORD fFlags; // View options (FOLDERFLAGS bits)
  25. DWORD TreeSplit; // Position of split in pixels
  26. // Hot Key
  27. DWORD dwHotkey; // Hotkey
  28. WINVIEW wv;
  29. } CABSHOLD;
  30. typedef struct _CABSH // Cabinet Stream header
  31. {
  32. DWORD dwSize; // Offset to where the View streamed additional info
  33. // First stuff from the window placement
  34. DWORD flags;
  35. DWORD showCmd;
  36. POINTL ptMinPosition;
  37. POINTL ptMaxPosition;
  38. RECTL rcNormalPosition;
  39. // Stuff from Folder Settings;
  40. DWORD ViewMode; // View mode (FOLDERVIEWMODE values)
  41. DWORD fFlags; // View options (FOLDERFLAGS bits)
  42. DWORD TreeSplit; // Position of split in pixels
  43. // Hot Key
  44. DWORD dwHotkey; // Hotkey
  45. WINVIEW wv;
  46. DWORD fMask; // Flags specifying which fields are valid
  47. SHELLVIEWID vid; // extended view id
  48. DWORD dwVersionId; // CABSH_VER below
  49. DWORD dwRevCount; // rev count of default settings when the folder was saved to the stream
  50. } CABSH;
  51. #define CABSHM_VIEWID 0x00000001
  52. #define CABSHM_VERSION 0x00000002
  53. #define CABSHM_REVCOUNT 0x00000004
  54. #define CABSH_VER 1 // change this version whenever we want to change defaults
  55. #define CABSH_WIN95_VER 0 // this was the pre-ie4 version number
  56. class CTheater;
  57. #define CSBSUPERCLASS CCommonBrowser
  58. #define CSHELLBROWSER CShellBrowser2
  59. class CShellBrowser2 :
  60. public CSBSUPERCLASS
  61. {
  62. public:
  63. // *** IUnknown methods ***
  64. virtual STDMETHODIMP_(ULONG) AddRef(void) { return CSBSUPERCLASS::AddRef(); };
  65. virtual STDMETHODIMP_(ULONG) Release(void) { return CSBSUPERCLASS::Release(); };
  66. // IShellBrowser (same as IOleInPlaceFrame)
  67. virtual STDMETHODIMP InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths);
  68. virtual STDMETHODIMP SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwnd);
  69. virtual STDMETHODIMP RemoveMenusSB(HMENU hmenuShared);
  70. virtual STDMETHODIMP EnableModelessSB(BOOL fEnable);
  71. virtual STDMETHODIMP GetViewStateStream(DWORD grfMode, IStream **ppstm);
  72. virtual STDMETHODIMP GetControlWindow(UINT id, HWND * lphwnd);
  73. virtual STDMETHODIMP SendControlMsg(UINT id, UINT uMsg, WPARAM wParam,
  74. LPARAM lParam, LRESULT *pret);
  75. virtual STDMETHODIMP SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags);
  76. virtual STDMETHODIMP BrowseObject(LPCITEMIDLIST pidl, UINT wFlags);
  77. virtual STDMETHODIMP OnViewWindowActive(IShellView * psv);
  78. // IServiceProvider
  79. virtual STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void ** ppvObj);
  80. // IOleCommandTarget
  81. virtual STDMETHODIMP QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD rgCmds[], OLECMDTEXT *pcmdtext);
  82. virtual STDMETHODIMP Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
  83. // IBrowserService
  84. virtual STDMETHODIMP ShowControlWindow(UINT id, BOOL fShow);
  85. virtual STDMETHODIMP IsControlWindowShown(UINT id, BOOL *pfShown);
  86. virtual STDMETHODIMP SetTitle(IShellView* psv, LPCWSTR pszName);
  87. virtual STDMETHODIMP UpdateWindowList(void);
  88. virtual STDMETHODIMP SetFlags(DWORD dwFlags, DWORD dwFlagMask);
  89. virtual STDMETHODIMP GetFlags(DWORD *pdwFlags);
  90. virtual STDMETHODIMP RegisterWindow(BOOL fUnregister, int swc);
  91. virtual STDMETHODIMP Offline(int iCmd);
  92. virtual STDMETHODIMP SetReferrer ( LPITEMIDLIST pidl) ;
  93. virtual STDMETHODIMP_(LRESULT) WndProcBS(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  94. virtual STDMETHODIMP OnCreate(LPCREATESTRUCT pcs);
  95. virtual STDMETHODIMP_(LRESULT) OnCommand(WPARAM wParam, LPARAM lParam);
  96. virtual STDMETHODIMP OnDestroy();
  97. virtual STDMETHODIMP_(LRESULT) OnNotify(NMHDR * pnm);
  98. virtual STDMETHODIMP OnSetFocus();
  99. virtual STDMETHODIMP ReleaseShellView();
  100. virtual STDMETHODIMP ActivatePendingView();
  101. virtual STDMETHODIMP CreateViewWindow(IShellView* psvNew, IShellView* psvOld, LPRECT prcView, HWND* phwnd);
  102. virtual STDMETHODIMP UpdateBackForwardState () ;
  103. virtual STDMETHODIMP CreateBrowserPropSheetExt(REFIID, LPVOID *);
  104. virtual STDMETHODIMP SetAsDefFolderSettings();
  105. virtual STDMETHODIMP _TryShell2Rename( IShellView* psv, LPCITEMIDLIST pidlNew);
  106. virtual STDMETHODIMP _NavigateToPidl( LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags);
  107. virtual STDMETHODIMP v_MayTranslateAccelerator( MSG* pmsg);
  108. virtual STDMETHODIMP _SwitchActivationNow( );
  109. virtual STDMETHODIMP _Initialize(HWND hwnd, IUnknown *pauto);
  110. virtual STDMETHODIMP _GetEffectiveClientArea(LPRECT lprectBorder, HMONITOR hmon);
  111. virtual STDMETHODIMP_(LPSTREAM) v_GetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName);
  112. // IDockingWindowSite
  113. virtual STDMETHODIMP SetBorderSpaceDW(IUnknown* punkSrc, LPCBORDERWIDTHS pborderwidths);
  114. // IInputSite
  115. virtual STDMETHODIMP OnFocusChangeIS(IUnknown* punkSrc, BOOL fSetFocus);
  116. virtual STDMETHODIMP ShowToolbar(IUnknown* punkSrc, BOOL fShow);
  117. //IShellBrowserService
  118. virtual STDMETHODIMP GetPropertyBag(DWORD dwFlags, REFIID riid, void** ppv);
  119. BOOL IsCShellBrowser2() { return !_fSubclassed; };
  120. protected:
  121. CShellBrowser2();
  122. virtual ~CShellBrowser2();
  123. friend HRESULT CShellBrowser2_CreateInstance(HWND hwnd, void ** ppsb);
  124. // topmost CBaseBrowser2 in a frameset (IE3/AOL/CIS/VB)
  125. virtual STDMETHODIMP v_CheckZoneCrossing(LPCITEMIDLIST pidl){return _CheckZoneCrossing(pidl);};
  126. virtual HRESULT _CheckZoneCrossing(LPCITEMIDLIST pidl);
  127. // CShellBrowser2 virtuals
  128. virtual LRESULT v_ForwardMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
  129. virtual DWORD v_ShowControl(UINT iControl, int iCmd);
  130. virtual STDMETHODIMP v_ShowHideChildWindows(BOOL fChildOnly = FALSE);
  131. virtual void v_InitMembers();
  132. virtual void v_SetIcon();
  133. virtual void v_GetAppTitleTemplate(LPTSTR pszBuffer, size_t cchBuffer, LPTSTR pszTitle);
  134. virtual LRESULT v_OnInitMenuPopup(HMENU hmenuPopup, int nIndex, BOOL fSystemMenu);
  135. virtual void v_HandleFileSysChange(LONG lEvent, LPITEMIDLIST pidl1, LPITEMIDLIST pidl2);
  136. virtual DWORD v_RestartFlags();
  137. virtual void v_FillCabStateHeader(CABSH* pcabsh, FOLDERSETTINGS *pfs);
  138. virtual void v_ParentFolder();
  139. virtual BOOL v_OnContextMenu(WPARAM wParam, LPARAM lParam);
  140. virtual BOOL v_IsIEModeBrowser();
  141. virtual BOOL _CreateToolbar();
  142. virtual STDMETHODIMP _PositionViewWindow(HWND hwnd, LPRECT prc);
  143. virtual IStream * _GetITBarStream(BOOL fWebBrowser, DWORD grfMode);
  144. //ViewStateStream related
  145. virtual void v_GetDefaultSettings(IETHREADPARAM *pcv);
  146. void _FillIEThreadParam(LPCITEMIDLIST pidl, IETHREADPARAM *piei);
  147. virtual void _UpdateFolderSettings(LPCITEMIDLIST pidl);
  148. BOOL _ShouldAllowNavigateParent();
  149. BOOL _ShouldSaveWindowPlacement();
  150. HRESULT _GetBSForBar(LPCWSTR pwszItem, IBandSite **ppbs);
  151. void _UpdateBackForwardStateNow();
  152. void _ExecAllBands(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
  153. void _HideToolbar(IUnknown *punk);
  154. void _BandClosed(IUnknown *punk, DWORD dwBandID);
  155. void _ShowHideProgress();
  156. void _CloseAllParents();
  157. void _OnConfirmedClose();
  158. void _OnClose(BOOL fPushed);
  159. void _AfterWindowCreated(IETHREADPARAM *piei);
  160. BOOL _ValidTargetPidl(LPCITEMIDLIST pidl, BOOL *pfTranslateRoot);
  161. LPITEMIDLIST _TranslateRoot(LPCITEMIDLIST pidl);
  162. BOOL _GetVID(SHELLVIEWID *pvid);
  163. void _UpdateRegFlags();
  164. void _SaveState();
  165. void _PropertyBagSaveState();
  166. void _OldSaveState();
  167. HRESULT _FillCabinetStateHeader(IStream *pstm, CABSH *cabsh);
  168. BOOL _ReadSettingsFromStream(IStream *pstm, IETHREADPARAM *piei);
  169. BOOL _ReadSettingsFromPropertyBag(IPropertyBag* ppb, IETHREADPARAM *piei);
  170. BOOL _FillIEThreadParamFromCabsh(CABSH* pcabsh, IETHREADPARAM *piei);
  171. HRESULT _CreateFakeNilPidl(LPITEMIDLIST *ppidl);
  172. BOOL _IsPageInternet(LPCITEMIDLIST pidl);
  173. HRESULT _GetPropertyBag(LPCITEMIDLIST pidl, DWORD dwFlags, REFIID riid, void** ppv);
  174. LPCITEMIDLIST _GetPidl();
  175. BOOL _DoesPidlRoam(LPCITEMIDLIST pidl);
  176. void _LoadBrowserWindowSettings(IETHREADPARAM *piei, LPCITEMIDLIST pidl);
  177. IDockingWindow* _GetITBar() { return _GetToolbarItem(ITB_ITBAR)->ptbar; }
  178. HMENU _GetMenuFromID(UINT uID);
  179. void _UpdateChildWindowSize(void);
  180. void _GetAppTitle(LPTSTR pszBuffer, DWORD dwSize);
  181. IMenuBand* _GetMenuBand(BOOL bDestroy);
  182. BOOL _TranslateMenuMessage(HWND hwnd, UINT uMsg, WPARAM * pwParam, LPARAM * plParam, LRESULT * plRet);
  183. void _ReloadTitle();
  184. void _ReloadStatusbarIcon();
  185. BOOL _OnTimer(UINT_PTR idTimer);
  186. LRESULT _ToolbarOnNotify(LPNMHDR pnm);
  187. LRESULT _OnInitMenuPopup(HMENU hmenuPopup, int nIndex, BOOL fSystemMenu);
  188. BOOL _OnSysMenuClick(BOOL bLeftButton, WPARAM wParam, LPARAM lParam);
  189. LRESULT _OnMenuSelect(WPARAM wParam, LPARAM lParam, UINT uHelpFlags);
  190. void _SetMenuHelp(HMENU hmenu, UINT wID, LPCTSTR pszHelp);
  191. void _SetBrowserBarMenuHelp(HMENU hmenu, UINT wID);
  192. void _SetExternalBandMenuHelp(HMENU hmenu, UINT wID);
  193. void _PruneMailNewsItems(HMENU hmenu);
  194. void _SetTitle( LPCWSTR pwszName);
  195. HRESULT _CreateFrameServices(void);
  196. void _FavoriteOnCommand(HMENU hmenu, UINT idCmd);
  197. void _CommonHandleFileSysChange(LONG lEvent, LPITEMIDLIST pidl1, LPITEMIDLIST pidl2);
  198. void _FSChangeCheckClose(LPCITEMIDLIST pidl, BOOL fDisconnect);
  199. void _OnFSNotify(WPARAM, LPARAM);
  200. // replaced by CBaseBrowser2::NavigateToTLItem()
  201. // void _RecentOnCommand(UINT idCmd);
  202. LRESULT _FwdTBNotify(LPTBNOTIFY ptbn);
  203. void _ToolTipFromCmd(LPTOOLTIPTEXT pnm);
  204. void _AddFolderOptionsPage(PROPSHEETHEADER *ppsh);
  205. void _AddAdvancedOptionsPage(PROPSHEETHEADER *ppsh);
  206. void _IncrNetSessionCount();
  207. void _DecrNetSessionCount();
  208. friend LRESULT CALLBACK IEFrameWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  209. friend void CALLBACK BrowserThreadProc(IETHREADPARAM* piei);
  210. void _ExecFileContext(UINT idCmd);
  211. void _EnableFileContext(HMENU hmenuPopup);
  212. LPITEMIDLIST _GetSubscriptionPidl();
  213. HRESULT _GetBrowserBar(int idBar, BOOL fShow, IBandSite** ppbs, const CLSID* pclsid);
  214. BANDCLASSINFO* _BandClassInfoFromCmdID(UINT idCmd);
  215. void _AddBrowserBarMenuItems(HMENU hmenu);
  216. HMENU _GetBrowserBarMenu();
  217. int _IdBarFromCmdID(UINT idCmd);
  218. int _eOnOffNotMunge(int eOnOffNot, UINT idCmd, UINT idBar);
  219. void _SetBrowserBarState(UINT idCmd, const CLSID *pclsid, int eOnOffNot, LPCITEMIDLIST pidl = NULL);
  220. const CLSID * _ShowHideBrowserBar(int idBar, const CLSID *pclsid, int eOnOff, LPCITEMIDLIST pidl);
  221. HRESULT _GetBandSite(int idBar, IBandSite** ppbsSite, const CLSID *pclsid, int eOnOff);
  222. HRESULT _EnsureAndNavigateBand(IBandSite* pbsSite, const CLSID* pclsid, LPCITEMIDLIST pidl = NULL);
  223. const CLSID * _InfoShowClsid(int idBar, const CLSID *pclsid, int eOnOff, LPCITEMIDLIST pidl = NULL);
  224. const CLSID * _InfoIdmToCLSID(UINT idCmd);
  225. const CATID * _InfoIdmToCATID(UINT idCmd);
  226. UINT _InfoCLSIDToIdm(const CLSID *pguid);
  227. BOOL _IsSameToolbar(LPWSTR wszBarName, IUnknown *punkBar);
  228. HRESULT _AddInfoBands(IBandSite *punkBandSite);
  229. HRESULT _AddSearchBand(IBandSite *punkBandSite);
  230. HRESULT DoCopyData(COPYDATASTRUCT *pCDS);
  231. HRESULT DoRemoteNavigate();
  232. void _OrganizeFavorites();
  233. BOOL _ShouldForwardMenu(UINT uMsg, WPARAM wParam, LPARAM lParam);
  234. void _TheaterMode(BOOL fShow, BOOL fRestorePrevious);
  235. #ifdef DEBUG
  236. void _DumpMenus(LPCTSTR pszMsg, BOOL bMsg);
  237. #endif
  238. BOOL _LoadBrowserHelperObjects(void);
  239. void _CreateBrowserBarClose(HWND hwndParent);
  240. void _SetTheaterBrowserBar();
  241. void _SetMenu(HMENU hmenu);
  242. HWND _GetCaptionWindow();
  243. LRESULT _ThunkTTNotify(LPTOOLTIPTEXTA pnmTTTA);
  244. BOOL _PrepareInternetToolbar(IETHREADPARAM* piei);
  245. HRESULT _SaveITbarLayout(void);
  246. static LRESULT CALLBACK DummyTBWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  247. DWORD _GetTempZone();
  248. void _UpdateZonesPane(VARIANT *pvar);
  249. void _DisplayFavoriteStatus(LPCITEMIDLIST pidl);
  250. void _SendCurrentPage(DWORD dwSendAs);
  251. void _OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam);
  252. HRESULT _FreshenComponentCategoriesCache( BOOL bForceUpdate ) ;
  253. void _QueryHKCRChanged() ;
  254. void _PruneGoSubmenu(HMENU hmenu);
  255. HMENU _MenuTemplate(int id, BOOL fShell);
  256. void _MungeGoMyComputer(HMENU hmenuPopup);
  257. void _OnGoMenuPopup(HMENU hmenuPopup);
  258. void _OnViewMenuPopup(HMENU hmenuPopup);
  259. void _OnToolsMenuPopup(HMENU hmenuPopup);
  260. void _OnFileMenuPopup(HMENU hmenuPopup);
  261. void _OnSearchMenuPopup(HMENU hmenuPopup);
  262. void _OnHelpMenuPopup(HMENU hmenuPopup);
  263. void _OnMailMenuPopup(HMENU hmenuPopup);
  264. void _OnEditMenuPopup(HMENU hmenuPopup);
  265. void _OnFindMenuPopup(HMENU hmenuPopup);
  266. void _OnExplorerBarMenuPopup(HMENU hmenuPopup);
  267. void _InsertTravelLogItems(HMENU hmenu, int nPos);
  268. // methods and members for monitoring the current status bar code page and font
  269. HRESULT _GetCodePage(UINT * puiCodePage, DWORD dwCharSet);
  270. int _GetIconIndex(void);
  271. HRESULT _QIExplorerBand(REFIID riid, void ** ppvObj);
  272. virtual BOOL _CanHandleAcceleratorNow(void) {return _fActivated;}
  273. bool _IsExplorerBandVisible (void);
  274. #ifdef UNIX
  275. BOOL _HandleActivation( WPARAM wParam );
  276. #endif
  277. void _GetDefaultWindowPlacement(HWND hwnd, HMONITOR hmon, WINDOWPLACEMENT* pwp);
  278. // NT5 specific message handling:
  279. BOOL _OnAppCommand(WPARAM wParam, LPARAM lParam);
  280. LPARAM _WndProcBSNT5(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  281. // Menus: see dochost.h for an explanation from the dochost perspective.
  282. // REARCHITECT (scotth): difference b/t _hmenuTemplate and _hmenuFull?
  283. //
  284. HMENU _hmenuTemplate;
  285. HMENU _hmenuFull;
  286. HMENU _hmenuBrowser; // Provided from dochost, used for _menulist
  287. HMENU _hmenuCur; // Used to keep track. Needed when in Kiosk mode...
  288. HMENU _hmenuPreMerged;
  289. #ifdef DEBUG
  290. HMENU _hmenuHelp; // Our help menu
  291. #endif
  292. HICON _hZoneIcon;
  293. HANDLE _hEventComCat;
  294. CMenuList _menulist; // Menu list for dispatching
  295. IContextMenu2 *_pcmNsc; // iff we've popped up File Menu w/ NSC context item
  296. IOleCommandTarget *_poctNsc; // iff we have visible name space control band
  297. int _idMenuBand;
  298. HWND _hwndStatus;
  299. HWND _hwndProgress;
  300. int _iTBOffset[3];
  301. CBandSiteMenu *_pbsmInfo;
  302. UINT _idmInfo; // selected View.BrowserBar submenu
  303. IMenuBand* _pmb; // Use _GetMenuBand to access this
  304. LPITEMIDLIST _pidlReferrer;
  305. WINDOWPLACEMENT _wndpl; // Used to go into and out of full screen mode.
  306. CLSID _clsidThis; // browser class ID
  307. BITBOOL _fStatusBar : 1;
  308. BITBOOL _fAutomation : 1; // was it launched from automation?
  309. BITBOOL _fShowMenu : 1; // should we show menus?
  310. BITBOOL _fForwardMenu : 1; // should we be forwarding menu messages?
  311. BITBOOL _fNoLocalFileWarning: 1; // Do we directly execute local files without warning?
  312. BITBOOL _fDispatchMenuMsgs:1; // TRUE: forward menu messages as appropriate
  313. BITBOOL _fUISetByAutomation: 1; // has ui (things that go in view options) been set by automation?
  314. BITBOOL _fDontSaveViewOptions:1; // Set if we should not save the view options on exit
  315. BITBOOL _fSBWSaved :1; // single browser window saved yet?
  316. BITBOOL _fInternetStart :1; // did we start on a net site?
  317. BITBOOL _fWin95ViewState:1;
  318. BITBOOL _fSubclassed :1; // are we subclassed?
  319. BITBOOL _fVisitedNet :1; // did we ever hit the net in this session?
  320. BITBOOL _fUnicode :1; // is our view window unicode?
  321. BITBOOL _fKioskMode : 1; // Are we in full screen kiosk mode? (not the same as fullscreen/theater mode)
  322. BITBOOL _fTitleSet :1; // has our content changed our title?
  323. BITBOOL _fMarshalledDispatch:1; // have we marshalled dispatch?
  324. BITBOOL _fMinimized :1; // Minimized or not.
  325. BITBOOL _fReceivedDestroy: 1; // Received WM_DESTROY message
  326. BITBOOL _fDisallowSizing: 1;
  327. BITBOOL _fShowNetworkButtons:1; // Based off the registry, we display the network connect button
  328. BITBOOL _fIgnoreNextMenuDeselect:1; // TRUE: Ignore the next deselection WM_MENUSELECT (hack)
  329. BITBOOL _fActivated:1; // TRUE: the frame is set active, FALSE: the frame is inactive
  330. BITBOOL _fClosingWindow:1; // TRUE: while closing, to avoid double-save and fault
  331. BITBOOL _fDidRegisterWindow:1; // called RegisterWindow() which registers the window with the winlist
  332. #ifdef UNIX
  333. BITBOOL _fSetAddressBarFocus:1;
  334. #endif
  335. #ifdef NO_MARSHALLING
  336. BITBOOL _fDelayedClose:1; // Used to mark windows for delay close.
  337. BITBOOL _fOnIEThread:1; // used to flag if we are not running on the main thread
  338. #endif
  339. BITBOOL _fUpdateBackForwardPosted:1; // have we posted to update the back/forward state?
  340. BITBOOL _fValidComCatCache ; // Have we ensured that the component cache is valid
  341. BITBOOL _fShowFortezza : 1; // status of the Fortezza menu
  342. BITBOOL _fRunningInIexploreExe:1; // are we running in iexplore.exe
  343. BITBOOL _fShowSynchronize : 1; // should we show Tools|Synchronize?
  344. BITBOOL _fNilViewStream : 1; // CabView settings were loaded for unknown pidl.
  345. BITBOOL _fAppendIEToCaptionBar : 1; // Does the NSE want Append " - IE" to the captionbar display name? See IBrowserFrameOptions
  346. BITBOOL _fAddDialUpRef : 1; // Does the NSE want a ref on the modem connection while browsed to this folder? See IBrowserFrameOptions
  347. BITBOOL _fUseIEToolbar : 1; // Does the NSE want to use the IE style toolbar? See IBrowserFrameOptions
  348. BITBOOL _fEnableOfflineFeature : 1; // Does the NSE want to enable the IE Offline feature? See IBrowserFrameOptions
  349. BITBOOL _fUseIEPersistence : 1; // Does the NSE want to use IE type persistence? Window pos, size, icon layout. See IBrowserFrameOptions
  350. BITBOOL _fInRefresh : 1; // Ignore refresh messages (FCIDM_REFRESH) if we are currently processing a refresh. (Prevents recursion death)
  351. UINT _idmComm; // selected View.BrowserBar submenu
  352. UINT _iCommOffset; // Start position in dynamically loaded comp categories
  353. ULONG _uFSNotify;
  354. int _iSynchronizePos;
  355. TCHAR *_pszSynchronizeText; // What is Tools|Synchronize in your language?
  356. // Window list related (also _fMarshalledDispatch above)
  357. IShellWindows* _psw;
  358. int _swcRegistered; // the SWC_* that this window is in the winlist as
  359. // Item ContextMenu
  360. IContextMenu3 * _pcm;
  361. long _dwRegisterWinList; // Have we registered with the windows list
  362. HWND _hwndDummyTB;
  363. IExplorerToolbar* _pxtb;
  364. int _nTBTextRows;
  365. // For the two members below, see notes above CShellBrowser2::_SwitchActivationNow
  366. TBBUTTON * _lpButtons;
  367. int _nButtons;
  368. TBBUTTON * _lpPendingButtons;
  369. int _nButtonsPending;
  370. IContextMenu3* _pcmSearch;// new style
  371. IContextMenu* _pcmFind; // old style find context menu
  372. CTheater *_ptheater;
  373. LPITEMIDLIST _pidlLastHist;
  374. LPITEMIDLIST _pidlMenuSelect;
  375. UINT _uiZonePane;
  376. IInternetSecurityManager * _pism;
  377. HMENU _hfm;
  378. DWORD _dwRevCount; // rev count of the global window settings
  379. UINT _nMBIgnoreNextDeselect;
  380. IUnknown *_punkMsgLoop;
  381. #ifdef NO_MARSHALLING
  382. BOOL _fReallyClosed;
  383. #endif
  384. // _PositionViewWindow
  385. HWND _hwndDelayedSize;
  386. RECT _rcDelayedSize;
  387. BOOL _fHaveDelayedSize;
  388. private:
  389. HRESULT _SetBrowserFrameOptions(LPCITEMIDLIST pidl);
  390. HRESULT _ReplaceCmdLine(LPTSTR pszCmdLine, DWORD cchSize);
  391. };
  392. BOOL FindBrowserWindow(void);
  393. //
  394. // Useful functions.
  395. //
  396. STDAPI_(BOOL) AddToRestartList(UINT flags, LPCITEMIDLIST pidl);
  397. STDAPI_(BOOL) OpenFolderWindow(IETHREADPARAM* pieiIn);
  398. HMENU _MenuTemplate(int id, BOOL bNukeTools);
  399. #define INFOBAR_TBNAME L"BrowserBar"
  400. #ifndef UNIX
  401. #define INFOBAR_WIDTH 204
  402. #else
  403. #define INFOBAR_WIDTH 277
  404. #endif
  405. #define COMMBAR_TBNAME L"CommBar"
  406. #define COMMBAR_HEIGHT 100
  407. // Constants for different Browser/Info BARs
  408. #define IDBAR_INFO 1
  409. #define IDBAR_COMM 2
  410. #define IDBAR_VERTICAL IDBAR_INFO
  411. #define IDBAR_HORIZONTAL IDBAR_COMM
  412. #define IDBAR_INVALID 42
  413. #endif // _SHBROWS2_H