ReactOS  0.4.13-dev-563-g0561610
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 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 ToggleBandVisibility (int BandID)
 
HRESULT SetState (const GUID *pguidCmdGroup, long commandID, OLECMD *pcmd)
 
virtual HRESULT STDMETHODCALLTYPE UIActivateIO (BOOL fActivate, LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE HasFocusIO ()
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO (LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE ShowDW (BOOL fShow)
 
virtual HRESULT STDMETHODCALLTYPE CloseDW (DWORD dwReserved)
 
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW (LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
 
virtual HRESULT STDMETHODCALLTYPE GetClassID (CLSID *pClassID)
 
virtual HRESULT STDMETHODCALLTYPE IsDirty ()
 
virtual HRESULT STDMETHODCALLTYPE Load (IStream *pStm)
 
virtual HRESULT STDMETHODCALLTYPE Save (IStream *pStm, BOOL fClearDirty)
 
virtual HRESULT STDMETHODCALLTYPE GetSizeMax (ULARGE_INTEGER *pcbSize)
 
virtual HRESULT STDMETHODCALLTYPE InitNew ()
 
virtual HRESULT STDMETHODCALLTYPE QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
virtual HRESULT STDMETHODCALLTYPE Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount (UINT *pctinfo)
 
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo (UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
virtual HRESULT STDMETHODCALLTYPE Invoke (DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
virtual HRESULT STDMETHODCALLTYPE SetCommandTarget (IUnknown *theTarget, GUID *category, long param14)
 
virtual HRESULT STDMETHODCALLTYPE Unknown1 ()
 
virtual HRESULT STDMETHODCALLTYPE AddButtons (const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons)
 
virtual HRESULT STDMETHODCALLTYPE AddString (const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18)
 
virtual HRESULT STDMETHODCALLTYPE GetButton (const GUID *pguidCmdGroup, long param10, long param14)
 
virtual HRESULT STDMETHODCALLTYPE GetState (const GUID *pguidCmdGroup, long commandID, long *theState)
 
virtual HRESULT STDMETHODCALLTYPE SetState (const GUID *pguidCmdGroup, long commandID, long theState)
 
virtual HRESULT STDMETHODCALLTYPE AddBitmap (const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20)
 
virtual HRESULT STDMETHODCALLTYPE GetBitmapSize (long *paramC)
 
virtual HRESULT STDMETHODCALLTYPE SendToolbarMsg (const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result)
 
virtual HRESULT STDMETHODCALLTYPE SetImageList (const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18)
 
virtual HRESULT STDMETHODCALLTYPE ModifyButton (const GUID *pguidCmdGroup, long param10, long param14)
 
virtual HRESULT STDMETHODCALLTYPE OnChange (LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
 
virtual HRESULT STDMETHODCALLTYPE SetSite (IUnknown *pUnkSite)
 
virtual HRESULT STDMETHODCALLTYPE GetSite (REFIID riid, void **ppvSite)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
virtual HRESULT STDMETHODCALLTYPE OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
 
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner (HWND hWnd)
 
virtual HRESULT STDMETHODCALLTYPE AddBand (IUnknown *punk)
 
virtual HRESULT STDMETHODCALLTYPE EnumBands (UINT uBand, DWORD *pdwBandID)
 
virtual HRESULT STDMETHODCALLTYPE QueryBand (DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName)
 
virtual HRESULT STDMETHODCALLTYPE SetBandState (DWORD dwBandID, DWORD dwMask, DWORD dwState)
 
virtual HRESULT STDMETHODCALLTYPE RemoveBand (DWORD dwBandID)
 
virtual HRESULT STDMETHODCALLTYPE GetBandObject (DWORD dwBandID, REFIID riid, void **ppv)
 
virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo (const BANDSITEINFO *pbsinfo)
 
virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo (BANDSITEINFO *pbsinfo)
 
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)
 
- 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 ()
 
- 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 Load ([in] LPSTREAM pStm)
 
HRESULT Save ([in] LPSTREAM pStm, [in] BOOL fClearDirty)
 
- Public Member Functions inherited from IDispatch
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 IObjectWithSite
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 
- Public Member Functions inherited from IServiceProvider
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **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
 
- 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
 
- 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)
 

Detailed Description

Definition at line 60 of file internettoolbar.h.

Constructor & Destructor Documentation

◆ CInternetToolbar()

CInternetToolbar::CInternetToolbar ( )

Definition at line 608 of file internettoolbar.cpp.

609 {
610  fMainReBar = NULL;
611  fLocked = false;
616  fAdviseCookie = 0;
617 
618  fMenuCallback->AddRef();
619 }
CComPtr< CMenuCallback > fMenuCallback
smooth NULL
Definition: ftsmooth.c:416

◆ ~CInternetToolbar()

CInternetToolbar::~CInternetToolbar ( )
virtual

Definition at line 621 of file internettoolbar.cpp.

622 {
623 }

Member Function Documentation

◆ AddBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::AddBand ( IUnknown punk)
virtual

Implements IBandSite.

Definition at line 1438 of file internettoolbar.cpp.

1439 {
1440  UNIMPLEMENTED;
1441  return E_NOTIMPL;
1442 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ AddBitmap()

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

Definition at line 1290 of file internettoolbar.cpp.

1292 {
1293  return E_NOTIMPL;
1294 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AddButtons()

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

Definition at line 1251 of file internettoolbar.cpp.

1252 {
1253  return E_NOTIMPL;
1254 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AddDockItem()

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

Definition at line 625 of file internettoolbar.cpp.

626 {
627  CComPtr<CDockSite> newSite;
628 
629  newSite = new CComObject<CDockSite>;
630  newSite->Initialize(newItem, this, fMainReBar, bandID, flags);
631 }
GLbitfield flags
Definition: glext.h:7161

Referenced by InitNew().

◆ AddString()

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

Definition at line 1256 of file internettoolbar.cpp.

1258 {
1259  long result;
1260 
1262  reinterpret_cast<WPARAM>(param10), reinterpret_cast<LPARAM>(param14));
1263  *param18 = result;
1264  if (result == -1)
1265  return E_FAIL;
1266  return S_OK;
1267 }
#define TB_ADDSTRINGW
Definition: commctrl.h:1104
#define E_FAIL
Definition: ddrawi.h:102
#define S_OK
Definition: intsafe.h:59
#define long
Definition: qsort.c:33
#define SendMessage
Definition: winuser.h:5709
GLuint64EXT * result
Definition: glext.h:11304

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::CloseDW ( DWORD  dwReserved)
virtual

Implements IDockingWindow.

Definition at line 923 of file internettoolbar.cpp.

924 {
925  HRESULT hResult;
926 
927  if (fMenuBar)
928  {
930  if (FAILED_UNEXPECTEDLY(hResult))
931  return hResult;
932  ReleaseCComPtrExpectZero(fMenuBar);
933  }
934  if (fControlsBar)
935  {
937  if (FAILED_UNEXPECTEDLY(hResult))
938  return hResult;
939  ReleaseCComPtrExpectZero(fControlsBar);
940  }
941  if (fNavigationBar)
942  {
944  if (FAILED_UNEXPECTEDLY(hResult))
945  return hResult;
946  ReleaseCComPtrExpectZero(fNavigationBar);
947  }
948  if (fLogoBar)
949  {
951  if (FAILED_UNEXPECTEDLY(hResult))
952  return hResult;
953  ReleaseCComPtrExpectZero(fLogoBar);
954  }
955 
956  SetSite(NULL);
957  return S_OK;
958 }
CComPtr< IUnknown > fLogoBar
CComPtr< IUnknown > fControlsBar
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
smooth NULL
Definition: ftsmooth.c:416
HRESULT IUnknown_CloseDW(IUnknown *punk, DWORD dwReserved)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:59
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite)
CComPtr< IShellMenu > fMenuBar

◆ CommandStateChanged()

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

Definition at line 758 of file internettoolbar.cpp.

759 {
760  HRESULT hResult;
761 
762  hResult = S_OK;
763  switch (commandID)
764  {
765  case -1:
766  // loop through buttons
767  //for buttons in CLSID_CommonButtons
768  // if up, QueryStatus for up state and update it
769  //
770  //for buttons in fCommandCategory, update with QueryStatus of fCommandTarget
771 
772  OLECMD commandList[4];
773  commandList[0].cmdID = 0x1c;
774  commandList[1].cmdID = 0x1d;
775  commandList[2].cmdID = 0x1e;
776  commandList[3].cmdID = 0x23;
777  IUnknown_QueryStatus(fSite, CGID_Explorer, 4, commandList, NULL);
778  SetState(&CLSID_CommonButtons, gSearchCommandID, &commandList[0]);
779  SetState(&CLSID_CommonButtons, gFoldersCommandID, &commandList[3]);
780  //SetState(&CLSID_CommonButtons, gFavoritesCommandID, &commandList[2]);
781  //SetState(&CLSID_CommonButtons, gHistoryCommandID, &commandList[1]);
782 
783  break;
784  case 1:
785  // forward
786  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_FORWARD, newValue ? TBSTATE_ENABLED : 0);
787  break;
788  case 2:
789  // back
790  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_BACK, newValue ? TBSTATE_ENABLED : 0);
791  break;
792  case 3:
793  // up
794  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_UPONELEVEL, newValue ? TBSTATE_ENABLED : 0);
795  break;
796  }
797  return hResult;
798 }
#define IDM_GOTO_UPONELEVEL
Definition: resource.h:47
#define IDM_GOTO_FORWARD
Definition: resource.h:46
struct IOleCommandTarget::_tagOLECMD OLECMD
static const int gSearchCommandID
#define IDM_GOTO_BACK
Definition: resource.h:45
HRESULT SetState(const GUID *pguidCmdGroup, long commandID, OLECMD *pcmd)
static const int gFoldersCommandID
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:59
#define TBSTATE_ENABLED
Definition: commctrl.h:946
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:995

Referenced by Invoke().

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ContextSensitiveHelp ( BOOL  fEnterMode)
virtual

Implements IOleWindow.

Definition at line 878 of file internettoolbar.cpp.

879 {
880  return E_NOTIMPL;
881 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CreateAndInitBandProxy()

HRESULT CInternetToolbar::CreateAndInitBandProxy ( )

Definition at line 800 of file internettoolbar.cpp.

801 {
802  CComPtr<IServiceProvider> serviceProvider;
803  HRESULT hResult;
804 
805  hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider));
806  if (FAILED_UNEXPECTEDLY(hResult))
807  return hResult;
808  hResult = serviceProvider->QueryService(SID_IBandProxy, IID_PPV_ARG(IBandProxy, &fBandProxy));
809  if (FAILED_UNEXPECTEDLY(hResult))
810  {
811  hResult = CBandProxy_CreateInstance(IID_PPV_ARG(IBandProxy, &fBandProxy));
812  if (FAILED_UNEXPECTEDLY(hResult))
813  return hResult;
814  hResult = fBandProxy->SetSite(fSite);
815  if (FAILED_UNEXPECTEDLY(hResult))
816  return hResult;
817  }
818  return S_OK;
819 }
HRESULT CBandProxy_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:42
#define IID_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:59
CComPtr< IBandProxy > fBandProxy

Referenced by QueryService().

◆ CreateMenuBar()

HRESULT CInternetToolbar::CreateMenuBar ( IShellMenu **  menuBar)

Definition at line 653 of file internettoolbar.cpp.

654 {
655  CComPtr<IShellMenu> menubar;
657  VARIANT menuOut;
658  HWND ownerWindow;
659  HRESULT hResult;
660 
661  if (!pMenuBar)
662  return E_POINTER;
663 
664  *pMenuBar = NULL;
665 
666  hResult = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &menubar));
667  if (FAILED_UNEXPECTEDLY(hResult))
668  return hResult;
669 
670  hResult = fMenuCallback->QueryInterface(IID_PPV_ARG(IShellMenuCallback, &callback));
671  if (FAILED_UNEXPECTEDLY(hResult))
672  return hResult;
673 
674  hResult = menubar->Initialize(callback, -1, ANCESTORDEFAULT, SMINIT_HORIZONTAL | SMINIT_TOPLEVEL);
675  if (FAILED_UNEXPECTEDLY(hResult))
676  return hResult;
677 
678  // Set Menu
679  {
680  hResult = IUnknown_Exec(fSite, CGID_Explorer, 0x35, 0, NULL, &menuOut);
681  if (FAILED_UNEXPECTEDLY(hResult))
682  return hResult;
683 
684  if (V_VT(&menuOut) != VT_INT_PTR || V_INTREF(&menuOut) == NULL)
685  return E_FAIL;
686 
687  hResult = IUnknown_GetWindow(fSite, &ownerWindow);
688  if (FAILED_UNEXPECTEDLY(hResult))
689  return hResult;
690 
691  HMENU hMenuBar = (HMENU) V_INTREF(&menuOut);
692 
693  // FIXME: Figure out the proper way to do this.
694  HMENU hMenuFavs = GetSubMenu(hMenuBar, 3);
695  if (hMenuFavs)
696  {
698  }
699 
700  hResult = menubar->SetMenu(hMenuBar, ownerWindow, SMSET_DONTOWN);
701  if (FAILED_UNEXPECTEDLY(hResult))
702  return hResult;
703  }
704 
705  hResult = IUnknown_Exec(menubar, CGID_MenuBand, 3, 1, NULL, NULL);
706  if (FAILED_UNEXPECTEDLY(hResult))
707  return hResult;
708 
709  *pMenuBar = menubar.Detach();
710 
711  return S_OK;
712 }
#define MF_BYCOMMAND
Definition: winuser.h:202
#define IDM_FAVORITES_EMPTY
Definition: resource.h:52
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
CComPtr< CMenuCallback > fMenuCallback
smooth NULL
Definition: ftsmooth.c:416
#define CGID_MenuBand
#define V_INTREF(A)
Definition: oleauto.h:252
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
LONG HRESULT
Definition: typedefs.h:77
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
#define V_VT(A)
Definition: oleauto.h:211
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define S_OK
Definition: intsafe.h:59
#define CMenuBand_CreateInstance
Definition: shellmenu.h:81
T * Detach()
Definition: atlcomcli.h:156
#define E_POINTER
Definition: winerror.h:2365
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1034

Referenced by InitNew().

◆ CreateToolsBar()

HRESULT CInternetToolbar::CreateToolsBar ( IUnknown **  toolsBar)

◆ EnumBands()

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

Implements IBandSite.

Definition at line 1444 of file internettoolbar.cpp.

1445 {
1446  UNIMPLEMENTED;
1447  return E_NOTIMPL;
1448 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ Exec()

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

Implements IOleCommandTarget.

Definition at line 1153 of file internettoolbar.cpp.

1155 {
1156  if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1157  {
1158  switch (nCmdID)
1159  {
1160  case 1:
1161  // what do I do here?
1162  return S_OK;
1163  case ITID_TEXTLABELS:
1164  // toggle text labels
1165  return S_OK;
1166  case ITID_TOOLBARBANDSHOWN:
1168  case ITID_ADDRESSBANDSHOWN:
1170  case ITID_LINKSBANDSHOWN:
1171  // toggle links band visibility
1172  return S_OK;
1173  case ITID_CUSTOMIZEENABLED:
1174  // run customize
1175  return S_OK;
1176  case ITID_TOOLBARLOCKED:
1177  return LockUnlockToolbars(!fLocked);
1178  }
1179  }
1180  return E_FAIL;
1181 }
#define ITID_LINKSBANDSHOWN
Definition: undocshell.h:774
#define ITID_TEXTLABELS
Definition: undocshell.h:771
#define E_FAIL
Definition: ddrawi.h:102
HRESULT LockUnlockToolbars(bool locked)
#define ITID_TOOLBARLOCKED
Definition: undocshell.h:778
#define ITBBID_TOOLSBAND
Definition: undocshell.h:765
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:766
#define ITID_ADDRESSBANDSHOWN
Definition: undocshell.h:773
#define S_OK
Definition: intsafe.h:59
HRESULT ToggleBandVisibility(int BandID)
#define ITID_TOOLBARBANDSHOWN
Definition: undocshell.h:772
#define ITID_CUSTOMIZEENABLED
Definition: undocshell.h:777
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

Referenced by OnMenuDropDown().

◆ GetBandObject()

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

Implements IBandSite.

Definition at line 1475 of file internettoolbar.cpp.

1476 {
1477  UNIMPLEMENTED;
1478  return E_NOTIMPL;
1479 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ GetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBandSiteInfo ( BANDSITEINFO pbsinfo)
virtual

Implements IBandSite.

Definition at line 1487 of file internettoolbar.cpp.

1488 {
1489  UNIMPLEMENTED;
1490  return E_NOTIMPL;
1491 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ GetBitmapSize()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBitmapSize ( long paramC)
virtual

Definition at line 1296 of file internettoolbar.cpp.

1297 {
1298  if (paramC == NULL)
1299  return E_POINTER;
1300  *paramC = MAKELONG(24, 24);
1301  return S_OK;
1302 }
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ GetButton()

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

Definition at line 1269 of file internettoolbar.cpp.

1270 {
1271  return E_NOTIMPL;
1272 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetClassID ( CLSID pClassID)
virtual

Implements IPersist.

Definition at line 995 of file internettoolbar.cpp.

996 {
997  if (pClassID == NULL)
998  return E_POINTER;
999  *pClassID = CLSID_InternetToolbar;
1000  return S_OK;
1001 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ GetIDsOfNames()

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

Implements IDispatch.

Definition at line 1193 of file internettoolbar.cpp.

1195 {
1196  return E_NOTIMPL;
1197 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetSite()

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

Definition at line 1374 of file internettoolbar.cpp.

1375 {
1376  if (ppvSite == NULL)
1377  return E_POINTER;
1378  if (fSite.p != NULL)
1379  return fSite->QueryInterface(riid, ppvSite);
1380  *ppvSite = NULL;
1381  return S_OK;
1382 }
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetSizeMax ( ULARGE_INTEGER pcbSize)
virtual

Implements IPersistStreamInit.

Definition at line 1018 of file internettoolbar.cpp.

1019 {
1020  return E_NOTIMPL;
1021 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetState()

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

Definition at line 1274 of file internettoolbar.cpp.

1275 {
1276  if (theState == NULL)
1277  return E_POINTER;
1278  // map the command id
1279  *theState = (long)::SendMessage(fToolbarWindow, TB_GETSTATE, commandID, 0);
1280  return S_OK;
1281 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define TB_GETSTATE
Definition: commctrl.h:1027
#define long
Definition: qsort.c:33
#define SendMessage
Definition: winuser.h:5709
#define E_POINTER
Definition: winerror.h:2365

◆ GetTypeInfo()

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

Implements IDispatch.

Definition at line 1188 of file internettoolbar.cpp.

1189 {
1190  return E_NOTIMPL;
1191 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetTypeInfoCount()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetTypeInfoCount ( UINT pctinfo)
virtual

Implements IDispatch.

Definition at line 1183 of file internettoolbar.cpp.

1184 {
1185  return E_NOTIMPL;
1186 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 870 of file internettoolbar.cpp.

871 {
872  if (lphwnd == NULL)
873  return E_POINTER;
874  *lphwnd = m_hWnd;
875  return S_OK;
876 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CInternetToolbar::HasFocusIO ( )
virtual

Definition at line 826 of file internettoolbar.cpp.

827 {
828  HRESULT hr = S_FALSE;
829 
830  if (fMenuBar)
832  if (hr != S_FALSE)
833  return hr;
834 
835  if (fControlsBar)
837  if (hr != S_FALSE)
838  return hr;
839 
840  if (fNavigationBar)
842  if (hr != S_FALSE)
843  return hr;
844 
845  return S_FALSE;
846 }
HRESULT hr
Definition: shlfolder.c:183
CComPtr< IUnknown > fControlsBar
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4136
CComPtr< IUnknown > fNavigationBar
CComPtr< IShellMenu > fMenuBar

◆ InitNew()

HRESULT STDMETHODCALLTYPE CInternetToolbar::InitNew ( void  )
virtual

Implements IPersistStreamInit.

Definition at line 1023 of file internettoolbar.cpp.

1024 {
1025  CComPtr<IShellMenu> menuBar;
1026  CComPtr<IUnknown> logoBar;
1027  CComPtr<IUnknown> toolsBar;
1028  CComPtr<IUnknown> navigationBar;
1029  HRESULT hResult;
1030 
1031  /* Create and attach the menubar to the rebar */
1032  hResult = CreateMenuBar(&menuBar);
1033  if (FAILED_UNEXPECTEDLY(hResult))
1034  return hResult;
1036 
1037  hResult = IUnknown_GetWindow(menuBar, &fMenuBandWindow);
1038  fMenuBar.Attach(menuBar.Detach()); // transfer the ref count
1039 
1040  // FIXME: The ros Rebar does not properly support fixed-size items such as the brandband,
1041  // and it will put them in their own row, sized to take up the whole row.
1042 #if 0
1043  /* Create and attach the brand/logo to the rebar */
1044  hResult = CBrandBand_CreateInstance(IID_PPV_ARG(IUnknown, &logoBar));
1045  if (FAILED_UNEXPECTEDLY(hResult))
1046  return hResult;
1048  fLogoBar.Attach(logoBar.Detach()); // transfer the ref count
1049 #endif
1050 
1051  /* Create and attach the standard toolbar to the rebar */
1052  hResult = CToolsBand_CreateInstance(IID_PPV_ARG(IUnknown, &toolsBar));
1053  if (FAILED_UNEXPECTEDLY(hResult))
1054  return hResult;
1056  fControlsBar.Attach(toolsBar.Detach()); // transfer the ref count
1058  if (FAILED_UNEXPECTEDLY(hResult))
1059  return hResult;
1060 
1061  /* Create and attach the address/navigation toolbar to the rebar */
1062  hResult = CAddressBand_CreateInstance(IID_PPV_ARG(IUnknown, &navigationBar));
1063  if (FAILED_UNEXPECTEDLY(hResult))
1064  return hResult;
1066  fNavigationBar.Attach(navigationBar.Detach());
1068 
1069  return S_OK;
1070 }
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
CComPtr< IUnknown > fLogoBar
#define ITBBID_MENUBAND
Definition: undocshell.h:763
CComPtr< IUnknown > fControlsBar
HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:51
#define ITBBID_TOOLSBAND
Definition: undocshell.h:765
LONG HRESULT
Definition: typedefs.h:77
#define ITBBID_BRANDBAND
Definition: undocshell.h:764
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:766
HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:24
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:59
void AddDockItem(IUnknown *newItem, int bandID, int flags)
CComPtr< IShellMenu > fMenuBar
HRESULT CreateMenuBar(IShellMenu **menuBar)
T * Detach()
Definition: atlcomcli.h:156
void Attach(T *lp)
Definition: atlcomcli.h:149
HRESULT CToolsBand_CreateInstance(REFIID riid, void **ppv)
Definition: toolsband.cpp:419

◆ Invoke()

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

Implements IDispatch.

Definition at line 1199 of file internettoolbar.cpp.

1201 {
1202  HRESULT hResult;
1203 
1204  switch(dispIdMember)
1205  {
1206  case DISPID_BEFORENAVIGATE:
1207  hResult = S_OK;
1208  break;
1210  hResult = S_OK;
1211  break;
1213  if (pDispParams->cArgs != 2)
1214  return E_INVALIDARG;
1215  if (V_VT(&pDispParams->rgvarg[0]) != VT_BOOL || V_VT(&pDispParams->rgvarg[1]) != VT_I4)
1216  return E_INVALIDARG;
1217  return CommandStateChanged(V_BOOL(&pDispParams->rgvarg[0]) != VARIANT_FALSE,
1218  V_I4(&pDispParams->rgvarg[1]));
1219  case DISPID_DOWNLOADBEGIN:
1220  hResult = S_OK;
1221  break;
1223  hResult = S_OK;
1224  break;
1226  hResult = S_OK;
1227  break;
1228  }
1229  return S_OK;
1230 }
#define DISPID_COMMANDSTATECHANGE
Definition: webchild.h:40
Definition: compat.h:1939
#define DISPID_DOCUMENTCOMPLETE
Definition: webchild.h:61
#define DISPID_DOWNLOADCOMPLETE
Definition: webchild.h:39
#define V_I4(A)
Definition: oleauto.h:247
#define E_INVALIDARG
Definition: ddrawi.h:101
#define DISPID_NAVIGATECOMPLETE2
Definition: webchild.h:54
LONG HRESULT
Definition: typedefs.h:77
#define V_BOOL(A)
Definition: oleauto.h:224
#define DISPID_BEFORENAVIGATE
Definition: webchild.h:35
#define DISPID_DOWNLOADBEGIN
Definition: webchild.h:41
#define V_VT(A)
Definition: oleauto.h:211
#define S_OK
Definition: intsafe.h:59
HRESULT CommandStateChanged(bool newValue, int commandID)

◆ IsBandVisible()

HRESULT CInternetToolbar::IsBandVisible ( int  BandID)

Definition at line 1072 of file internettoolbar.cpp.

1073 {
1074  int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1075 
1078 
1079  return (bandInfo.fStyle & RBBS_HIDDEN) ? S_FALSE : S_OK;
1080 }
#define RB_GETBANDINFOW
Definition: commctrl.h:1581
#define RBBIM_STYLE
Definition: commctrl.h:1474
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define S_FALSE
Definition: winerror.h:2357
LONG_PTR LPARAM
Definition: windef.h:208
GLuint index
Definition: glext.h:6031
#define S_OK
Definition: intsafe.h:59
#define RBBS_HIDDEN
Definition: commctrl.h:1464
#define RB_IDTOINDEX
Definition: commctrl.h:1560
#define SendMessage
Definition: winuser.h:5709
struct tagREBARBANDINFOW REBARBANDINFOW
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by OnContextMenu(), and QueryStatus().

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CInternetToolbar::IsDirty ( void  )
virtual

Implements IPersistStreamInit.

Definition at line 1003 of file internettoolbar.cpp.

1004 {
1005  return E_NOTIMPL;
1006 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CInternetToolbar::IsWindowOwner ( HWND  hWnd)
virtual

Definition at line 1432 of file internettoolbar.cpp.

1433 {
1434  UNIMPLEMENTED;
1435  return E_NOTIMPL;
1436 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ Load()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Load ( IStream pStm)
virtual

Definition at line 1008 of file internettoolbar.cpp.

1009 {
1010  return E_NOTIMPL;
1011 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ LockUnlockToolbars()

HRESULT CInternetToolbar::LockUnlockToolbars ( bool  locked)

Definition at line 714 of file internettoolbar.cpp.

715 {
716  REBARBANDINFOW rebarBandInfo;
717  int bandCount;
718  CDockSite *dockSite;
719  HRESULT hResult;
720 
721  if (locked != fLocked)
722  {
723  fLocked = locked;
724  rebarBandInfo.cbSize = sizeof(rebarBandInfo);
725  rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_LPARAM;
726  bandCount = (int)SendMessage(fMainReBar, RB_GETBANDCOUNT, 0, 0);
727  for (INT x = 0; x < bandCount; x++)
728  {
729  SendMessage(fMainReBar, RB_GETBANDINFOW, x, (LPARAM)&rebarBandInfo);
730  dockSite = reinterpret_cast<CDockSite *>(rebarBandInfo.lParam);
731  if (dockSite != NULL)
732  {
733  rebarBandInfo.fStyle &= ~(RBBS_NOGRIPPER | RBBS_GRIPPERALWAYS);
734  if (dockSite->fFlags & CDockSite::ITF_NOGRIPPER || fLocked)
735  rebarBandInfo.fStyle |= RBBS_NOGRIPPER;
736  if (dockSite->fFlags & CDockSite::ITF_GRIPPERALWAYS && !fLocked)
737  rebarBandInfo.fStyle |= RBBS_GRIPPERALWAYS;
738  SendMessage(fMainReBar, RB_SETBANDINFOW, x, (LPARAM)&rebarBandInfo);
739  }
740  }
741  hResult = ReserveBorderSpace(0);
742 
743  // TODO: refresh view menu?
744  }
745  return S_OK;
746 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define RB_GETBANDINFOW
Definition: commctrl.h:1581
#define RBBIM_LPARAM
Definition: commctrl.h:1484
int32_t INT
Definition: typedefs.h:56
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RB_GETBANDCOUNT
Definition: commctrl.h:1557
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
LONG HRESULT
Definition: typedefs.h:77
#define RB_SETBANDINFOW
Definition: commctrl.h:1556
#define S_OK
Definition: intsafe.h:59
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1468
#define SendMessage
Definition: winuser.h:5709
#define RBBS_NOGRIPPER
Definition: commctrl.h:1469
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by Exec(), and OnContextMenu().

◆ ModifyButton()

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

Definition at line 1316 of file internettoolbar.cpp.

1317 {
1318  return E_NOTIMPL;
1319 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnChange()

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

Implements IShellChangeNotify.

Definition at line 1321 of file internettoolbar.cpp.

1322 {
1323  return E_NOTIMPL;
1324 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnCommand()

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

Definition at line 1810 of file internettoolbar.cpp.

1811 {
1812  LRESULT theResult;
1813  HRESULT hResult;
1814 
1815  hResult = OnWinEvent((HWND) lParam, uMsg, wParam, lParam, &theResult);
1816 
1817  bHandled = hResult == S_OK;
1818 
1819  return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1820 }
WPARAM wParam
Definition: combotst.c:138
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
#define S_OK
Definition: intsafe.h:59
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139

◆ OnContextMenu()

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

Definition at line 1662 of file internettoolbar.cpp.

1663 {
1664  HMENU contextMenuBar;
1665  HMENU contextMenu;
1666  POINT clickLocation;
1667  int command;
1668  RBHITTESTINFO hitTestInfo;
1669  REBARBANDINFOW rebarBandInfo;
1670  int bandID;
1671  BOOL goButtonChecked;
1672 
1673  clickLocation.x = LOWORD(lParam);
1674  clickLocation.y = HIWORD(lParam);
1675  hitTestInfo.pt = clickLocation;
1676  ScreenToClient(&hitTestInfo.pt);
1677  SendMessage(fMainReBar, RB_HITTEST, 0, (LPARAM)&hitTestInfo);
1678  if (hitTestInfo.iBand == -1)
1679  return 0;
1680  rebarBandInfo.cbSize = sizeof(rebarBandInfo);
1681  rebarBandInfo.fMask = RBBIM_ID;
1682  SendMessage(fMainReBar, RB_GETBANDINFOW, hitTestInfo.iBand, (LPARAM)&rebarBandInfo);
1683  bandID = rebarBandInfo.wID;
1684  contextMenuBar = LoadMenu(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDM_CABINET_CONTEXTMENU));
1685  contextMenu = GetSubMenu(contextMenuBar, 0);
1686  switch (bandID)
1687  {
1688  case ITBBID_MENUBAND: // menu band
1692  break;
1693  case ITBBID_BRANDBAND: // brand band
1697  break;
1698  case ITBBID_TOOLSBAND: // tools band
1701  break;
1702  case ITBBID_ADDRESSBAND: // navigation band
1705  break;
1706  default:
1707  break;
1708  }
1709 
1711 
1717  goButtonChecked = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
1718  SHCheckMenuItem(contextMenu, IDM_TOOLBARS_GOBUTTON, goButtonChecked);
1719 
1720  // TODO: use GetSystemMetrics(SM_MENUDROPALIGNMENT) to determine menu alignment
1722  clickLocation.x, clickLocation.y, 0, m_hWnd, NULL);
1723  switch (command)
1724  {
1725  case IDM_TOOLBARS_STANDARDBUTTONS: // standard buttons
1727  break;
1728  case IDM_TOOLBARS_ADDRESSBAR: // address bar
1730  break;
1731  case IDM_TOOLBARS_LINKSBAR: // links
1732  break;
1733  case IDM_TOOLBARS_LOCKTOOLBARS: // lock the toolbars
1735  break;
1736  case IDM_TOOLBARS_CUSTOMIZE: // customize
1738  break;
1739  case IDM_TOOLBARS_GOBUTTON:
1741  break;
1742  }
1743 
1744  DestroyMenu(contextMenuBar);
1745  return 1;
1746 }
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDM_TOOLBARS_LINKSBAR
Definition: resource.h:32
#define TRUE
Definition: types.h:120
#define MF_BYCOMMAND
Definition: winuser.h:202
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define TPM_LEFTALIGN
Definition: winuser.h:2331
HRESULT IsBandVisible(int BandID)
#define TPM_RETURNCMD
Definition: winuser.h:2341
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
#define IDM_CABINET_CONTEXTMENU
Definition: resource.h:87
#define RBBIM_ID
Definition: commctrl.h:1482
#define TB_CUSTOMIZE
Definition: commctrl.h:1102
#define RB_GETBANDINFOW
Definition: commctrl.h:1581
#define IDM_TOOLBARS_TEXTLABELS
Definition: resource.h:35
#define ITBBID_MENUBAND
Definition: undocshell.h:763
#define TPM_RIGHTBUTTON
Definition: winuser.h:2334
HRESULT LockUnlockToolbars(bool locked)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TPM_TOPALIGN
Definition: winuser.h:2337
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ITBBID_TOOLSBAND
Definition: undocshell.h:765
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ITBBID_BRANDBAND
Definition: undocshell.h:764
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:766
static const WCHAR L[]
Definition: oid.c:1250
#define RB_HITTEST
Definition: commctrl.h:1553
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1716
DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck)
Definition: ordinal.c:1747
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define IDM_TOOLBARS_LOCKTOOLBARS
Definition: resource.h:33
#define S_OK
Definition: intsafe.h:59
#define IDM_TOOLBARS_STANDARDBUTTONS
Definition: resource.h:30
#define LoadMenu
Definition: winuser.h:5683
#define IDM_TOOLBARS_CUSTOMIZE
Definition: resource.h:34
HRESULT ToggleBandVisibility(int BandID)
UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable)
Definition: ordinal.c:1728
int command(const char *fmt,...)
Definition: ftp.c:266
#define SendMessage
Definition: winuser.h:5709
#define HIWORD(l)
Definition: typedefs.h:246
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define LOWORD(l)
Definition: pedump.c:82

◆ OnFolders()

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

Definition at line 1529 of file internettoolbar.cpp.

1530 {
1531  IUnknown_Exec(fSite, CGID_Explorer, 0x23, 0, NULL, NULL);
1532  return 1;
1533 }
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IUnknown > fSite
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1034

◆ OnForwardToCommandTarget()

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

Definition at line 1535 of file internettoolbar.cpp.

1536 {
1537  HRESULT hResult;
1538 
1539  if (fCommandTarget.p != NULL)
1540  {
1541  hResult = fCommandTarget->Exec(&fCommandCategory, wID, 0, NULL, NULL);
1542  }
1543  return 1;
1544 }
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IOleCommandTarget > fCommandTarget

◆ OnLDown()

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

Definition at line 1836 of file internettoolbar.cpp.

1837 {
1838  bHandled = FALSE;
1839  if (fLocked)
1840  return 0;
1841 
1842  if (wParam & MK_CONTROL)
1843  return 0;
1844 
1845  fSizing = TRUE;
1846 
1847  DWORD msgp = GetMessagePos();
1848 
1849  fStartPosition.x = GET_X_LPARAM(msgp);
1850  fStartPosition.y = GET_Y_LPARAM(msgp);
1851 
1852  RECT rc;
1853  GetWindowRect(&rc);
1854 
1855  fStartHeight = rc.bottom - rc.top;
1856 
1857  SetCapture();
1858 
1859  bHandled = TRUE;
1860  return 0;
1861 }
#define TRUE
Definition: types.h:120
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG top
Definition: windef.h:292
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1350
WPARAM wParam
Definition: combotst.c:138
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define MK_CONTROL
Definition: winuser.h:2324
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
LONG bottom
Definition: windef.h:294
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)

◆ OnLUp()

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

Definition at line 1881 of file internettoolbar.cpp.

1882 {
1883  bHandled = FALSE;
1884  if (!fSizing)
1885  return 0;
1886 
1887  OnMouseMove(uMsg, wParam, lParam, bHandled);
1888 
1889  fSizing = FALSE;
1890 
1891  ReleaseCapture();
1892 
1893  return 0;
1894 }
WPARAM wParam
Definition: combotst.c:138
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LPARAM lParam
Definition: combotst.c:139

◆ OnMenuDropDown()

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

Definition at line 1546 of file internettoolbar.cpp.

1547 {
1548  CComPtr<IBrowserService> browserService;
1549  CComPtr<IOleCommandTarget> commandTarget;
1550  CComPtr<ITravelLog> travelLog;
1551  NMTOOLBARW *notifyInfo;
1552  RECT bounds;
1553  HMENU newMenu;
1554  TPMPARAMS params;
1555  int selectedItem;
1556  VARIANT parmIn;
1557  OLECMD commandInfo;
1558  HRESULT hResult;
1559  wchar_t templateString[200];
1560 
1561  notifyInfo = (NMTOOLBARW *)pNMHDR;
1562  if (notifyInfo->hdr.hwndFrom != fToolbarWindow)
1563  {
1564  // not from the toolbar, keep looking for a message handler
1565  bHandled = FALSE;
1566  return 0;
1567  }
1568  SendMessage(fToolbarWindow, TB_GETRECT, notifyInfo->iItem, reinterpret_cast<LPARAM>(&bounds));
1569  ::MapWindowPoints(fToolbarWindow, NULL, reinterpret_cast<POINT *>(&bounds), 2);
1570  switch (notifyInfo->iItem)
1571  {
1572  case IDM_GOTO_BACK:
1573  newMenu = CreatePopupMenu();
1575  hResult = browserService->GetTravelLog(&travelLog);
1576  hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_BACK);
1577  commandInfo.cmdID = 0x1d;
1578  hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1579  if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1580  travelLog->CountEntries(browserService) > 1)
1581  {
1582  AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1583 
1584  if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1585  IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1586  StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1587 
1588  AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1589  }
1590  params.cbSize = sizeof(params);
1591  params.rcExclude = bounds;
1592  selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1593  bounds.left, bounds.bottom, m_hWnd, &params);
1594  if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1595  {
1596  V_VT(&parmIn) = VT_I4;
1597  V_I4(&parmIn) = 1;
1598  Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1599  }
1600  else if (selectedItem != 0)
1601  hResult = travelLog->Travel(browserService, -selectedItem);
1602  DestroyMenu(newMenu);
1603  break;
1604  case IDM_GOTO_FORWARD:
1605  newMenu = CreatePopupMenu();
1607  hResult = browserService->GetTravelLog(&travelLog);
1608  hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_FORE);
1609  commandInfo.cmdID = 0x1d;
1610  hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1611  if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1612  travelLog->CountEntries(browserService) > 1)
1613  {
1614  AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1615 
1616  if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1617  IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1618  StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1619 
1620  AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1621  }
1622  params.cbSize = sizeof(params);
1623  params.rcExclude = bounds;
1624  selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1625  bounds.left, bounds.bottom, m_hWnd, &params);
1626  if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1627  {
1628  V_VT(&parmIn) = VT_I4;
1629  V_I4(&parmIn) = 1;
1630  Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1631  }
1632  else if (selectedItem != 0)
1633  hResult = travelLog->Travel(browserService, selectedItem);
1634  DestroyMenu(newMenu);
1635  break;
1636  case gViewsCommandID:
1637  VARIANT inValue;
1638  CComVariant outValue;
1639  HRESULT hResult;
1640 
1641  V_VT(&inValue) = VT_INT_PTR;
1642  V_INTREF(&inValue) = reinterpret_cast<INT *>(&bounds);
1643 
1644  if (fCommandTarget.p != NULL)
1645  hResult = fCommandTarget->Exec(&fCommandCategory, FCIDM_SHVIEW_AUTOARRANGE, 1, &inValue, &outValue);
1646  // pvaOut is VT_I4 with value 0x403
1647  break;
1648  }
1649  return TBDDRET_DEFAULT;
1650 }
Definition: compat.h:1939
#define IDM_GOTO_FORWARD
Definition: resource.h:46
#define IDS_HISTORYTEXT
Definition: resource.h:123
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:750
#define TPM_LEFTALIGN
Definition: winuser.h:2331
struct IOleCommandTarget::_tagOLECMD OLECMD
#define TPM_RETURNCMD
Definition: winuser.h:2341
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define MF_STRING
Definition: winuser.h:138
#define TB_GETRECT
Definition: commctrl.h:1125
#define TBDDRET_DEFAULT
Definition: commctrl.h:1396
LONG left
Definition: windef.h:291
#define IID_PPV_ARG(Itype, ppType)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
#define V_I4(A)
Definition: oleauto.h:247
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define IDM_GOTO_BACK
Definition: resource.h:45
GLenum const GLfloat * params
Definition: glext.h:5645
#define TPM_TOPALIGN
Definition: winuser.h:2337
smooth NULL
Definition: ftsmooth.c:416
#define MF_SEPARATOR
Definition: winuser.h:137
#define V_INTREF(A)
Definition: oleauto.h:252
#define TLMENUF_BACK
Definition: shlobj.h:2497
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IUnknown > fSite
static const WCHAR L[]
Definition: oid.c:1250
#define V_VT(A)
Definition: oleauto.h:211
static const int gViewsCommandID
CComPtr< IOleCommandTarget > fCommandTarget
HWND hwndFrom
Definition: winuser.h:3110
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define IDM_EXPLORERBAR_HISTORY
Definition: resource.h:42
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
#define SendMessage
Definition: winuser.h:5709
LONG bottom
Definition: windef.h:294
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:995
#define TLMENUF_FORE
Definition: shlobj.h:2498
#define SID_SShellBrowser
Definition: shlguid.h:125
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)

◆ OnMouseMove()

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

Definition at line 1863 of file internettoolbar.cpp.

1864 {
1865  bHandled = FALSE;
1866  if (!fSizing)
1867  return 0;
1868 
1869  DWORD msgp = GetMessagePos();
1870 
1871  POINT pt;
1872  pt.x = GET_X_LPARAM(msgp);
1873  pt.y = GET_Y_LPARAM(msgp);
1874 
1876 
1877  bHandled = TRUE;
1878  return 0;
1879 }
#define TRUE
Definition: types.h:120
long y
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1350
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275

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 1821 of file internettoolbar.cpp.

1822 {
1823  NMHDR *notifyHeader;
1824  LRESULT theResult;
1825  HRESULT hResult;
1826 
1827  notifyHeader = reinterpret_cast<NMHDR *>(lParam);
1828 
1829  hResult = OnWinEvent(notifyHeader->hwndFrom, uMsg, wParam, lParam, &theResult);
1830 
1831  bHandled = hResult == S_OK;
1832 
1833  return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1834 }
WPARAM wParam
Definition: combotst.c:138
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
HWND hwndFrom
Definition: winuser.h:3110
#define S_OK
Definition: intsafe.h:59
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139

◆ OnQueryDelete()

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

Definition at line 1657 of file internettoolbar.cpp.

1658 {
1659  return 1;
1660 }

◆ OnQueryInsert()

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

Definition at line 1652 of file internettoolbar.cpp.

1653 {
1654  return 1;
1655 }

◆ OnSearch()

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

Definition at line 1523 of file internettoolbar.cpp.

1524 {
1525  IUnknown_Exec(fSite, CGID_Explorer, 0x1c, 1, NULL, NULL);
1526  return 1;
1527 }
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IUnknown > fSite
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1034

◆ OnSetCursor()

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

Definition at line 1758 of file internettoolbar.cpp.

1759 {
1760  if ((short)lParam != HTCLIENT || (HWND)wParam != m_hWnd)
1761  {
1762  bHandled = FALSE;
1763  return 0;
1764  }
1766  return 1;
1767 }
WPARAM wParam
Definition: combotst.c:138
#define IDC_SIZENS
Definition: winuser.h:690
smooth NULL
Definition: ftsmooth.c:416
#define LoadCursor
Definition: winuser.h:5678
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define HTCLIENT
Definition: winuser.h:2429
LPARAM lParam
Definition: combotst.c:139

◆ OnSize()

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

Definition at line 1748 of file internettoolbar.cpp.

1749 {
1750  if (wParam != SIZE_MINIMIZED)
1751  {
1754  }
1755  return 1;
1756 }
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define SIZE_MINIMIZED
Definition: winuser.h:2460
#define HIWORD(l)
Definition: typedefs.h:246
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

◆ OnTipText()

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

Definition at line 1769 of file internettoolbar.cpp.

1770 {
1771  CComPtr<IBrowserService> browserService;
1772  CComPtr<ITravelLog> travelLog;
1773  TOOLTIPTEXTW *pTTTW;
1774  UINT nID;
1775  HRESULT hResult;
1776  wchar_t tempString[300];
1777 
1778  pTTTW = reinterpret_cast<TOOLTIPTEXTW *>(pNMHDR);
1779  if ((pTTTW->uFlags & TTF_IDISHWND) != 0)
1780  nID = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
1781  else
1782  nID = (UINT)pNMHDR->idFrom;
1783 
1784  if (nID != 0)
1785  {
1786  if (nID == (UINT)IDM_GOTO_BACK || nID == (UINT)IDM_GOTO_FORWARD)
1787  {
1788  // TODO: Should this call QueryService?
1789  hResult = fSite->QueryInterface(IID_PPV_ARG(IBrowserService, &browserService));
1790  hResult = browserService->GetTravelLog(&travelLog);
1791  hResult = travelLog->GetToolTipText(browserService,
1792  (nID == (UINT)IDM_GOTO_BACK) ? TLOG_BACK : TLOG_FORE,
1793  0, tempString, 299);
1794  if (FAILED_UNEXPECTEDLY(hResult))
1795  {
1796  bHandled = FALSE;
1797  return 0;
1798  }
1799  }
1800  else
1801  tempString[0] = 0;
1802  wcsncpy (pTTTW->szText, tempString, sizeof(pTTTW->szText) / sizeof(wchar_t));
1803  ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0,
1805  return 0;
1806  }
1807  return 0;
1808 }
#define TLOG_BACK
Definition: shlobj.h:2492
#define IDM_GOTO_FORWARD
Definition: resource.h:46
#define HWND_TOP
Definition: winuser.h:1193
#define IID_PPV_ARG(Itype, ppType)
#define IDM_GOTO_BACK
Definition: resource.h:45
int WINAPI GetDlgCtrlID(_In_ HWND)
UINT_PTR idFrom
Definition: winuser.h:3111
#define TTF_IDISHWND
Definition: commctrl.h:1736
#define TLOG_FORE
Definition: shlobj.h:2493
if(!(yy_init))
Definition: macro.lex.yy.c:714
LONG HRESULT
Definition: typedefs.h:77
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
HWND hwndFrom
Definition: winuser.h:3110
#define TOOLTIPTEXTW
Definition: commctrl.h:1856
#define SWP_NOSIZE
Definition: winuser.h:1230
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
unsigned int UINT
Definition: ndis.h:50
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

◆ OnTravelBack()

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

Definition at line 1493 of file internettoolbar.cpp.

1494 {
1495  CComPtr<IWebBrowser> webBrowser;
1496  HRESULT hResult;
1497 
1498  hResult = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IWebBrowser, &webBrowser));
1499  if (FAILED_UNEXPECTEDLY(hResult))
1500  return 0;
1501  hResult = webBrowser->GoBack();
1502  return 1;
1503 }
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
#define SID_SShellBrowser
Definition: shlguid.h:125

◆ OnTravelForward()

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

Definition at line 1505 of file internettoolbar.cpp.

1506 {
1507  CComPtr<IWebBrowser> webBrowser;
1508  HRESULT hResult;
1509 
1510  hResult = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IWebBrowser, &webBrowser));
1511  if (FAILED_UNEXPECTEDLY(hResult))
1512  return 0;
1513  hResult = webBrowser->GoForward();
1514  return 1;
1515 }
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
#define SID_SShellBrowser
Definition: shlguid.h:125

◆ OnUpLevel()

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

Definition at line 1517 of file internettoolbar.cpp.

1518 {
1519  IUnknown_Exec(fSite, CGID_ShellBrowser, IDM_GOTO_UPONELEVEL, 0, NULL, NULL);
1520  return 1;
1521 }
#define IDM_GOTO_UPONELEVEL
Definition: resource.h:47
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IUnknown > fSite
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1034

◆ OnWinEvent()

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

Definition at line 1403 of file internettoolbar.cpp.

1405 {
1406  HRESULT hResult;
1407 
1408  if (fMenuBar)
1409  {
1410  hResult = IUnknown_RelayWinEvent(fMenuBar, hWnd, uMsg, wParam, lParam, theResult);
1411  if (hResult != S_FALSE)
1412  return hResult;
1413  }
1414 
1415  if (fNavigationBar)
1416  {
1417  hResult = IUnknown_RelayWinEvent(fNavigationBar, hWnd, uMsg, wParam, lParam, theResult);
1418  if (hResult != S_FALSE)
1419  return hResult;
1420  }
1421 
1422  if (fLogoBar)
1423  {
1424  hResult = IUnknown_RelayWinEvent(fLogoBar, hWnd, uMsg, wParam, lParam, theResult);
1425  if (hResult != S_FALSE)
1426  return hResult;
1427  }
1428 
1429  return S_FALSE;
1430 }
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
CComPtr< IUnknown > fLogoBar
HRESULT IUnknown_RelayWinEvent(IUnknown *punk, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IUnknown > fNavigationBar
CComPtr< IShellMenu > fMenuBar
LPARAM lParam
Definition: combotst.c:139

Referenced by OnCommand(), and OnNotify().

◆ OnWinIniChange()

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

Definition at line 1896 of file internettoolbar.cpp.

1897 {
1898  HRESULT hr;
1899  HWND hwndMenu;
1900 
1901  hr = IUnknown_GetWindow(fMenuBar, &hwndMenu);
1902  if (FAILED_UNEXPECTEDLY(hr))
1903  return 0;
1904 
1905  CComPtr<IWinEventHandler> menuWinEventHandler;
1906  hr = fMenuBar->QueryInterface(IID_PPV_ARG(IWinEventHandler, &menuWinEventHandler));
1907  if (FAILED_UNEXPECTEDLY(hr))
1908  return 0;
1909 
1910  LRESULT lres;
1911  hr = menuWinEventHandler->OnWinEvent(hwndMenu, uMsg, wParam, lParam, &lres);
1912  if (FAILED_UNEXPECTEDLY(hr))
1913  return 0;
1914 
1915  return lres;
1916 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
WPARAM wParam
Definition: combotst.c:138
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IShellMenu > fMenuBar
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139

◆ QueryBand()

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

Implements IBandSite.

Definition at line 1450 of file internettoolbar.cpp.

1452 {
1453  if (ppstb == NULL)
1454  return E_POINTER;
1455  if (dwBandID == ITBBID_MENUBAND && fMenuBar.p != NULL)
1456  return fMenuBar->QueryInterface(IID_PPV_ARG(IDeskBand, ppstb));
1457  //if (dwBandID == ITBBID_BRANDBAND && fLogoBar.p != NULL)
1458  // return fLogoBar->QueryInterface(IID_PPV_ARG(IDeskBand, ppstb));
1459  *ppstb = NULL;
1460  return E_FAIL;
1461 }
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
#define ITBBID_MENUBAND
Definition: undocshell.h:763
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IShellMenu > fMenuBar
#define E_POINTER
Definition: winerror.h:2365

◆ QueryService()

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

Implements IServiceProvider.

Definition at line 1384 of file internettoolbar.cpp.

1385 {
1386  HRESULT hResult;
1387 
1388  if (IsEqualIID(guidService, IID_IBandSite))
1389  return this->QueryInterface(riid, ppvObject);
1390  if (IsEqualIID(guidService, SID_IBandProxy))
1391  {
1392  if (fBandProxy.p == NULL)
1393  {
1394  hResult = CreateAndInitBandProxy();
1395  if (FAILED_UNEXPECTEDLY(hResult))
1396  return hResult;
1397  }
1398  return fBandProxy->QueryInterface(riid, ppvObject);
1399  }
1400  return IUnknown_QueryService(fSite, guidService, riid, ppvObject);
1401 }
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
REFIID LPVOID * ppvObject
Definition: precomp.h:44
CComPtr< IBandProxy > fBandProxy
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HRESULT CreateAndInitBandProxy()
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

Referenced by CDockSite::QueryService().

◆ QueryStatus()

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

Implements IOleCommandTarget.

Definition at line 1100 of file internettoolbar.cpp.

1102 {
1103  if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1104  {
1105  while (cCmds != 0)
1106  {
1107  switch (prgCmds->cmdID)
1108  {
1109  case ITID_TEXTLABELS: // Text Labels state
1110  prgCmds->cmdf = OLECMDF_SUPPORTED;
1111  break;
1112  case ITID_TOOLBARBANDSHOWN: // toolbar visibility
1113  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1115  prgCmds->cmdf |= OLECMDF_LATCHED;
1116  break;
1117  case ITID_ADDRESSBANDSHOWN: // address bar visibility
1118  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1120  prgCmds->cmdf |= OLECMDF_LATCHED;
1121  break;
1122  case ITID_LINKSBANDSHOWN: // links bar visibility
1123  prgCmds->cmdf = 0;
1124  break;
1125  case ITID_MENUBANDSHOWN: // Menubar band visibility
1126  prgCmds->cmdf = OLECMDF_SUPPORTED;
1127  if (fMenuBar)
1128  prgCmds->cmdf |= OLECMDF_LATCHED;
1129  break;
1130  case ITID_AUTOHIDEENABLED: // Auto hide enabled/disabled
1131  prgCmds->cmdf = 0;
1132  break;
1133  case ITID_CUSTOMIZEENABLED: // customize enabled
1134  prgCmds->cmdf = OLECMDF_SUPPORTED;
1135  break;
1136  case ITID_TOOLBARLOCKED: // lock toolbars
1137  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1138  if (fLocked)
1139  prgCmds->cmdf |= OLECMDF_LATCHED;
1140  break;
1141  default:
1142  prgCmds->cmdf = 0;
1143  break;
1144  }
1145  prgCmds++;
1146  cCmds--;
1147  }
1148  return S_OK;
1149  }
1150  return E_FAIL;
1151 }
#define ITID_LINKSBANDSHOWN
Definition: undocshell.h:774
HRESULT IsBandVisible(int BandID)
#define ITID_TEXTLABELS
Definition: undocshell.h:771
#define E_FAIL
Definition: ddrawi.h:102
#define ITID_TOOLBARLOCKED
Definition: undocshell.h:778
#define ITBBID_TOOLSBAND
Definition: undocshell.h:765
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:766
#define ITID_MENUBANDSHOWN
Definition: undocshell.h:775
#define ITID_ADDRESSBANDSHOWN
Definition: undocshell.h:773
#define S_OK
Definition: intsafe.h:59
CComPtr< IShellMenu > fMenuBar
#define ITID_AUTOHIDEENABLED
Definition: undocshell.h:776
#define ITID_TOOLBARBANDSHOWN
Definition: undocshell.h:772
#define ITID_CUSTOMIZEENABLED
Definition: undocshell.h:777
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ RemoveBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::RemoveBand ( DWORD  dwBandID)
virtual

Implements IBandSite.

Definition at line 1469 of file internettoolbar.cpp.

1470 {
1471  UNIMPLEMENTED;
1472  return E_NOTIMPL;
1473 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ReserveBorderSpace()

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

Definition at line 633 of file internettoolbar.cpp.

634 {
635  CComPtr<IDockingWindowSite> dockingWindowSite;
636  RECT availableBorderSpace;
637 
638  HRESULT hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
639  if (FAILED_UNEXPECTEDLY(hResult))
640  return hResult;
641  hResult = dockingWindowSite->GetBorderDW(static_cast<IDockingWindow *>(this), &availableBorderSpace);
642  if (FAILED_UNEXPECTEDLY(hResult))
643  return hResult;
644 
645  if (maxHeight && availableBorderSpace.bottom - availableBorderSpace.top > maxHeight)
646  {
647  availableBorderSpace.bottom = availableBorderSpace.top + maxHeight;
648  }
649 
650  return ResizeBorderDW(&availableBorderSpace, fSite, FALSE);
651 }
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
LONG top
Definition: windef.h:292
#define IID_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
LONG bottom
Definition: windef.h:294

Referenced by LockUnlockToolbars(), OnMouseMove(), ShowDW(), and ToggleBandVisibility().

◆ ResizeBorderDW()

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

Implements IDockingWindow.

Definition at line 960 of file internettoolbar.cpp.

962 {
963  RECT neededBorderSpace;
964  RECT availableBorderSpace = *prcBorder;
965 
966  SendMessage(fMainReBar, RB_SIZETORECT, RBSTR_CHANGERECT, reinterpret_cast<LPARAM>(&availableBorderSpace));
967 
968  // RBSTR_CHANGERECT does not seem to set the proper size in the rect.
969  // Let's make sure we fetch the actual size properly.
970  ::GetWindowRect(fMainReBar, &availableBorderSpace);
971  neededBorderSpace.left = 0;
972  neededBorderSpace.top = availableBorderSpace.bottom - availableBorderSpace.top;
973  if (!fLocked)
974  neededBorderSpace.top += 3;
975  neededBorderSpace.right = 0;
976  neededBorderSpace.bottom = 0;
977 
978  CComPtr<IDockingWindowSite> dockingWindowSite;
979 
980  HRESULT hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
981  if (FAILED_UNEXPECTEDLY(hResult))
982  return hResult;
983 
984  hResult = dockingWindowSite->RequestBorderSpaceDW(static_cast<IDockingWindow *>(this), &neededBorderSpace);
985  if (FAILED_UNEXPECTEDLY(hResult))
986  return hResult;
987 
988  hResult = dockingWindowSite->SetBorderSpaceDW(static_cast<IDockingWindow *>(this), &neededBorderSpace);
989  if (FAILED_UNEXPECTEDLY(hResult))
990  return hResult;
991 
992  return S_OK;
993 }
#define RB_SIZETORECT
Definition: commctrl.h:1570
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define IID_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fSite
#define RBSTR_CHANGERECT
Definition: commctrl.h:1568
#define S_OK
Definition: intsafe.h:59
#define SendMessage
Definition: winuser.h:5709
LONG bottom
Definition: windef.h:294
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)

Referenced by ReserveBorderSpace().

◆ Save()

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

Definition at line 1013 of file internettoolbar.cpp.

1014 {
1015  return E_NOTIMPL;
1016 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SendToolbarMsg()

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

Definition at line 1304 of file internettoolbar.cpp.

1306 {
1307  return E_NOTIMPL;
1308 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetBandSiteInfo()

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

Implements IBandSite.

Definition at line 1481 of file internettoolbar.cpp.

1482 {
1483  UNIMPLEMENTED;
1484  return E_NOTIMPL;
1485 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ SetBandState()

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

Implements IBandSite.

Definition at line 1463 of file internettoolbar.cpp.

1464 {
1465  UNIMPLEMENTED;
1466  return E_NOTIMPL;
1467 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:114

◆ SetCommandTarget()

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

Definition at line 1232 of file internettoolbar.cpp.

1233 {
1234  HRESULT hResult;
1235 
1236  TRACE("SetCommandTarget %p category %s param %d\n", theTarget, wine_dbgstr_guid(category), param14);
1237 
1238  fCommandTarget.Release();
1240  if (FAILED_UNEXPECTEDLY(hResult))
1241  return hResult;
1243  return S_OK;
1244 }
const char * wine_dbgstr_guid(const GUID *guid)
#define IID_PPV_ARG(Itype, ppType)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IOleCommandTarget > fCommandTarget
#define S_OK
Definition: intsafe.h:59
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ SetImageList()

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

Definition at line 1310 of file internettoolbar.cpp.

1312 {
1313  return E_NOTIMPL;
1314 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetSite()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetSite ( IUnknown pUnkSite)
virtual

Implements IObjectWithSite.

Definition at line 1326 of file internettoolbar.cpp.

1327 {
1328  CComPtr<IBrowserService> browserService;
1329  HWND ownerWindow;
1330  HWND dockContainer;
1331  HRESULT hResult;
1332 
1333  if (pUnkSite == NULL)
1334  {
1335  hResult = AtlUnadvise(fSite, DIID_DWebBrowserEvents, fAdviseCookie);
1337  DestroyWindow();
1338  fSite.Release();
1339  }
1340  else
1341  {
1342  // get window handle of owner
1343  hResult = IUnknown_GetWindow(pUnkSite, &ownerWindow);
1344  if (FAILED_UNEXPECTEDLY(hResult))
1345  return hResult;
1346  if (ownerWindow == NULL)
1347  return E_FAIL;
1348 
1349  // create dock container
1350  fSite = pUnkSite;
1351  dockContainer = SHCreateWorkerWindowW(0, ownerWindow, 0,
1353  if (dockContainer == NULL)
1354  return E_FAIL;
1355  SubclassWindow(dockContainer);
1356 
1357  // create rebar in dock container
1363  0, 0, 700, 60, dockContainer, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
1364  if (fMainReBar == NULL)
1365  return E_FAIL;
1366 
1367  // take advice to watch events
1368  hResult = IUnknown_QueryService(pUnkSite, SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService));
1369  hResult = AtlAdvise(browserService, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &fAdviseCookie);
1370  }
1371  return S_OK;
1372 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:46
#define WS_EX_LTRREADING
Definition: winuser.h:393
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
#define RBS_BANDBORDERS
Definition: commctrl.h:1444
#define REBARCLASSNAMEW
Definition: commctrl.h:1435
#define CCS_NODIVIDER
Definition: commctrl.h:2220
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:512
#define CreateWindowEx
Definition: winuser.h:5621
smooth NULL
Definition: ftsmooth.c:416
#define CCS_TOP
Definition: commctrl.h:2214
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
#define WS_EX_LEFT
Definition: winuser.h:391
#define RBS_AUTOSIZE
Definition: commctrl.h:1447
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:74
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
unsigned long DWORD
Definition: ntddk_ex.h:95
CComPtr< IUnknown > fSite
#define WS_EX_RIGHTSCROLLBAR
Definition: winuser.h:401
#define S_OK
Definition: intsafe.h:59
#define WS_BORDER
Definition: pedump.c:625
void Release()
Definition: atlcomcli.h:140
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1449
HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2872
#define SID_SShellBrowser
Definition: shlguid.h:125
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
#define RBS_REGISTERDROP
Definition: commctrl.h:1446

Referenced by CloseDW().

◆ SetState() [1/2]

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

Definition at line 748 of file internettoolbar.cpp.

749 {
750  long state = 0;
751  if (pcmd->cmdf & OLECMDF_ENABLED)
753  if (pcmd->cmdf & OLECMDF_LATCHED)
755  return SetState(pguidCmdGroup, commandID, state);
756 }
HRESULT SetState(const GUID *pguidCmdGroup, long commandID, OLECMD *pcmd)
static int state
Definition: maze.c:121
#define TBSTATE_CHECKED
Definition: commctrl.h:944
#define TBSTATE_ENABLED
Definition: commctrl.h:946

Referenced by CommandStateChanged().

◆ SetState() [2/2]

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

Definition at line 1283 of file internettoolbar.cpp.

1284 {
1285  // map the command id
1286  ::SendMessage(fToolbarWindow, TB_SETSTATE, commandID, MAKELONG(theState, 0));
1287  return S_OK;
1288 }
#define TB_SETSTATE
Definition: commctrl.h:1026
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define S_OK
Definition: intsafe.h:59
#define SendMessage
Definition: winuser.h:5709

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ShowDW ( BOOL  fShow)
virtual

Implements IDockingWindow.

Definition at line 883 of file internettoolbar.cpp.

884 {
885  HRESULT hResult;
886 
887  // show the bar here
888  if (fShow)
889  {
890  hResult = ReserveBorderSpace();
891  if (FAILED_UNEXPECTEDLY(hResult))
892  return hResult;
893  }
894 
895  if (fMenuBar)
896  {
897  hResult = IUnknown_ShowDW(fMenuBar, fShow);
898  if (FAILED_UNEXPECTEDLY(hResult))
899  return hResult;
900  }
901 
902  if (fControlsBar)
903  {
904  hResult = IUnknown_ShowDW(fControlsBar, fShow);
905  if (FAILED_UNEXPECTEDLY(hResult))
906  return hResult;
907  }
908  if (fNavigationBar)
909  {
910  hResult = IUnknown_ShowDW(fNavigationBar, fShow);
911  if (FAILED_UNEXPECTEDLY(hResult))
912  return hResult;
913  }
914  if (fLogoBar)
915  {
916  hResult = IUnknown_ShowDW(fLogoBar, fShow);
917  if (FAILED_UNEXPECTEDLY(hResult))
918  return hResult;
919  }
920  return S_OK;
921 }
CComPtr< IUnknown > fLogoBar
CComPtr< IUnknown > fControlsBar
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
HRESULT IUnknown_ShowDW(IUnknown *punk, BOOL fShow)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:59
CComPtr< IShellMenu > fMenuBar

◆ ToggleBandVisibility()

HRESULT CInternetToolbar::ToggleBandVisibility ( int  BandID)

Definition at line 1082 of file internettoolbar.cpp.

1083 {
1084  int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1085 
1088 
1089  if (bandInfo.fStyle & RBBS_HIDDEN)
1090  bandInfo.fStyle &= ~RBBS_HIDDEN;
1091  else
1092  bandInfo.fStyle |= RBBS_HIDDEN;
1093 
1095 
1096  ReserveBorderSpace(0);
1097  return S_OK;
1098 }
#define RB_GETBANDINFOW
Definition: commctrl.h:1581
#define RBBIM_STYLE
Definition: commctrl.h:1474
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
LONG_PTR LPARAM
Definition: windef.h:208
GLuint index
Definition: glext.h:6031
#define RB_SETBANDINFOW
Definition: commctrl.h:1556
#define S_OK
Definition: intsafe.h:59
#define RBBS_HIDDEN
Definition: commctrl.h:1464
#define RB_IDTOINDEX
Definition: commctrl.h:1560
#define SendMessage
Definition: winuser.h:5709
struct tagREBARBANDINFOW REBARBANDINFOW
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by Exec(), and OnContextMenu().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CInternetToolbar::TranslateAcceleratorIO ( LPMSG  lpMsg)
virtual

Definition at line 848 of file internettoolbar.cpp.

849 {
850  HRESULT hr = S_FALSE;
851 
852  if (fMenuBar)
854  if (hr == S_OK)
855  return hr;
856 
857  if (fControlsBar)
859  if (hr == S_OK)
860  return hr;
861 
862  if (fNavigationBar)
864  if (hr == S_OK)
865  return hr;
866 
867  return S_FALSE;
868 }
HRESULT hr
Definition: shlfolder.c:183
CComPtr< IUnknown > fControlsBar
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:59
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4104
CComPtr< IShellMenu > fMenuBar

◆ UIActivateIO()

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

Definition at line 821 of file internettoolbar.cpp.

822 {
823  return E_NOTIMPL;
824 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Unknown1()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Unknown1 ( )
virtual

Definition at line 1246 of file internettoolbar.cpp.

1247 {
1248  return E_NOTIMPL;
1249 }
#define E_NOTIMPL
Definition: ddrawi.h:99

Member Data Documentation

◆ fAdviseCookie

DWORD CInternetToolbar::fAdviseCookie

Definition at line 90 of file internettoolbar.h.

Referenced by CInternetToolbar(), and SetSite().

◆ fBandProxy

CComPtr<IBandProxy> CInternetToolbar::fBandProxy

Definition at line 91 of file internettoolbar.h.

Referenced by CreateAndInitBandProxy(), and QueryService().

◆ fCommandCategory

GUID CInternetToolbar::fCommandCategory

Definition at line 88 of file internettoolbar.h.

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

◆ fCommandTarget

CComPtr<IOleCommandTarget> CInternetToolbar::fCommandTarget

Definition at line 87 of file internettoolbar.h.

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

◆ fControlsBar

CComPtr<IUnknown> CInternetToolbar::fControlsBar

Definition at line 84 of file internettoolbar.h.

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

◆ fLocked

◆ fLogoBar

CComPtr<IUnknown> CInternetToolbar::fLogoBar

Definition at line 83 of file internettoolbar.h.

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

◆ fMainReBar

◆ fMenuBandWindow

HWND CInternetToolbar::fMenuBandWindow

Definition at line 81 of file internettoolbar.h.

Referenced by CInternetToolbar(), and InitNew().

◆ fMenuBar

CComPtr<IShellMenu> CInternetToolbar::fMenuBar

◆ fMenuCallback

CComPtr<CMenuCallback> CInternetToolbar::fMenuCallback

Definition at line 86 of file internettoolbar.h.

Referenced by CInternetToolbar(), and CreateMenuBar().

◆ fNavigationBar

CComPtr<IUnknown> CInternetToolbar::fNavigationBar

◆ fNavigationWindow

HWND CInternetToolbar::fNavigationWindow

Definition at line 82 of file internettoolbar.h.

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

◆ fSite

◆ fSizing

BOOL CInternetToolbar::fSizing

Definition at line 92 of file internettoolbar.h.

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

◆ fStartHeight

LONG CInternetToolbar::fStartHeight

Definition at line 94 of file internettoolbar.h.

Referenced by OnLDown(), and OnMouseMove().

◆ fStartPosition

POINT CInternetToolbar::fStartPosition

Definition at line 93 of file internettoolbar.h.

Referenced by OnLDown(), and OnMouseMove().

◆ fToolbarWindow

HWND CInternetToolbar::fToolbarWindow

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