ReactOS 0.4.16-dev-401-g45b008d
CInternetToolbar Class Reference

#include <internettoolbar.h>

Inheritance diagram for CInternetToolbar:
Collaboration diagram for CInternetToolbar:

Public Member Functions

 CInternetToolbar ()
 
virtual ~CInternetToolbar ()
 
void AddDockItem (IUnknown *newItem, int bandID, int flags)
 
HRESULT EnumBands (UINT Index, int *pBandId, IUnknown **ppUnkBand)
 
HRESULT ReserveBorderSpace (LONG maxHeight=-1)
 
HRESULT CreateMenuBar (IShellMenu **menuBar)
 
HRESULT CreateToolsBar (IUnknown **toolsBar)
 
HRESULT LockUnlockToolbars (bool locked)
 
HRESULT CommandStateChanged (bool newValue, int commandID)
 
HRESULT CreateAndInitBandProxy ()
 
HRESULT IsBandVisible (int BandID)
 
HRESULT SetBandVisibility (int BandID, int Show)
 
HRESULT ToggleBandVisibility (int BandID)
 
HRESULT SetState (const GUID *pguidCmdGroup, long commandID, OLECMD *pcmd)
 
void RefreshLockedToolbarState ()
 
HRESULT SetDirty ()
 
STDMETHOD() UIActivateIO (BOOL fActivate, LPMSG lpMsg) override
 
STDMETHOD() HasFocusIO () override
 
STDMETHOD() TranslateAcceleratorIO (LPMSG lpMsg) override
 
STDMETHOD() GetWindow (HWND *lphwnd) override
 
STDMETHOD() ContextSensitiveHelp (BOOL fEnterMode) override
 
STDMETHOD() ShowDW (BOOL fShow) override
 
STDMETHOD() CloseDW (DWORD dwReserved) override
 
STDMETHOD() ResizeBorderDW (LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
 
STDMETHOD() GetClassID (CLSID *pClassID) override
 
STDMETHOD() IsDirty () override
 
STDMETHOD() Load (IStream *pStm) override
 
STDMETHOD() Save (IStream *pStm, BOOL fClearDirty) override
 
STDMETHOD() GetSizeMax (ULARGE_INTEGER *pcbSize) override
 
STDMETHOD() InitNew () override
 
STDMETHOD() QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
 
STDMETHOD() Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
 
STDMETHOD() GetTypeInfoCount (UINT *pctinfo) override
 
STDMETHOD() GetTypeInfo (UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override
 
STDMETHOD() GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override
 
STDMETHOD() Invoke (DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
 
STDMETHOD() SetCommandTarget (IUnknown *theTarget, GUID *category, long param14) override
 
STDMETHOD() Unknown1 () override
 
STDMETHOD() AddButtons (const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons) override
 
STDMETHOD() AddString (const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18) override
 
STDMETHOD() GetButton (const GUID *pguidCmdGroup, long param10, long param14) override
 
STDMETHOD() GetState (const GUID *pguidCmdGroup, long commandID, long *theState) override
 
STDMETHOD() SetState (const GUID *pguidCmdGroup, long commandID, long theState) override
 
STDMETHOD() AddBitmap (const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20) override
 
STDMETHOD() GetBitmapSize (long *paramC) override
 
STDMETHOD() SendToolbarMsg (const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result) override
 
STDMETHOD() SetImageList (const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18) override
 
STDMETHOD() ModifyButton (const GUID *pguidCmdGroup, long param10, long param14) override
 
STDMETHOD() OnChange (LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) override
 
STDMETHOD() SetSite (IUnknown *pUnkSite) override
 
STDMETHOD() GetSite (REFIID riid, void **ppvSite) override
 
STDMETHOD() QueryService (REFGUID guidService, REFIID riid, void **ppvObject) override
 
STDMETHOD() OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
 
STDMETHOD() IsWindowOwner (HWND hWnd) override
 
STDMETHOD() AddBand (IUnknown *punk) override
 
STDMETHOD() EnumBands (UINT uBand, DWORD *pdwBandID) override
 
STDMETHOD() QueryBand (DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) override
 
STDMETHOD() SetBandState (DWORD dwBandID, DWORD dwMask, DWORD dwState) override
 
STDMETHOD() RemoveBand (DWORD dwBandID) override
 
STDMETHOD() GetBandObject (DWORD dwBandID, REFIID riid, void **ppv) override
 
STDMETHOD() SetBandSiteInfo (const BANDSITEINFO *pbsinfo) override
 
STDMETHOD() GetBandSiteInfo (BANDSITEINFO *pbsinfo) override
 
LRESULT OnTravelBack (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnTravelForward (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnUpLevel (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnSearch (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnFolders (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnForwardToCommandTarget (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnMenuDropDown (UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
 
LRESULT OnQueryInsert (UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
 
LRESULT OnQueryDelete (UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
 
LRESULT OnNavigateCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnContextMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetCursor (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnTipText (UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLDown (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnWinIniChange (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingsChange (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
HRESULT ShowDW ([in] BOOL fShow)
 
HRESULT CloseDW ([in] DWORD dwReserved)
 
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IPersistStreamInit
HRESULT IsDirty ()
 
HRESULT Load ([in] LPSTREAM pStm)
 
HRESULT Save ([in] LPSTREAM pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT InitNew ()
 
HRESULT GetClassID ([out] CLSID *pClassID)
 
HRESULT QueryStatus ([in, unique] const GUID *pguidCmdGroup, [in] ULONG cCmds, [in, out, size_is(cCmds)] OLECMD prgCmds[], [in, out, unique] OLECMDTEXT *pCmdText)
 
HRESULT Exec ([in, unique] const GUID *pguidCmdGroup, [in] DWORD nCmdID, [in] DWORD nCmdexecopt, [in, unique] VARIANT *pvaIn, [in, out, unique] VARIANT *pvaOut)
 
- Public Member Functions inherited from IDispatch
HRESULT GetTypeInfoCount ([out] UINT *pctinfo)
 
HRESULT GetTypeInfo ([in] UINT iTInfo, [in] LCID lcid, [out] ITypeInfo **ppTInfo)
 
HRESULT GetIDsOfNames ([in] REFIID riid, [in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [in] LCID lcid, [out, size_is(cNames)] DISPID *rgDispId)
 
HRESULT Invoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
 
HRESULT RemoteInvoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] DWORD dwFlags, [in] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *pArgErr, [in] UINT cVarRef, [in, size_is(cVarRef)] UINT *rgVarRefIdx, [in, out, size_is(cVarRef)] VARIANTARG *rgVarRef)
 
- Public Member Functions inherited from IShellChangeNotify
HRESULT OnChange ([in] LONG lEvent, [in] PCIDLIST_ABSOLUTE pidl1, [in] PCIDLIST_ABSOLUTE pidl2)
 
- Public Member Functions inherited from IObjectWithSite
HRESULT SetSite ([in] IUnknown *pUnkSite)
 
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 
- Public Member Functions inherited from IServiceProvider
HRESULT QueryService ([in] REFGUID guidService, [in] REFIID riid, [out] void **ppvObject)
 
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
HRESULT AddBand ([in] IUnknown *punk)
 
HRESULT EnumBands ([in] UINT uBand, [out] DWORD *pdwBandID)
 
HRESULT QueryBand ([in] DWORD dwBandID, [out] IDeskBand **ppstb, [out] DWORD *pdwState, [out, string, size_is(cchName)] LPWSTR pszName, [in] int cchName)
 
HRESULT SetBandState ([in] DWORD dwBandID, [in] DWORD dwMask, [in] DWORD dwState)
 
HRESULT RemoveBand ([in] DWORD dwBandID)
 
HRESULT GetBandObject ([in] DWORD dwBandID, [in] REFIID riid, [out, iid_is(riid)] void **ppv)
 
HRESULT SetBandSiteInfo ([in] const BANDSITEINFO *pbsinfo)
 
HRESULT GetBandSiteInfo ([in, out] BANDSITEINFO *pbsinfo)
 

Static Public Member Functions

static HRESULT GetStream (UINT StreamFor, DWORD Stgm, IStream **ppS)
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 

Public Attributes

CComPtr< IUnknownfSite
 
HWND fMainReBar
 
bool fLocked
 
CComPtr< IShellMenufMenuBar
 
HWND fMenuBandWindow
 
HWND fNavigationWindow
 
CComPtr< IUnknownfLogoBar
 
CComPtr< IUnknownfControlsBar
 
CComPtr< IUnknownfNavigationBar
 
CComPtr< CMenuCallbackfMenuCallback
 
CComPtr< IOleCommandTargetfCommandTarget
 
GUID fCommandCategory
 
HWND fToolbarWindow
 
DWORD fAdviseCookie
 
CComPtr< IBandProxy > fBandProxy
 
BOOL fSizing
 
POINT fStartPosition
 
LONG fStartHeight
 
ShellSettingspSettings
 
BOOL fIgnoreChanges
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from IDispatch
const DISPID DISPID_UNKNOWN = -1
 
const DISPID DISPID_VALUE = 0
 
const DISPID DISPID_PROPERTYPUT = -3
 
const DISPID DISPID_NEWENUM = -4
 
const DISPID DISPID_EVALUATE = -5
 
const DISPID DISPID_CONSTRUCTOR = -6
 
const DISPID DISPID_DESTRUCTOR = -7
 
const DISPID DISPID_COLLECT = -8
 

Additional Inherited Members

- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IPersistStreamInit
typedef IPersistStreamInitLPPERSISTSTREAMINIT
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1 , OLECMDF_ENABLED = 0x2 , OLECMDF_LATCHED = 0x4 , OLECMDF_NINCHED = 0x8 ,
  OLECMDF_INVISIBLE = 0x10 , OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0 , OLECMDTEXTF_NAME = 1 , OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0 , OLECMDEXECOPT_PROMPTUSER = 1 , OLECMDEXECOPT_DONTPROMPTUSER = 2 , OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1 , OLECMDID_NEW = 2 , OLECMDID_SAVE = 3 , OLECMDID_SAVEAS = 4 ,
  OLECMDID_SAVECOPYAS = 5 , OLECMDID_PRINT = 6 , OLECMDID_PRINTPREVIEW = 7 , OLECMDID_PAGESETUP = 8 ,
  OLECMDID_SPELL = 9 , OLECMDID_PROPERTIES = 10 , OLECMDID_CUT = 11 , OLECMDID_COPY = 12 ,
  OLECMDID_PASTE = 13 , OLECMDID_PASTESPECIAL = 14 , OLECMDID_UNDO = 15 , OLECMDID_REDO = 16 ,
  OLECMDID_SELECTALL = 17 , OLECMDID_CLEARSELECTION = 18 , OLECMDID_ZOOM = 19 , OLECMDID_GETZOOMRANGE = 20 ,
  OLECMDID_UPDATECOMMANDS = 21 , OLECMDID_REFRESH = 22 , OLECMDID_STOP = 23 , OLECMDID_HIDETOOLBARS = 24 ,
  OLECMDID_SETPROGRESSMAX = 25 , OLECMDID_SETPROGRESSPOS = 26 , OLECMDID_SETPROGRESSTEXT = 27 , OLECMDID_SETTITLE = 28 ,
  OLECMDID_SETDOWNLOADSTATE = 29 , OLECMDID_STOPDOWNLOAD = 30 , OLECMDID_ONTOOLBARACTIVATED = 31 , OLECMDID_FIND = 32 ,
  OLECMDID_DELETE = 33 , OLECMDID_HTTPEQUIV = 34 , OLECMDID_HTTPEQUIV_DONE = 35 , OLECMDID_ENABLE_INTERACTION = 36 ,
  OLECMDID_ONUNLOAD = 37 , OLECMDID_PROPERTYBAG2 = 38 , OLECMDID_PREREFRESH = 39 , OLECMDID_SHOWSCRIPTERROR = 40 ,
  OLECMDID_SHOWMESSAGE = 41 , OLECMDID_SHOWFIND = 42 , OLECMDID_SHOWPAGESETUP = 43 , OLECMDID_SHOWPRINT = 44 ,
  OLECMDID_CLOSE = 45 , OLECMDID_ALLOWUILESSSAVEAS = 46 , OLECMDID_DONTDOWNLOADCSS = 47 , OLECMDID_UPDATEPAGESTATUS = 48 ,
  OLECMDID_PRINT2 = 49 , OLECMDID_PRINTPREVIEW2 = 50 , OLECMDID_SETPRINTTEMPLATE = 51 , OLECMDID_GETPRINTTEMPLATE = 52 ,
  OLECMDID_PAGEACTIONBLOCKED = 55 , OLECMDID_PAGEACTIONUIQUERY = 56 , OLECMDID_FOCUSVIEWCONTROLS = 57 , OLECMDID_FOCUSVIEWCONTROLSQUERY = 58 ,
  OLECMDID_SHOWPAGEACTIONMENU = 59 , OLECMDID_ADDTRAVELENTRY = 60 , OLECMDID_UPDATETRAVELENTRY = 61 , OLECMDID_UPDATEBACKFORWARDSTATE = 62 ,
  OLECMDID_OPTICAL_ZOOM = 63 , OLECMDID_OPTICAL_GETZOOMRANGE = 64 , OLECMDID_WINDOWSTATECHANGED = 65 , OLECMDID_ACTIVEXINSTALLSCOPE = 66 ,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67 , OLECMDID_SHOWTASKDLG = 68 , OLECMDID_POPSTATEEVENT = 69 , OLECMDID_VIEWPORT_MODE = 70 ,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71 , OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72 , OLECMDID_USER_OPTICAL_ZOOM = 73 , OLECMDID_PAGEAVAILABLE = 74 ,
  OLECMDID_GETUSERSCALABLE = 75 , OLECMDID_UPDATE_CARET = 76 , OLECMDID_ENABLE_VISIBILITY = 77 , OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 
- Public Types inherited from IDispatch
typedef IDispatchLPDISPATCH
 
- Public Types inherited from IObjectWithSite
typedef IObjectWithSiteLPOBJECTWITHSITE
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 

Detailed Description

Definition at line 64 of file internettoolbar.h.

Constructor & Destructor Documentation

◆ CInternetToolbar()

CInternetToolbar::CInternetToolbar ( )

Definition at line 622 of file internettoolbar.cpp.

623{
629 fAdviseCookie = 0;
630 pSettings = NULL;
632}
ShellSettings * pSettings
CComPtr< CMenuCallback > fMenuCallback
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117

◆ ~CInternetToolbar()

CInternetToolbar::~CInternetToolbar ( )
virtual

Definition at line 634 of file internettoolbar.cpp.

635{
636}

Member Function Documentation

◆ AddBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::AddBand ( IUnknown punk)
override

Implements IBandSite.

Definition at line 1506 of file internettoolbar.cpp.

1507{
1509 return E_NOTIMPL;
1510}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AddBitmap()

HRESULT STDMETHODCALLTYPE CInternetToolbar::AddBitmap ( const GUID pguidCmdGroup,
long  param10,
long  buttonCount,
TBADDBITMAP lParam,
long newIndex,
COLORREF  param20 
)
override

Definition at line 1348 of file internettoolbar.cpp.

1350{
1351 return E_NOTIMPL;
1352}

◆ AddButtons()

HRESULT STDMETHODCALLTYPE CInternetToolbar::AddButtons ( const GUID pguidCmdGroup,
long  buttonCount,
TBBUTTON buttons 
)
override

Definition at line 1309 of file internettoolbar.cpp.

1310{
1311 return E_NOTIMPL;
1312}

◆ AddDockItem()

void CInternetToolbar::AddDockItem ( IUnknown newItem,
int  bandID,
int  flags 
)

Definition at line 638 of file internettoolbar.cpp.

639{
640 CComPtr<CDockSite> newSite;
641
642 newSite = new CComObject<CDockSite>;
643 newSite->Initialize(newItem, this, fMainReBar, bandID, flags);
644}
GLbitfield flags
Definition: glext.h:7161

Referenced by InitNew().

◆ AddString()

HRESULT STDMETHODCALLTYPE CInternetToolbar::AddString ( const GUID pguidCmdGroup,
HINSTANCE  param10,
LPCTSTR  param14,
long param18 
)
override

Definition at line 1314 of file internettoolbar.cpp.

1316{
1317 long result;
1318
1320 reinterpret_cast<WPARAM>(param10), reinterpret_cast<LPARAM>(param14));
1321 *param18 = result;
1322 if (result == -1)
1323 return E_FAIL;
1324 return S_OK;
1325}
#define E_FAIL
Definition: ddrawi.h:102
GLuint64EXT * result
Definition: glext.h:11304
#define S_OK
Definition: intsafe.h:52
#define TB_ADDSTRINGW
Definition: commctrl.h:1132
#define long
Definition: qsort.c:33
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define SendMessage
Definition: winuser.h:5855

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::CloseDW ( DWORD  dwReserved)
override

Implements IDockingWindow.

Definition at line 940 of file internettoolbar.cpp.

941{
942 HRESULT hResult;
943
944 if (fMenuBar)
945 {
947 if (FAILED_UNEXPECTEDLY(hResult))
948 return hResult;
949 ReleaseCComPtrExpectZero(fMenuBar);
950 }
951 if (fControlsBar)
952 {
954 if (FAILED_UNEXPECTEDLY(hResult))
955 return hResult;
956 ReleaseCComPtrExpectZero(fControlsBar);
957 }
958 if (fNavigationBar)
959 {
961 if (FAILED_UNEXPECTEDLY(hResult))
962 return hResult;
963 ReleaseCComPtrExpectZero(fNavigationBar);
964 }
965 if (fLogoBar)
966 {
968 if (FAILED_UNEXPECTEDLY(hResult))
969 return hResult;
970 ReleaseCComPtrExpectZero(fLogoBar);
971 }
972
973 SetSite(NULL);
974 return S_OK;
975}
CComPtr< IUnknown > fNavigationBar
CComPtr< IUnknown > fLogoBar
CComPtr< IUnknown > fControlsBar
STDMETHOD() SetSite(IUnknown *pUnkSite) override
CComPtr< IShellMenu > fMenuBar
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT IUnknown_CloseDW(IUnknown *punk, DWORD dwReserved)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95

◆ CommandStateChanged()

HRESULT CInternetToolbar::CommandStateChanged ( bool  newValue,
int  commandID 
)

Definition at line 789 of file internettoolbar.cpp.

790{
791 HRESULT hResult;
792
793 hResult = S_OK;
794 switch (commandID)
795 {
796 case -1:
797 // loop through buttons
798 //for buttons in CLSID_CommonButtons
799 // if up, QueryStatus for up state and update it
800 //
801 //for buttons in fCommandCategory, update with QueryStatus of fCommandTarget
802
803 OLECMD commandList[4];
804 commandList[0].cmdID = 0x1c;
805 commandList[1].cmdID = 0x1d;
806 commandList[2].cmdID = 0x1e;
807 commandList[3].cmdID = 0x23;
808 IUnknown_QueryStatus(fSite, CGID_Explorer, 4, commandList, NULL);
809 SetState(&CLSID_CommonButtons, gSearchCommandID, &commandList[0]);
810 SetState(&CLSID_CommonButtons, gFoldersCommandID, &commandList[3]);
811 //SetState(&CLSID_CommonButtons, gFavoritesCommandID, &commandList[2]);
812 //SetState(&CLSID_CommonButtons, gHistoryCommandID, &commandList[1]);
813
814 break;
815 case 1:
816 // forward
817 hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_FORWARD, newValue ? TBSTATE_ENABLED : 0);
818 break;
819 case 2:
820 // back
821 hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_BACK, newValue ? TBSTATE_ENABLED : 0);
822 break;
823 case 3:
824 // up
825 hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_UPONELEVEL, newValue ? TBSTATE_ENABLED : 0);
826 break;
827 }
828 return hResult;
829}
HRESULT SetState(const GUID *pguidCmdGroup, long commandID, OLECMD *pcmd)
CComPtr< IUnknown > fSite
#define IDM_GOTO_UPONELEVEL
Definition: resource.h:47
#define IDM_GOTO_FORWARD
Definition: resource.h:46
#define IDM_GOTO_BACK
Definition: resource.h:45
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:1048
struct IOleCommandTarget::_tagOLECMD OLECMD
static const int gFoldersCommandID
static const int gSearchCommandID
#define TBSTATE_ENABLED
Definition: commctrl.h:974

Referenced by Invoke().

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ContextSensitiveHelp ( BOOL  fEnterMode)
override

Implements IOleWindow.

Definition at line 909 of file internettoolbar.cpp.

910{
911 return E_NOTIMPL;
912}

◆ CreateAndInitBandProxy()

HRESULT CInternetToolbar::CreateAndInitBandProxy ( )

Definition at line 831 of file internettoolbar.cpp.

832{
833 CComPtr<IServiceProvider> serviceProvider;
834 HRESULT hResult;
835
836 hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider));
837 if (FAILED_UNEXPECTEDLY(hResult))
838 return hResult;
839 hResult = serviceProvider->QueryService(SID_IBandProxy, IID_PPV_ARG(IBandProxy, &fBandProxy));
840 if (FAILED_UNEXPECTEDLY(hResult))
841 {
842 hResult = CBandProxy_CreateInstance(IID_PPV_ARG(IBandProxy, &fBandProxy));
843 if (FAILED_UNEXPECTEDLY(hResult))
844 return hResult;
845 hResult = fBandProxy->SetSite(fSite);
846 if (FAILED_UNEXPECTEDLY(hResult))
847 return hResult;
848 }
849 return S_OK;
850}
HRESULT CBandProxy_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:42
CComPtr< IBandProxy > fBandProxy
#define IID_PPV_ARG(Itype, ppType)

Referenced by QueryService().

◆ CreateMenuBar()

HRESULT CInternetToolbar::CreateMenuBar ( IShellMenu **  menuBar)

Definition at line 681 of file internettoolbar.cpp.

682{
683 CComPtr<IShellMenu> menubar;
685 VARIANT menuOut;
686 HWND ownerWindow;
687 HRESULT hResult;
688
689 if (!pMenuBar)
690 return E_POINTER;
691
692 *pMenuBar = NULL;
693
694 hResult = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &menubar));
695 if (FAILED_UNEXPECTEDLY(hResult))
696 return hResult;
697
698 hResult = fMenuCallback->QueryInterface(IID_PPV_ARG(IShellMenuCallback, &callback));
699 if (FAILED_UNEXPECTEDLY(hResult))
700 return hResult;
701
702 hResult = menubar->Initialize(callback, -1, ANCESTORDEFAULT, SMINIT_HORIZONTAL | SMINIT_TOPLEVEL);
703 if (FAILED_UNEXPECTEDLY(hResult))
704 return hResult;
705
706 // Set Menu
707 {
708 hResult = IUnknown_Exec(fSite, CGID_Explorer, 0x35, 0, NULL, &menuOut);
709 if (FAILED_UNEXPECTEDLY(hResult))
710 return hResult;
711
712 if (V_VT(&menuOut) != VT_INT_PTR || V_INTREF(&menuOut) == NULL)
713 return E_FAIL;
714
715 hResult = IUnknown_GetWindow(fSite, &ownerWindow);
716 if (FAILED_UNEXPECTEDLY(hResult))
717 return hResult;
718
719 HMENU hMenuBar = (HMENU) V_INTREF(&menuOut);
720
721 // FIXME: Figure out the proper way to do this.
722 HMENU hMenuFavs = GetSubMenu(hMenuBar, 3);
723 if (hMenuFavs)
724 {
726 }
727
728 hResult = menubar->SetMenu(hMenuBar, ownerWindow, SMSET_DONTOWN);
729 if (FAILED_UNEXPECTEDLY(hResult))
730 return hResult;
731 }
732
733 hResult = IUnknown_Exec(menubar, CGID_MenuBand, 3, 1, NULL, NULL);
734 if (FAILED_UNEXPECTEDLY(hResult))
735 return hResult;
736
737 *pMenuBar = menubar.Detach();
738
739 return S_OK;
740}
T * Detach()
Definition: atlcomcli.h:186
#define IDM_FAVORITES_EMPTY
Definition: resource.h:52
@ VT_INT_PTR
Definition: compat.h:2327
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1087
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1336
static IPrintDialogCallback callback
Definition: printdlg.c:326
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define V_VT(A)
Definition: oleauto.h:211
#define V_INTREF(A)
Definition: oleauto.h:252
#define CMenuBand_CreateInstance
Definition: shellmenu.h:81
#define CGID_MenuBand
#define E_POINTER
Definition: winerror.h:2365
#define MF_BYCOMMAND
Definition: winuser.h:202
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)

Referenced by InitNew().

◆ CreateToolsBar()

HRESULT CInternetToolbar::CreateToolsBar ( IUnknown **  toolsBar)

◆ EnumBands() [1/2]

HRESULT CInternetToolbar::EnumBands ( UINT  Index,
int pBandId,
IUnknown **  ppUnkBand 
)

Definition at line 646 of file internettoolbar.cpp.

647{
648 REBARBANDINFOW rbbi;
649 rbbi.cbSize = sizeof(rbbi);
650 rbbi.fMask = RBBIM_ID | RBBIM_LPARAM;
651 rbbi.cch = 0;
654 *pBandId = rbbi.wID;
655 if (!rbbi.lParam)
656 return E_UNEXPECTED;
657 *ppUnkBand = ((CDockSite*)(rbbi.lParam))->GetContainedBand(); // Not ref. counted
658 return *ppUnkBand ? S_OK : S_FALSE;
659}
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define RB_GETBANDINFOW
Definition: commctrl.h:1609
#define RBBIM_ID
Definition: commctrl.h:1510
#define RBBIM_LPARAM
Definition: commctrl.h:1512
_In_ WDFCOLLECTION _In_ ULONG Index
#define S_FALSE
Definition: winerror.h:2357
#define E_UNEXPECTED
Definition: winerror.h:2456
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by EnumBands(), and ShowDW().

◆ EnumBands() [2/2]

HRESULT STDMETHODCALLTYPE CInternetToolbar::EnumBands ( UINT  uBand,
DWORD pdwBandID 
)
override

Implements IBandSite.

Definition at line 1512 of file internettoolbar.cpp.

1513{
1514 if (uBand == ~0ul)
1515 return ::SendMessage(fMainReBar, RB_GETBANDCOUNT, 0, 0);
1516 int id;
1517 IUnknown *pUnkUnused;
1518 HRESULT hr = EnumBands(uBand, &id, &pUnkUnused);
1519 if (SUCCEEDED(hr))
1520 *pdwBandID = id;
1521 return hr;
1522}
HRESULT EnumBands(UINT Index, int *pBandId, IUnknown **ppUnkBand)
GLuint id
Definition: glext.h:5910
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define RB_GETBANDCOUNT
Definition: commctrl.h:1585
HRESULT hr
Definition: shlfolder.c:183

◆ Exec()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Exec ( const GUID pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)
override

Implements IOleCommandTarget.

Definition at line 1211 of file internettoolbar.cpp.

1213{
1214 if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1215 {
1216 switch (nCmdID)
1217 {
1218 case 1:
1219 // what do I do here?
1220 return S_OK;
1221 case ITID_TEXTLABELS:
1222 // toggle text labels
1223 return S_OK;
1229 // toggle links band visibility
1230 return S_OK;
1232 // run customize
1233 return S_OK;
1234 case ITID_TOOLBARLOCKED:
1236 }
1237 }
1238 return E_FAIL;
1239}
HRESULT LockUnlockToolbars(bool locked)
HRESULT ToggleBandVisibility(int BandID)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
BOOL fLocked
Definition: settings.h:15
#define ITID_LINKSBANDSHOWN
Definition: undocshell.h:846
#define ITID_TOOLBARBANDSHOWN
Definition: undocshell.h:844
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:838
#define ITBBID_TOOLSBAND
Definition: undocshell.h:837
#define ITID_TEXTLABELS
Definition: undocshell.h:843
#define ITID_CUSTOMIZEENABLED
Definition: undocshell.h:849
#define ITID_ADDRESSBANDSHOWN
Definition: undocshell.h:845
#define ITID_TOOLBARLOCKED
Definition: undocshell.h:850

Referenced by OnMenuDropDown().

◆ GetBandObject()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBandObject ( DWORD  dwBandID,
REFIID  riid,
void **  ppv 
)
override

Implements IBandSite.

Definition at line 1549 of file internettoolbar.cpp.

1550{
1552 return E_NOTIMPL;
1553}

◆ GetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBandSiteInfo ( BANDSITEINFO pbsinfo)
override

Implements IBandSite.

Definition at line 1561 of file internettoolbar.cpp.

1562{
1564 return E_NOTIMPL;
1565}

◆ GetBitmapSize()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBitmapSize ( long paramC)
override

Definition at line 1354 of file internettoolbar.cpp.

1355{
1356 if (paramC == NULL)
1357 return E_POINTER;
1358 *paramC = MAKELONG(24, 24);
1359 return S_OK;
1360}
#define MAKELONG(a, b)
Definition: typedefs.h:249

◆ GetButton()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetButton ( const GUID pguidCmdGroup,
long  param10,
long  param14 
)
override

Definition at line 1327 of file internettoolbar.cpp.

1328{
1329 return E_NOTIMPL;
1330}

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetClassID ( CLSID pClassID)
override

Implements IPersist.

Definition at line 1012 of file internettoolbar.cpp.

1013{
1014 if (pClassID == NULL)
1015 return E_POINTER;
1016 *pClassID = CLSID_InternetToolbar;
1017 return S_OK;
1018}

◆ GetIDsOfNames()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetIDsOfNames ( REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
override

Implements IDispatch.

Definition at line 1251 of file internettoolbar.cpp.

1253{
1254 return E_NOTIMPL;
1255}

◆ GetSite()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetSite ( REFIID  riid,
void **  ppvSite 
)
override

Definition at line 1442 of file internettoolbar.cpp.

1443{
1444 if (ppvSite == NULL)
1445 return E_POINTER;
1446 if (fSite.p != NULL)
1447 return fSite->QueryInterface(riid, ppvSite);
1448 *ppvSite = NULL;
1449 return S_OK;
1450}
REFIID riid
Definition: atlbase.h:39

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetSizeMax ( ULARGE_INTEGER pcbSize)
override

Implements IPersistStreamInit.

Definition at line 1066 of file internettoolbar.cpp.

1067{
1068 return E_NOTIMPL;
1069}

◆ GetState()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetState ( const GUID pguidCmdGroup,
long  commandID,
long theState 
)
override

Definition at line 1332 of file internettoolbar.cpp.

1333{
1334 if (theState == NULL)
1335 return E_POINTER;
1336 // map the command id
1337 *theState = (long)::SendMessage(fToolbarWindow, TB_GETSTATE, commandID, 0);
1338 return S_OK;
1339}
#define TB_GETSTATE
Definition: commctrl.h:1055

◆ GetStream()

HRESULT CInternetToolbar::GetStream ( UINT  StreamFor,
DWORD  Stgm,
IStream **  ppS 
)
static

Definition at line 2003 of file internettoolbar.cpp.

2004{
2006 LPCWSTR subkey = NULL;
2007 switch (StreamFor)
2008 {
2009 case ITBARSTREAM_SHELLBROWSER: subkey = L"ShellBrowser"; break;
2010 case ITBARSTREAM_WEBBROWSER: subkey = L"WebBrowser"; break;
2011 case ITBARSTREAM_EXPLORER: subkey = L"Explorer"; break;
2012 default: return E_INVALIDARG;
2013 }
2014 wsprintfW(path, L"Software\\Microsoft\\Internet Explorer\\Toolbar\\%s", subkey);
2015 *ppS = SHOpenRegStream2W(HKEY_CURRENT_USER, path, L"RosITBarLayout", Stgm); // ROS prefix until we figure out the correct format
2016 return *ppS ? S_OK : E_FAIL;
2017}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define MAX_PATH
Definition: compat.h:34
#define ITBARSTREAM_EXPLORER
#define ITBARSTREAM_SHELLBROWSER
#define ITBARSTREAM_WEBBROWSER
#define L(x)
Definition: ntvdm.h:50
IStream *WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode)
Definition: regstream.c:537
#define HKEY_CURRENT_USER
Definition: winreg.h:11
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by CShellBrowser::Initialize(), and CShellBrowser::SaveITBarLayout().

◆ GetTypeInfo()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetTypeInfo ( UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
override

Implements IDispatch.

Definition at line 1246 of file internettoolbar.cpp.

1247{
1248 return E_NOTIMPL;
1249}

◆ GetTypeInfoCount()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetTypeInfoCount ( UINT pctinfo)
override

Implements IDispatch.

Definition at line 1241 of file internettoolbar.cpp.

1242{
1243 return E_NOTIMPL;
1244}

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetWindow ( HWND lphwnd)
override

Implements IOleWindow.

Definition at line 901 of file internettoolbar.cpp.

902{
903 if (lphwnd == NULL)
904 return E_POINTER;
905 *lphwnd = m_hWnd;
906 return S_OK;
907}

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CInternetToolbar::HasFocusIO ( )
override

Definition at line 857 of file internettoolbar.cpp.

858{
860
861 if (fMenuBar)
863 if (hr != S_FALSE)
864 return hr;
865
866 if (fControlsBar)
868 if (hr != S_FALSE)
869 return hr;
870
871 if (fNavigationBar)
873 if (hr != S_FALSE)
874 return hr;
875
876 return S_FALSE;
877}
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4311

◆ InitNew()

HRESULT STDMETHODCALLTYPE CInternetToolbar::InitNew ( void  )
override

Implements IPersistStreamInit.

Definition at line 1071 of file internettoolbar.cpp.

1072{
1073 CComPtr<IShellMenu> menuBar;
1074 CComPtr<IUnknown> logoBar;
1075 CComPtr<IUnknown> toolsBar;
1076 CComPtr<IUnknown> navigationBar;
1077 HRESULT hResult;
1078
1079 /* Create and attach the menubar to the rebar */
1080 hResult = CreateMenuBar(&menuBar);
1081 if (FAILED_UNEXPECTEDLY(hResult))
1082 return hResult;
1084
1085 hResult = IUnknown_GetWindow(menuBar, &fMenuBandWindow);
1086 fMenuBar.Attach(menuBar.Detach()); // transfer the ref count
1087
1088 // FIXME: The ROS Rebar does not properly support fixed-size items such as the brandband,
1089 // and it will put them in their own row, sized to take up the whole row.
1090#if 0
1091 /* Create and attach the brand/logo to the rebar */
1092 hResult = CBrandBand_CreateInstance(IID_PPV_ARG(IUnknown, &logoBar));
1093 if (FAILED_UNEXPECTEDLY(hResult))
1094 return hResult;
1096 fLogoBar.Attach(logoBar.Detach()); // transfer the ref count
1097#endif
1098
1099 /* Create and attach the standard toolbar to the rebar */
1100 hResult = CToolsBand_CreateInstance(IID_PPV_ARG(IUnknown, &toolsBar));
1101 if (FAILED_UNEXPECTEDLY(hResult))
1102 return hResult;
1104 fControlsBar.Attach(toolsBar.Detach()); // transfer the ref count
1106 if (FAILED_UNEXPECTEDLY(hResult))
1107 return hResult;
1108
1109 /* Create and attach the address/navigation toolbar to the rebar */
1110 hResult = CAddressBand_CreateInstance(IID_PPV_ARG(IUnknown, &navigationBar));
1111 if (FAILED_UNEXPECTEDLY(hResult))
1112 return hResult;
1114 fNavigationBar.Attach(navigationBar.Detach());
1116
1117 return S_OK;
1118}
HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:24
HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:51
HRESULT CToolsBand_CreateInstance(REFIID riid, void **ppv)
Definition: toolsband.cpp:419
void Attach(T *lp)
Definition: atlcomcli.h:179
HRESULT CreateMenuBar(IShellMenu **menuBar)
void AddDockItem(IUnknown *newItem, int bandID, int flags)
#define ITBBID_BRANDBAND
Definition: undocshell.h:836
#define ITBBID_MENUBAND
Definition: undocshell.h:835

Referenced by Load().

◆ Invoke()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Invoke ( DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
override

Implements IDispatch.

Definition at line 1257 of file internettoolbar.cpp.

1259{
1260 HRESULT hResult;
1261
1262 switch(dispIdMember)
1263 {
1265 hResult = S_OK;
1266 break;
1268 hResult = S_OK;
1269 break;
1271 if (pDispParams->cArgs != 2)
1272 return E_INVALIDARG;
1273 if (V_VT(&pDispParams->rgvarg[0]) != VT_BOOL || V_VT(&pDispParams->rgvarg[1]) != VT_I4)
1274 return E_INVALIDARG;
1275 return CommandStateChanged(V_BOOL(&pDispParams->rgvarg[0]) != VARIANT_FALSE,
1276 V_I4(&pDispParams->rgvarg[1]));
1278 hResult = S_OK;
1279 break;
1281 hResult = S_OK;
1282 break;
1284 hResult = S_OK;
1285 break;
1286 }
1287 return S_OK;
1288}
HRESULT CommandStateChanged(bool newValue, int commandID)
@ VT_I4
Definition: compat.h:2298
@ VT_BOOL
Definition: compat.h:2306
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_I4(A)
Definition: oleauto.h:247
#define DISPID_NAVIGATECOMPLETE2
Definition: webchild.h:54
#define DISPID_BEFORENAVIGATE
Definition: webchild.h:35
#define DISPID_COMMANDSTATECHANGE
Definition: webchild.h:40
#define DISPID_DOWNLOADCOMPLETE
Definition: webchild.h:39
#define DISPID_DOWNLOADBEGIN
Definition: webchild.h:41
#define DISPID_DOCUMENTCOMPLETE
Definition: webchild.h:61

◆ IsBandVisible()

HRESULT CInternetToolbar::IsBandVisible ( int  BandID)

Definition at line 1120 of file internettoolbar.cpp.

1121{
1122 int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1123
1126
1127 return (bandInfo.fStyle & RBBS_HIDDEN) ? S_FALSE : S_OK;
1128}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLuint index
Definition: glext.h:6031
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
struct tagREBARBANDINFOW REBARBANDINFOW
#define RB_IDTOINDEX
Definition: commctrl.h:1588
#define RBBS_HIDDEN
Definition: commctrl.h:1492
#define RBBIM_STYLE
Definition: commctrl.h:1502

Referenced by OnContextMenu(), QueryStatus(), Save(), and ShowDW().

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CInternetToolbar::IsDirty ( void  )
override

Implements IPersistStreamInit.

Definition at line 1028 of file internettoolbar.cpp.

1029{
1030 return E_NOTIMPL;
1031}

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CInternetToolbar::IsWindowOwner ( HWND  hWnd)
override

Definition at line 1500 of file internettoolbar.cpp.

1501{
1503 return E_NOTIMPL;
1504}

◆ Load()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Load ( IStream pStm)
override

Definition at line 1033 of file internettoolbar.cpp.

1034{
1036 HRESULT hr = InitNew();
1038 if (SUCCEEDED(hr))
1039 {
1040 hr = S_FALSE;
1041 ULONG cb = sizeof(state);
1042 if (pStm->Read(&state, cb, &cb) == S_OK && state.Signature == state.SIG)
1043 {
1047 //SetBandVisibility(ITBBID_?, state.Linksbar);
1048 //SetBandVisibility(ITBBID_?, state.Throbber);
1049 hr = S_OK;
1050 }
1051 }
1053 return hr;
1054}
static int state
Definition: maze.c:121
STDMETHOD() InitNew() override
HRESULT SetBandVisibility(int BandID, int Show)
#define TRUE
Definition: types.h:120
HRESULT Read([out, size_is(cb), length_is(*pcbRead)] void *pv, [in] ULONG cb, [out] ULONG *pcbRead)
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
uint32_t ULONG
Definition: typedefs.h:59

◆ LockUnlockToolbars()

HRESULT CInternetToolbar::LockUnlockToolbars ( bool  locked)

Definition at line 742 of file internettoolbar.cpp.

743{
744 if (locked != !!pSettings->fLocked)
745 {
746 pSettings->fLocked = (BOOL)locked;
747 pSettings->Save();
749 }
750 return S_OK;
751}
void RefreshLockedToolbarState()
#define BOOL
Definition: nt_native.h:43
void Save()
Definition: settings.cpp:12

Referenced by Exec(), and OnContextMenu().

◆ ModifyButton()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ModifyButton ( const GUID pguidCmdGroup,
long  param10,
long  param14 
)
override

Definition at line 1381 of file internettoolbar.cpp.

1382{
1383 return E_NOTIMPL;
1384}

◆ OnChange()

HRESULT STDMETHODCALLTYPE CInternetToolbar::OnChange ( LONG  lEvent,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2 
)
override

Definition at line 1386 of file internettoolbar.cpp.

1387{
1388 return E_NOTIMPL;
1389}

◆ OnCommand()

LRESULT CInternetToolbar::OnCommand ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1887 of file internettoolbar.cpp.

1888{
1889 LRESULT theResult;
1890 HRESULT hResult;
1891
1892 hResult = OnWinEvent((HWND) lParam, uMsg, wParam, lParam, &theResult);
1893
1894 bHandled = hResult == S_OK;
1895
1896 return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1897}
STDMETHOD() OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
LONG_PTR LRESULT
Definition: windef.h:209

◆ OnContextMenu()

LRESULT CInternetToolbar::OnContextMenu ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1740 of file internettoolbar.cpp.

1741{
1742 HMENU contextMenuBar;
1743 HMENU contextMenu;
1744 POINT clickLocation;
1745 int command;
1746 RBHITTESTINFO hitTestInfo;
1747 REBARBANDINFOW rebarBandInfo;
1748 int bandID;
1749
1750 clickLocation.x = LOWORD(lParam);
1751 clickLocation.y = HIWORD(lParam);
1752 hitTestInfo.pt = clickLocation;
1753 ScreenToClient(&hitTestInfo.pt);
1754 SendMessage(fMainReBar, RB_HITTEST, 0, (LPARAM)&hitTestInfo);
1755 if (hitTestInfo.iBand == -1)
1756 return 0;
1757
1758 rebarBandInfo.cbSize = sizeof(rebarBandInfo);
1759 rebarBandInfo.fMask = RBBIM_ID;
1760 SendMessage(fMainReBar, RB_GETBANDINFOW, hitTestInfo.iBand, (LPARAM)&rebarBandInfo);
1761 bandID = rebarBandInfo.wID;
1762 contextMenuBar = LoadMenu(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDM_CABINET_CONTEXTMENU));
1763 contextMenu = GetSubMenu(contextMenuBar, 0);
1764 switch (bandID)
1765 {
1766 case ITBBID_MENUBAND: // menu band
1770 break;
1771 case ITBBID_BRANDBAND: // brand band
1775 break;
1776 case ITBBID_TOOLSBAND: // tools band
1779 break;
1780 case ITBBID_ADDRESSBAND: // navigation band
1783 break;
1784 default:
1785 break;
1786 }
1787
1789
1796
1797 // TODO: use GetSystemMetrics(SM_MENUDROPALIGNMENT) to determine menu alignment
1799 clickLocation.x, clickLocation.y, 0, m_hWnd, NULL);
1800 switch (command)
1801 {
1802 case IDM_TOOLBARS_STANDARDBUTTONS: // standard buttons
1804 break;
1805 case IDM_TOOLBARS_ADDRESSBAR: // address bar
1807 break;
1808 case IDM_TOOLBARS_LINKSBAR: // links
1809 break;
1810 case IDM_TOOLBARS_LOCKTOOLBARS: // lock the toolbars
1812 break;
1813 case IDM_TOOLBARS_CUSTOMIZE: // customize
1815 break;
1818 break;
1819 }
1820
1821 DestroyMenu(contextMenuBar);
1822 return 1;
1823}
HRESULT IsBandVisible(int BandID)
#define IDM_TOOLBARS_LOCKTOOLBARS
Definition: resource.h:33
#define IDM_TOOLBARS_TEXTLABELS
Definition: resource.h:35
#define IDM_TOOLBARS_STANDARDBUTTONS
Definition: resource.h:30
#define IDM_CABINET_CONTEXTMENU
Definition: resource.h:88
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
#define IDM_TOOLBARS_CUSTOMIZE
Definition: resource.h:34
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
#define IDM_TOOLBARS_LINKSBAR
Definition: resource.h:32
DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck)
Definition: ordinal.c:1800
UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable)
Definition: ordinal.c:1781
#define LOWORD(l)
Definition: pedump.c:82
#define TB_CUSTOMIZE
Definition: commctrl.h:1130
#define RB_HITTEST
Definition: commctrl.h:1581
BOOL fShowGoButton
Definition: settings.h:16
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define HIWORD(l)
Definition: typedefs.h:247
#define TPM_RIGHTBUTTON
Definition: winuser.h:2383
#define WM_COMMAND
Definition: winuser.h:1743
#define TPM_TOPALIGN
Definition: winuser.h:2386
#define TPM_LEFTALIGN
Definition: winuser.h:2380
#define LoadMenu
Definition: winuser.h:5829
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define TPM_RETURNCMD
Definition: winuser.h:2390
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

◆ OnFolders()

LRESULT CInternetToolbar::OnFolders ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 1603 of file internettoolbar.cpp.

1604{
1605 IUnknown_Exec(fSite, CGID_Explorer, 0x23, 0, NULL, NULL);
1606 return 1;
1607}

◆ OnForwardToCommandTarget()

LRESULT CInternetToolbar::OnForwardToCommandTarget ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 1609 of file internettoolbar.cpp.

1610{
1611 HRESULT hResult;
1612
1613 if (fCommandTarget.p != NULL)
1614 {
1615 hResult = fCommandTarget->Exec(&fCommandCategory, wID, 0, NULL, NULL);
1616 if (FAILED(hResult))
1617 {
1618 ::SendMessageW(::GetParent(m_hWnd), WM_COMMAND, wID, 0);
1619 }
1620 }
1621 return 1;
1622}
CComPtr< IOleCommandTarget > fCommandTarget
#define FAILED(hr)
Definition: intsafe.h:51
HWND WINAPI GetParent(_In_ HWND)

◆ OnLDown()

LRESULT CInternetToolbar::OnLDown ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1913 of file internettoolbar.cpp.

1914{
1915 bHandled = FALSE;
1916 if (pSettings->fLocked)
1917 return 0;
1918
1919 if (wParam & MK_CONTROL)
1920 return 0;
1921
1922 fSizing = TRUE;
1923
1924 DWORD msgp = GetMessagePos();
1925
1928
1929 RECT rc;
1930 GetWindowRect(&rc);
1931
1932 fStartHeight = rc.bottom - rc.top;
1933
1934 SetCapture();
1935
1936 bHandled = TRUE;
1937 return 0;
1938}
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
HWND WINAPI SetCapture(_In_ HWND hWnd)
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1351
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define MK_CONTROL
Definition: winuser.h:2373

◆ OnLUp()

LRESULT CInternetToolbar::OnLUp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1958 of file internettoolbar.cpp.

1959{
1960 bHandled = FALSE;
1961 if (!fSizing)
1962 return 0;
1963
1964 OnMouseMove(uMsg, wParam, lParam, bHandled);
1965
1966 fSizing = FALSE;
1967
1969
1970 return 0;
1971}
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890

◆ OnMenuDropDown()

LRESULT CInternetToolbar::OnMenuDropDown ( UINT  idControl,
NMHDR pNMHDR,
BOOL bHandled 
)

Definition at line 1624 of file internettoolbar.cpp.

1625{
1626 CComPtr<IBrowserService> browserService;
1627 CComPtr<IOleCommandTarget> commandTarget;
1628 CComPtr<ITravelLog> travelLog;
1629 NMTOOLBARW *notifyInfo;
1630 RECT bounds;
1631 HMENU newMenu;
1633 int selectedItem;
1634 VARIANT parmIn;
1635 OLECMD commandInfo;
1636 HRESULT hResult;
1637 wchar_t templateString[200];
1638
1639 notifyInfo = (NMTOOLBARW *)pNMHDR;
1640 if (notifyInfo->hdr.hwndFrom != fToolbarWindow)
1641 {
1642 // not from the toolbar, keep looking for a message handler
1643 bHandled = FALSE;
1644 return 0;
1645 }
1646 SendMessage(fToolbarWindow, TB_GETRECT, notifyInfo->iItem, reinterpret_cast<LPARAM>(&bounds));
1647 ::MapWindowPoints(fToolbarWindow, NULL, reinterpret_cast<POINT *>(&bounds), 2);
1648 switch (notifyInfo->iItem)
1649 {
1650 case IDM_GOTO_BACK:
1651 newMenu = CreatePopupMenu();
1653 hResult = browserService->GetTravelLog(&travelLog);
1654 hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_BACK);
1655 commandInfo.cmdID = 0x1d;
1656 hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1657 if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1658 travelLog->CountEntries(browserService) > 1)
1659 {
1660 AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1661
1662 if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1663 IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1664 StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1665
1666 AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1667 }
1668 params.cbSize = sizeof(params);
1669 params.rcExclude = bounds;
1670 selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1671 bounds.left, bounds.bottom, m_hWnd, &params);
1672 if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1673 {
1674 V_VT(&parmIn) = VT_I4;
1675 V_I4(&parmIn) = 1;
1676 Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1677 }
1678 else if (selectedItem != 0)
1679 hResult = travelLog->Travel(browserService, -selectedItem);
1680 DestroyMenu(newMenu);
1681 break;
1682 case IDM_GOTO_FORWARD:
1683 newMenu = CreatePopupMenu();
1685 hResult = browserService->GetTravelLog(&travelLog);
1686 hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_FORE);
1687 commandInfo.cmdID = 0x1d;
1688 hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1689 if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1690 travelLog->CountEntries(browserService) > 1)
1691 {
1692 AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1693
1694 if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1695 IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1696 StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1697
1698 AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1699 }
1700 params.cbSize = sizeof(params);
1701 params.rcExclude = bounds;
1702 selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1703 bounds.left, bounds.bottom, m_hWnd, &params);
1704 if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1705 {
1706 V_VT(&parmIn) = VT_I4;
1707 V_I4(&parmIn) = 1;
1708 Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1709 }
1710 else if (selectedItem != 0)
1711 hResult = travelLog->Travel(browserService, selectedItem);
1712 DestroyMenu(newMenu);
1713 break;
1714 case gViewsCommandID:
1715 VARIANT inValue;
1716 CComVariant outValue;
1717 HRESULT hResult;
1718
1719 V_VT(&inValue) = VT_INT_PTR;
1720 V_INTREF(&inValue) = reinterpret_cast<INT *>(&bounds);
1721
1722 if (fCommandTarget.p != NULL)
1723 hResult = fCommandTarget->Exec(&fCommandCategory, FCIDM_SHVIEW_AUTOARRANGE, 1, &inValue, &outValue);
1724 // pvaOut is VT_I4 with value 0x403
1725 break;
1726 }
1727 return TBDDRET_DEFAULT;
1728}
STDMETHOD() Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
#define IDS_HISTORYTEXT
Definition: resource.h:128
#define IDM_EXPLORERBAR_HISTORY
Definition: resource.h:42
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1501
GLenum const GLfloat * params
Definition: glext.h:5645
static const int gViewsCommandID
#define TBDDRET_DEFAULT
Definition: commctrl.h:1424
#define TB_GETRECT
Definition: commctrl.h:1153
#define SID_SShellBrowser
Definition: shlguid.h:128
#define TLMENUF_BACK
Definition: shlobj.h:2742
#define TLMENUF_FORE
Definition: shlobj.h:2743
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:843
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
HWND hwndFrom
Definition: winuser.h:3160
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define MF_STRING
Definition: winuser.h:138
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define MF_SEPARATOR
Definition: winuser.h:137
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)

◆ OnMouseMove()

LRESULT CInternetToolbar::OnMouseMove ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1940 of file internettoolbar.cpp.

1941{
1942 bHandled = FALSE;
1943 if (!fSizing)
1944 return 0;
1945
1946 DWORD msgp = GetMessagePos();
1947
1948 POINT pt;
1949 pt.x = GET_X_LPARAM(msgp);
1950 pt.y = GET_Y_LPARAM(msgp);
1951
1953
1954 bHandled = TRUE;
1955 return 0;
1956}
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
#define pt(x, y)
Definition: drawing.c:79

Referenced by OnLUp().

◆ OnNavigateCommand()

LRESULT CInternetToolbar::OnNavigateCommand ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

◆ OnNotify()

LRESULT CInternetToolbar::OnNotify ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1898 of file internettoolbar.cpp.

1899{
1900 NMHDR *notifyHeader;
1901 LRESULT theResult;
1902 HRESULT hResult;
1903
1904 notifyHeader = reinterpret_cast<NMHDR *>(lParam);
1905
1906 hResult = OnWinEvent(notifyHeader->hwndFrom, uMsg, wParam, lParam, &theResult);
1907
1908 bHandled = hResult == S_OK;
1909
1910 return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1911}

◆ OnQueryDelete()

LRESULT CInternetToolbar::OnQueryDelete ( UINT  idControl,
NMHDR pNMHDR,
BOOL bHandled 
)

Definition at line 1735 of file internettoolbar.cpp.

1736{
1737 return 1;
1738}

◆ OnQueryInsert()

LRESULT CInternetToolbar::OnQueryInsert ( UINT  idControl,
NMHDR pNMHDR,
BOOL bHandled 
)

Definition at line 1730 of file internettoolbar.cpp.

1731{
1732 return 1;
1733}

◆ OnSearch()

LRESULT CInternetToolbar::OnSearch ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 1597 of file internettoolbar.cpp.

1598{
1599 IUnknown_Exec(fSite, CGID_Explorer, 0x1c, 1, NULL, NULL);
1600 return 1;
1601}

◆ OnSetCursor()

LRESULT CInternetToolbar::OnSetCursor ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1835 of file internettoolbar.cpp.

1836{
1837 if ((short)lParam != HTCLIENT || (HWND)wParam != m_hWnd)
1838 {
1839 bHandled = FALSE;
1840 return 0;
1841 }
1843 return 1;
1844}
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define IDC_SIZENS
Definition: winuser.h:695
#define HTCLIENT
Definition: winuser.h:2478
#define LoadCursor
Definition: winuser.h:5824

◆ OnSettingsChange()

LRESULT CInternetToolbar::OnSettingsChange ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1995 of file internettoolbar.cpp.

1996{
1997 /* Refresh toolbar locked state */
1999
2000 return 0;
2001}

◆ OnSize()

LRESULT CInternetToolbar::OnSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1825 of file internettoolbar.cpp.

1826{
1827 if (wParam != SIZE_MINIMIZED)
1828 {
1831 }
1832 return 1;
1833}
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1247
#define SIZE_MINIMIZED
Definition: winuser.h:2509
#define SWP_NOOWNERZORDER
Definition: winuser.h:1252
#define SWP_NOZORDER
Definition: winuser.h:1250

◆ OnTipText()

LRESULT CInternetToolbar::OnTipText ( UINT  idControl,
NMHDR pNMHDR,
BOOL bHandled 
)

Definition at line 1846 of file internettoolbar.cpp.

1847{
1848 CComPtr<IBrowserService> browserService;
1849 CComPtr<ITravelLog> travelLog;
1850 TOOLTIPTEXTW *pTTTW;
1851 UINT nID;
1852 HRESULT hResult;
1853 wchar_t tempString[300];
1854
1855 pTTTW = reinterpret_cast<TOOLTIPTEXTW *>(pNMHDR);
1856 if ((pTTTW->uFlags & TTF_IDISHWND) != 0)
1857 nID = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
1858 else
1859 nID = (UINT)pNMHDR->idFrom;
1860
1861 if (nID != 0)
1862 {
1863 if (nID == (UINT)IDM_GOTO_BACK || nID == (UINT)IDM_GOTO_FORWARD)
1864 {
1865 // TODO: Should this call QueryService?
1866 hResult = fSite->QueryInterface(IID_PPV_ARG(IBrowserService, &browserService));
1867 hResult = browserService->GetTravelLog(&travelLog);
1868 hResult = travelLog->GetToolTipText(browserService,
1869 (nID == (UINT)IDM_GOTO_BACK) ? TLOG_BACK : TLOG_FORE,
1870 0, tempString, 299);
1871 if (FAILED_UNEXPECTEDLY(hResult))
1872 {
1873 bHandled = FALSE;
1874 return 0;
1875 }
1876 }
1877 else
1878 tempString[0] = 0;
1879 wcsncpy (pTTTW->szText, tempString, sizeof(pTTTW->szText) / sizeof(wchar_t));
1880 ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0,
1882 return 0;
1883 }
1884 return 0;
1885}
if(dx< 0)
Definition: linetemp.h:194
unsigned int UINT
Definition: ndis.h:50
#define TOOLTIPTEXTW
Definition: commctrl.h:1889
#define TTF_IDISHWND
Definition: commctrl.h:1764
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
#define TLOG_FORE
Definition: shlobj.h:2738
#define TLOG_BACK
Definition: shlobj.h:2737
UINT_PTR idFrom
Definition: winuser.h:3161
#define SWP_NOACTIVATE
Definition: winuser.h:1245
#define SWP_NOSIZE
Definition: winuser.h:1248
#define HWND_TOP
Definition: winuser.h:1210
int WINAPI GetDlgCtrlID(_In_ HWND)

◆ OnTravelBack()

LRESULT CInternetToolbar::OnTravelBack ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 1567 of file internettoolbar.cpp.

1568{
1569 CComPtr<IWebBrowser> webBrowser;
1570 HRESULT hResult;
1571
1572 hResult = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IWebBrowser, &webBrowser));
1573 if (FAILED_UNEXPECTEDLY(hResult))
1574 return 0;
1575 hResult = webBrowser->GoBack();
1576 return 1;
1577}

◆ OnTravelForward()

LRESULT CInternetToolbar::OnTravelForward ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 1579 of file internettoolbar.cpp.

1580{
1581 CComPtr<IWebBrowser> webBrowser;
1582 HRESULT hResult;
1583
1584 hResult = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IWebBrowser, &webBrowser));
1585 if (FAILED_UNEXPECTEDLY(hResult))
1586 return 0;
1587 hResult = webBrowser->GoForward();
1588 return 1;
1589}

◆ OnUpLevel()

LRESULT CInternetToolbar::OnUpLevel ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)

Definition at line 1591 of file internettoolbar.cpp.

1592{
1593 IUnknown_Exec(fSite, CGID_ShellBrowser, IDM_GOTO_UPONELEVEL, 0, NULL, NULL);
1594 return 1;
1595}

◆ OnWinEvent()

HRESULT STDMETHODCALLTYPE CInternetToolbar::OnWinEvent ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT theResult 
)
override

Definition at line 1471 of file internettoolbar.cpp.

1473{
1474 HRESULT hResult;
1475
1476 if (fMenuBar)
1477 {
1478 hResult = IUnknown_RelayWinEvent(fMenuBar, hWnd, uMsg, wParam, lParam, theResult);
1479 if (hResult != S_FALSE)
1480 return hResult;
1481 }
1482
1483 if (fNavigationBar)
1484 {
1485 hResult = IUnknown_RelayWinEvent(fNavigationBar, hWnd, uMsg, wParam, lParam, theResult);
1486 if (hResult != S_FALSE)
1487 return hResult;
1488 }
1489
1490 if (fLogoBar)
1491 {
1492 hResult = IUnknown_RelayWinEvent(fLogoBar, hWnd, uMsg, wParam, lParam, theResult);
1493 if (hResult != S_FALSE)
1494 return hResult;
1495 }
1496
1497 return S_FALSE;
1498}
HWND hWnd
Definition: settings.c:17
HRESULT IUnknown_RelayWinEvent(IUnknown *punk, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)

Referenced by OnCommand(), and OnNotify().

◆ OnWinIniChange()

LRESULT CInternetToolbar::OnWinIniChange ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1973 of file internettoolbar.cpp.

1974{
1975 HRESULT hr;
1976 HWND hwndMenu;
1977
1978 hr = IUnknown_GetWindow(fMenuBar, &hwndMenu);
1980 return 0;
1981
1982 CComPtr<IWinEventHandler> menuWinEventHandler;
1983 hr = fMenuBar->QueryInterface(IID_PPV_ARG(IWinEventHandler, &menuWinEventHandler));
1985 return 0;
1986
1987 LRESULT lres;
1988 hr = menuWinEventHandler->OnWinEvent(hwndMenu, uMsg, wParam, lParam, &lres);
1990 return 0;
1991
1992 return lres;
1993}

◆ QueryBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::QueryBand ( DWORD  dwBandID,
IDeskBand **  ppstb,
DWORD pdwState,
LPWSTR  pszName,
int  cchName 
)
override

Implements IBandSite.

Definition at line 1524 of file internettoolbar.cpp.

1526{
1527 if (ppstb == NULL)
1528 return E_POINTER;
1529 if (dwBandID == ITBBID_MENUBAND && fMenuBar.p != NULL)
1530 return fMenuBar->QueryInterface(IID_PPV_ARG(IDeskBand, ppstb));
1531 //if (dwBandID == ITBBID_BRANDBAND && fLogoBar.p != NULL)
1532 // return fLogoBar->QueryInterface(IID_PPV_ARG(IDeskBand, ppstb));
1533 *ppstb = NULL;
1534 return E_FAIL;
1535}

◆ QueryService()

HRESULT STDMETHODCALLTYPE CInternetToolbar::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
override

Implements IServiceProvider.

Definition at line 1452 of file internettoolbar.cpp.

1453{
1454 HRESULT hResult;
1455
1456 if (IsEqualIID(guidService, IID_IBandSite))
1457 return this->QueryInterface(riid, ppvObject);
1458 if (IsEqualIID(guidService, SID_IBandProxy))
1459 {
1460 if (fBandProxy.p == NULL)
1461 {
1462 hResult = CreateAndInitBandProxy();
1463 if (FAILED_UNEXPECTEDLY(hResult))
1464 return hResult;
1465 }
1466 return fBandProxy->QueryInterface(riid, ppvObject);
1467 }
1468 return IUnknown_QueryService(fSite, guidService, riid, ppvObject);
1469}
HRESULT CreateAndInitBandProxy()
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

Referenced by CDockSite::QueryService().

◆ QueryStatus()

HRESULT STDMETHODCALLTYPE CInternetToolbar::QueryStatus ( const GUID pguidCmdGroup,
ULONG  cCmds,
OLECMD  prgCmds[],
OLECMDTEXT pCmdText 
)
override

Implements IOleCommandTarget.

Definition at line 1158 of file internettoolbar.cpp.

1160{
1161 if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1162 {
1163 while (cCmds != 0)
1164 {
1165 switch (prgCmds->cmdID)
1166 {
1167 case ITID_TEXTLABELS: // Text Labels state
1168 prgCmds->cmdf = OLECMDF_SUPPORTED;
1169 break;
1170 case ITID_TOOLBARBANDSHOWN: // toolbar visibility
1171 prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1173 prgCmds->cmdf |= OLECMDF_LATCHED;
1174 break;
1175 case ITID_ADDRESSBANDSHOWN: // address bar visibility
1176 prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1178 prgCmds->cmdf |= OLECMDF_LATCHED;
1179 break;
1180 case ITID_LINKSBANDSHOWN: // links bar visibility
1181 prgCmds->cmdf = 0;
1182 break;
1183 case ITID_MENUBANDSHOWN: // Menubar band visibility
1184 prgCmds->cmdf = OLECMDF_SUPPORTED;
1185 if (fMenuBar)
1186 prgCmds->cmdf |= OLECMDF_LATCHED;
1187 break;
1188 case ITID_AUTOHIDEENABLED: // Auto hide enabled/disabled
1189 prgCmds->cmdf = 0;
1190 break;
1191 case ITID_CUSTOMIZEENABLED: // customize enabled
1192 prgCmds->cmdf = OLECMDF_SUPPORTED;
1193 break;
1194 case ITID_TOOLBARLOCKED: // lock toolbars
1195 prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1196 if (pSettings->fLocked)
1197 prgCmds->cmdf |= OLECMDF_LATCHED;
1198 break;
1199 default:
1200 prgCmds->cmdf = 0;
1201 break;
1202 }
1203 prgCmds++;
1204 cCmds--;
1205 }
1206 return S_OK;
1207 }
1208 return E_FAIL;
1209}
#define ITID_AUTOHIDEENABLED
Definition: undocshell.h:848
#define ITID_MENUBANDSHOWN
Definition: undocshell.h:847

◆ RefreshLockedToolbarState()

void CInternetToolbar::RefreshLockedToolbarState ( )

Definition at line 753 of file internettoolbar.cpp.

754{
755 REBARBANDINFOW rebarBandInfo;
756 int bandCount;
757 CDockSite *dockSite;
758
759 rebarBandInfo.cbSize = sizeof(rebarBandInfo);
760 rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_LPARAM;
761 bandCount = (int)SendMessage(fMainReBar, RB_GETBANDCOUNT, 0, 0);
762 for (INT x = 0; x < bandCount; x++)
763 {
764 SendMessage(fMainReBar, RB_GETBANDINFOW, x, (LPARAM)&rebarBandInfo);
765 dockSite = reinterpret_cast<CDockSite *>(rebarBandInfo.lParam);
766 if (dockSite != NULL)
767 {
768 rebarBandInfo.fStyle &= ~(RBBS_NOGRIPPER | RBBS_GRIPPERALWAYS);
769 if ((dockSite->fFlags & CDockSite::ITF_NOGRIPPER) || pSettings->fLocked)
770 rebarBandInfo.fStyle |= RBBS_NOGRIPPER;
772 rebarBandInfo.fStyle |= RBBS_GRIPPERALWAYS;
773 SendMessage(fMainReBar, RB_SETBANDINFOW, x, (LPARAM)&rebarBandInfo);
774 }
775 }
777}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define RB_SETBANDINFOW
Definition: commctrl.h:1584
#define RBBS_NOGRIPPER
Definition: commctrl.h:1497
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1496

Referenced by LockUnlockToolbars(), and OnSettingsChange().

◆ RemoveBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::RemoveBand ( DWORD  dwBandID)
override

Implements IBandSite.

Definition at line 1543 of file internettoolbar.cpp.

1544{
1546 return E_NOTIMPL;
1547}

◆ ReserveBorderSpace()

HRESULT CInternetToolbar::ReserveBorderSpace ( LONG  maxHeight = -1)

Definition at line 661 of file internettoolbar.cpp.

662{
663 CComPtr<IDockingWindowSite> dockingWindowSite;
664 RECT availableBorderSpace;
665
666 HRESULT hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
667 if (FAILED_UNEXPECTEDLY(hResult))
668 return hResult;
669 hResult = dockingWindowSite->GetBorderDW(static_cast<IDockingWindow *>(this), &availableBorderSpace);
670 if (FAILED_UNEXPECTEDLY(hResult))
671 return hResult;
672
673 if (maxHeight && availableBorderSpace.bottom - availableBorderSpace.top > maxHeight)
674 {
675 availableBorderSpace.bottom = availableBorderSpace.top + maxHeight;
676 }
677
678 return ResizeBorderDW(&availableBorderSpace, fSite, FALSE);
679}
STDMETHOD() ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override

Referenced by OnMouseMove(), RefreshLockedToolbarState(), SetBandVisibility(), and ShowDW().

◆ ResizeBorderDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ResizeBorderDW ( LPCRECT  prcBorder,
IUnknown punkToolbarSite,
BOOL  fReserved 
)
override

Implements IDockingWindow.

Definition at line 977 of file internettoolbar.cpp.

979{
980 RECT neededBorderSpace;
981 RECT availableBorderSpace = *prcBorder;
982
983 SendMessage(fMainReBar, RB_SIZETORECT, RBSTR_CHANGERECT, reinterpret_cast<LPARAM>(&availableBorderSpace));
984
985 // RBSTR_CHANGERECT does not seem to set the proper size in the rect.
986 // Let's make sure we fetch the actual size properly.
987 ::GetWindowRect(fMainReBar, &availableBorderSpace);
988 neededBorderSpace.left = 0;
989 neededBorderSpace.top = availableBorderSpace.bottom - availableBorderSpace.top;
990 if (!pSettings->fLocked)
991 neededBorderSpace.top += 3;
992 neededBorderSpace.right = 0;
993 neededBorderSpace.bottom = 0;
994
995 CComPtr<IDockingWindowSite> dockingWindowSite;
996
997 HRESULT hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
998 if (FAILED_UNEXPECTEDLY(hResult))
999 return hResult;
1000
1001 hResult = dockingWindowSite->RequestBorderSpaceDW(static_cast<IDockingWindow *>(this), &neededBorderSpace);
1002 if (FAILED_UNEXPECTEDLY(hResult))
1003 return hResult;
1004
1005 hResult = dockingWindowSite->SetBorderSpaceDW(static_cast<IDockingWindow *>(this), &neededBorderSpace);
1006 if (FAILED_UNEXPECTEDLY(hResult))
1007 return hResult;
1008
1009 return S_OK;
1010}
#define RBSTR_CHANGERECT
Definition: commctrl.h:1596
#define RB_SIZETORECT
Definition: commctrl.h:1598
LONG right
Definition: windef.h:308

Referenced by ReserveBorderSpace().

◆ Save()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Save ( IStream pStm,
BOOL  fClearDirty 
)
override

Definition at line 1056 of file internettoolbar.cpp.

1057{
1058 ITBARSTATE state = { sizeof(state), state.SIG };
1060 state.StdToolbar = IsBandVisible(ITBBID_TOOLSBAND) == S_OK;
1061 state.Addressbar = IsBandVisible(ITBBID_ADDRESSBAND) == S_OK;
1062 state.Linksbar = FALSE;
1063 return pStm->Write(&state, sizeof(state), NULL);
1064}
HRESULT Write([in, size_is(cb)] const void *pv, [in] ULONG cb, [out] ULONG *pcbWritten)

◆ SendToolbarMsg()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SendToolbarMsg ( const GUID pguidCmdGroup,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT result 
)
override

Definition at line 1362 of file internettoolbar.cpp.

1364{
1365 if (fToolbarWindow)
1366 {
1368 if (result)
1369 *result = res;
1370 return S_OK;
1371 }
1372 return E_NOTIMPL;
1373}
GLuint res
Definition: glext.h:9613

◆ SetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetBandSiteInfo ( const BANDSITEINFO pbsinfo)
override

Implements IBandSite.

Definition at line 1555 of file internettoolbar.cpp.

1556{
1558 return E_NOTIMPL;
1559}

◆ SetBandState()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetBandState ( DWORD  dwBandID,
DWORD  dwMask,
DWORD  dwState 
)
override

Implements IBandSite.

Definition at line 1537 of file internettoolbar.cpp.

1538{
1540 return E_NOTIMPL;
1541}

◆ SetBandVisibility()

HRESULT CInternetToolbar::SetBandVisibility ( int  BandID,
int  Show 
)

Definition at line 1130 of file internettoolbar.cpp.

1131{
1132 int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1135 return E_FAIL;
1136
1137 if (Show < 0)
1138 bandInfo.fStyle ^= RBBS_HIDDEN; // Toggle
1139 else if (Show)
1140 bandInfo.fStyle &= ~RBBS_HIDDEN;
1141 else
1142 bandInfo.fStyle |= RBBS_HIDDEN;
1143
1144 bandInfo.fMask &= ~RBBIM_CHILD;
1145 ::ShowWindow(bandInfo.hwndChild, (bandInfo.fStyle & RBBS_HIDDEN) ? SW_HIDE : SW_SHOW); // CORE-17236
1147
1149 SetDirty();
1150 return S_OK;
1151}
#define RBBIM_CHILD
Definition: commctrl.h:1506
#define SW_HIDE
Definition: winuser.h:771
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:778

Referenced by Load(), and ToggleBandVisibility().

◆ SetCommandTarget()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetCommandTarget ( IUnknown theTarget,
GUID category,
long  param14 
)
override

Definition at line 1290 of file internettoolbar.cpp.

1291{
1292 HRESULT hResult;
1293
1294 TRACE("SetCommandTarget %p category %s param %d\n", theTarget, wine_dbgstr_guid(category), param14);
1295
1296 fCommandTarget.Release();
1298 if (FAILED_UNEXPECTEDLY(hResult))
1299 return hResult;
1301 return S_OK;
1302}
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
#define TRACE(s)
Definition: solgame.cpp:4

◆ SetDirty()

HRESULT CInternetToolbar::SetDirty ( )

Definition at line 1020 of file internettoolbar.cpp.

1021{
1022 if (fIgnoreChanges)
1023 return S_OK;
1024 IUnknown_Exec(fSite, CGID_ShellBrowser, IDM_NOTIFYITBARDIRTY, 0, NULL, NULL);
1025 return S_OK;
1026}
#define IDM_NOTIFYITBARDIRTY
Definition: resource.h:76

Referenced by SetBandVisibility().

◆ SetImageList()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetImageList ( const GUID pguidCmdGroup,
HIMAGELIST  param10,
HIMAGELIST  param14,
HIMAGELIST  param18 
)
override

Definition at line 1375 of file internettoolbar.cpp.

1377{
1378 return E_NOTIMPL;
1379}

◆ SetSite()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetSite ( IUnknown pUnkSite)
override

Implements IObjectWithSite.

Definition at line 1391 of file internettoolbar.cpp.

1392{
1393 CComPtr<IBrowserService> browserService;
1394 HWND ownerWindow;
1395 HWND dockContainer;
1396 HRESULT hResult;
1397
1398 if (pUnkSite == NULL)
1399 {
1400 hResult = AtlUnadvise(fSite, DIID_DWebBrowserEvents, fAdviseCookie);
1402 DestroyWindow();
1403 fSite.Release();
1404 }
1405 else
1406 {
1407 // get window handle of owner
1408 hResult = IUnknown_GetWindow(pUnkSite, &ownerWindow);
1409 if (FAILED_UNEXPECTEDLY(hResult))
1410 return hResult;
1411 if (ownerWindow == NULL)
1412 return E_FAIL;
1413
1414 // Get settings from owner window
1416
1417 // create dock container
1418 fSite = pUnkSite;
1419 dockContainer = SHCreateWorkerWindowW(0, ownerWindow, 0,
1421 if (dockContainer == NULL)
1422 return E_FAIL;
1423 SubclassWindow(dockContainer);
1424
1425 // create rebar in dock container
1431 0, 0, 700, 60, dockContainer, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
1432 if (fMainReBar == NULL)
1433 return E_FAIL;
1434
1435 // take advice to watch events
1436 hResult = IUnknown_QueryService(pUnkSite, SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService));
1437 hResult = AtlAdvise(browserService, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &fAdviseCookie);
1438 }
1439 return S_OK;
1440}
Arabic default style
Definition: afstyles.h:94
void Release()
Definition: atlcomcli.h:170
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:45
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:73
#define BWM_GETSETTINGSPTR
Definition: settings.h:11
HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:3004
#define WS_CHILD
Definition: pedump.c:617
#define WS_BORDER
Definition: pedump.c:625
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define RBS_REGISTERDROP
Definition: commctrl.h:1474
#define REBARCLASSNAMEW
Definition: commctrl.h:1463
#define RBS_BANDBORDERS
Definition: commctrl.h:1472
#define RBS_AUTOSIZE
Definition: commctrl.h:1475
#define CCS_NODIVIDER
Definition: commctrl.h:2253
#define CCS_TOP
Definition: commctrl.h:2247
#define RBS_VARHEIGHT
Definition: commctrl.h:1471
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2251
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1477
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define CreateWindowEx
Definition: winuser.h:5767
#define WS_EX_RIGHTSCROLLBAR
Definition: winuser.h:401
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define WS_EX_LTRREADING
Definition: winuser.h:393
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WS_EX_LEFT
Definition: winuser.h:391

Referenced by CloseDW().

◆ SetState() [1/2]

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetState ( const GUID pguidCmdGroup,
long  commandID,
long  theState 
)
override

Definition at line 1341 of file internettoolbar.cpp.

1342{
1343 // map the command id
1344 ::SendMessage(fToolbarWindow, TB_SETSTATE, commandID, MAKELONG(theState, 0));
1345 return S_OK;
1346}
#define TB_SETSTATE
Definition: commctrl.h:1054

◆ SetState() [2/2]

HRESULT CInternetToolbar::SetState ( const GUID pguidCmdGroup,
long  commandID,
OLECMD pcmd 
)

Definition at line 779 of file internettoolbar.cpp.

780{
781 long state = 0;
782 if (pcmd->cmdf & OLECMDF_ENABLED)
784 if (pcmd->cmdf & OLECMDF_LATCHED)
786 return SetState(pguidCmdGroup, commandID, state);
787}
#define TBSTATE_CHECKED
Definition: commctrl.h:972

Referenced by CommandStateChanged(), and SetState().

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ShowDW ( BOOL  fShow)
override

Implements IDockingWindow.

Definition at line 914 of file internettoolbar.cpp.

915{
916 HRESULT hResult;
917
918 // show the bar here
919 if (fShow)
920 {
921 hResult = ReserveBorderSpace();
922 if (FAILED_UNEXPECTEDLY(hResult))
923 return hResult;
924 }
925
926 // TODO: Why should showing the IDockingWindow change all bands? Related to CORE-17236 and CORE-19659.
927 int id;
928 IUnknown *pUnk;
929 for (UINT i = 0; SUCCEEDED(EnumBands(i, &id, &pUnk)); ++i)
930 {
931 if (!pUnk)
932 continue;
933 BOOL visible = fShow && IsBandVisible(id) != S_FALSE;
934 hResult = IUnknown_ShowDW(pUnk, visible);
935 FAILED_UNEXPECTEDLY(hResult);
936 }
937 return S_OK;
938}
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HRESULT IUnknown_ShowDW(IUnknown *punk, BOOL fShow)

◆ ToggleBandVisibility()

HRESULT CInternetToolbar::ToggleBandVisibility ( int  BandID)

Definition at line 1153 of file internettoolbar.cpp.

1154{
1155 return SetBandVisibility(BandID, -1);
1156}

Referenced by Exec(), and OnContextMenu().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CInternetToolbar::TranslateAcceleratorIO ( LPMSG  lpMsg)
override

Definition at line 879 of file internettoolbar.cpp.

880{
882
883 if (fMenuBar)
885 if (hr == S_OK)
886 return hr;
887
888 if (fControlsBar)
890 if (hr == S_OK)
891 return hr;
892
893 if (fNavigationBar)
895 if (hr == S_OK)
896 return hr;
897
898 return S_FALSE;
899}
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4279

◆ UIActivateIO()

HRESULT STDMETHODCALLTYPE CInternetToolbar::UIActivateIO ( BOOL  fActivate,
LPMSG  lpMsg 
)
override

Definition at line 852 of file internettoolbar.cpp.

853{
854 return E_NOTIMPL;
855}

◆ Unknown1()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Unknown1 ( )
override

Definition at line 1304 of file internettoolbar.cpp.

1305{
1306 return E_NOTIMPL;
1307}

Member Data Documentation

◆ fAdviseCookie

DWORD CInternetToolbar::fAdviseCookie

Definition at line 94 of file internettoolbar.h.

Referenced by CInternetToolbar(), and SetSite().

◆ fBandProxy

CComPtr<IBandProxy> CInternetToolbar::fBandProxy

Definition at line 95 of file internettoolbar.h.

Referenced by CreateAndInitBandProxy(), and QueryService().

◆ fCommandCategory

GUID CInternetToolbar::fCommandCategory

Definition at line 92 of file internettoolbar.h.

Referenced by OnForwardToCommandTarget(), OnMenuDropDown(), and SetCommandTarget().

◆ fCommandTarget

CComPtr<IOleCommandTarget> CInternetToolbar::fCommandTarget

Definition at line 91 of file internettoolbar.h.

Referenced by OnForwardToCommandTarget(), OnMenuDropDown(), and SetCommandTarget().

◆ fControlsBar

CComPtr<IUnknown> CInternetToolbar::fControlsBar

Definition at line 88 of file internettoolbar.h.

Referenced by CloseDW(), HasFocusIO(), InitNew(), and TranslateAcceleratorIO().

◆ fIgnoreChanges

BOOL CInternetToolbar::fIgnoreChanges

Definition at line 100 of file internettoolbar.h.

Referenced by CInternetToolbar(), Load(), and SetDirty().

◆ fLocked

bool CInternetToolbar::fLocked

Definition at line 83 of file internettoolbar.h.

◆ fLogoBar

CComPtr<IUnknown> CInternetToolbar::fLogoBar

Definition at line 87 of file internettoolbar.h.

Referenced by CloseDW(), InitNew(), and OnWinEvent().

◆ fMainReBar

◆ fMenuBandWindow

HWND CInternetToolbar::fMenuBandWindow

Definition at line 85 of file internettoolbar.h.

Referenced by CInternetToolbar(), and InitNew().

◆ fMenuBar

CComPtr<IShellMenu> CInternetToolbar::fMenuBar

◆ fMenuCallback

CComPtr<CMenuCallback> CInternetToolbar::fMenuCallback

Definition at line 90 of file internettoolbar.h.

Referenced by CInternetToolbar(), and CreateMenuBar().

◆ fNavigationBar

CComPtr<IUnknown> CInternetToolbar::fNavigationBar

Definition at line 89 of file internettoolbar.h.

Referenced by CloseDW(), HasFocusIO(), InitNew(), OnWinEvent(), and TranslateAcceleratorIO().

◆ fNavigationWindow

HWND CInternetToolbar::fNavigationWindow

Definition at line 86 of file internettoolbar.h.

Referenced by CInternetToolbar(), InitNew(), and OnContextMenu().

◆ fSite

◆ fSizing

BOOL CInternetToolbar::fSizing

Definition at line 96 of file internettoolbar.h.

Referenced by OnLDown(), OnLUp(), and OnMouseMove().

◆ fStartHeight

LONG CInternetToolbar::fStartHeight

Definition at line 98 of file internettoolbar.h.

Referenced by OnLDown(), and OnMouseMove().

◆ fStartPosition

POINT CInternetToolbar::fStartPosition

Definition at line 97 of file internettoolbar.h.

Referenced by OnLDown(), and OnMouseMove().

◆ fToolbarWindow

HWND CInternetToolbar::fToolbarWindow

◆ pSettings


The documentation for this class was generated from the following files: