ReactOS  0.4.15-dev-5487-ge7bbbf0
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 IShellChangeNotify
HRESULT OnChange ([in] LONG lEvent, [in] PCIDLIST_ABSOLUTE pidl1, [in] PCIDLIST_ABSOLUTE pidl2)
 
- 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 }
CComPtr< CMenuCallback > fMenuCallback
#define NULL
Definition: types.h:112

◆ ~CInternetToolbar()

CInternetToolbar::~CInternetToolbar ( )
virtual

Definition at line 619 of file internettoolbar.cpp.

620 {
621 }

Member Function Documentation

◆ AddBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::AddBand ( IUnknown punk)
virtual

Implements IBandSite.

Definition at line 1436 of file internettoolbar.cpp.

1437 {
1438  UNIMPLEMENTED;
1439  return E_NOTIMPL;
1440 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ AddBitmap()

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

Definition at line 1288 of file internettoolbar.cpp.

1290 {
1291  return E_NOTIMPL;
1292 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AddButtons()

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

Definition at line 1249 of file internettoolbar.cpp.

1250 {
1251  return E_NOTIMPL;
1252 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AddDockItem()

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

Definition at line 623 of file internettoolbar.cpp.

624 {
625  CComPtr<CDockSite> newSite;
626 
627  newSite = new CComObject<CDockSite>;
628  newSite->Initialize(newItem, this, fMainReBar, bandID, flags);
629 }
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 1254 of file internettoolbar.cpp.

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

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::CloseDW ( DWORD  dwReserved)
virtual

Implements IDockingWindow.

Definition at line 921 of file internettoolbar.cpp.

922 {
923  HRESULT hResult;
924 
925  if (fMenuBar)
926  {
928  if (FAILED_UNEXPECTEDLY(hResult))
929  return hResult;
930  ReleaseCComPtrExpectZero(fMenuBar);
931  }
932  if (fControlsBar)
933  {
935  if (FAILED_UNEXPECTEDLY(hResult))
936  return hResult;
937  ReleaseCComPtrExpectZero(fControlsBar);
938  }
939  if (fNavigationBar)
940  {
942  if (FAILED_UNEXPECTEDLY(hResult))
943  return hResult;
944  ReleaseCComPtrExpectZero(fNavigationBar);
945  }
946  if (fLogoBar)
947  {
949  if (FAILED_UNEXPECTEDLY(hResult))
950  return hResult;
951  ReleaseCComPtrExpectZero(fLogoBar);
952  }
953 
954  SetSite(NULL);
955  return S_OK;
956 }
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
HRESULT IUnknown_CloseDW(IUnknown *punk, DWORD dwReserved)
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:52
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite)
CComPtr< IShellMenu > fMenuBar
#define NULL
Definition: types.h:112

◆ CommandStateChanged()

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

Definition at line 756 of file internettoolbar.cpp.

757 {
758  HRESULT hResult;
759 
760  hResult = S_OK;
761  switch (commandID)
762  {
763  case -1:
764  // loop through buttons
765  //for buttons in CLSID_CommonButtons
766  // if up, QueryStatus for up state and update it
767  //
768  //for buttons in fCommandCategory, update with QueryStatus of fCommandTarget
769 
770  OLECMD commandList[4];
771  commandList[0].cmdID = 0x1c;
772  commandList[1].cmdID = 0x1d;
773  commandList[2].cmdID = 0x1e;
774  commandList[3].cmdID = 0x23;
775  IUnknown_QueryStatus(fSite, CGID_Explorer, 4, commandList, NULL);
776  SetState(&CLSID_CommonButtons, gSearchCommandID, &commandList[0]);
777  SetState(&CLSID_CommonButtons, gFoldersCommandID, &commandList[3]);
778  //SetState(&CLSID_CommonButtons, gFavoritesCommandID, &commandList[2]);
779  //SetState(&CLSID_CommonButtons, gHistoryCommandID, &commandList[1]);
780 
781  break;
782  case 1:
783  // forward
784  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_FORWARD, newValue ? TBSTATE_ENABLED : 0);
785  break;
786  case 2:
787  // back
788  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_BACK, newValue ? TBSTATE_ENABLED : 0);
789  break;
790  case 3:
791  // up
792  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_UPONELEVEL, newValue ? TBSTATE_ENABLED : 0);
793  break;
794  }
795  return hResult;
796 }
#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
LONG HRESULT
Definition: typedefs.h:79
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define TBSTATE_ENABLED
Definition: commctrl.h:974
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:1041

Referenced by Invoke().

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ContextSensitiveHelp ( BOOL  fEnterMode)
virtual

Implements IOleWindow.

Definition at line 876 of file internettoolbar.cpp.

877 {
878  return E_NOTIMPL;
879 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CreateAndInitBandProxy()

HRESULT CInternetToolbar::CreateAndInitBandProxy ( )

Definition at line 798 of file internettoolbar.cpp.

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

Referenced by QueryService().

◆ CreateMenuBar()

HRESULT CInternetToolbar::CreateMenuBar ( IShellMenu **  menuBar)

Definition at line 651 of file internettoolbar.cpp.

652 {
653  CComPtr<IShellMenu> menubar;
655  VARIANT menuOut;
656  HWND ownerWindow;
657  HRESULT hResult;
658 
659  if (!pMenuBar)
660  return E_POINTER;
661 
662  *pMenuBar = NULL;
663 
664  hResult = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &menubar));
665  if (FAILED_UNEXPECTEDLY(hResult))
666  return hResult;
667 
668  hResult = fMenuCallback->QueryInterface(IID_PPV_ARG(IShellMenuCallback, &callback));
669  if (FAILED_UNEXPECTEDLY(hResult))
670  return hResult;
671 
672  hResult = menubar->Initialize(callback, -1, ANCESTORDEFAULT, SMINIT_HORIZONTAL | SMINIT_TOPLEVEL);
673  if (FAILED_UNEXPECTEDLY(hResult))
674  return hResult;
675 
676  // Set Menu
677  {
678  hResult = IUnknown_Exec(fSite, CGID_Explorer, 0x35, 0, NULL, &menuOut);
679  if (FAILED_UNEXPECTEDLY(hResult))
680  return hResult;
681 
682  if (V_VT(&menuOut) != VT_INT_PTR || V_INTREF(&menuOut) == NULL)
683  return E_FAIL;
684 
685  hResult = IUnknown_GetWindow(fSite, &ownerWindow);
686  if (FAILED_UNEXPECTEDLY(hResult))
687  return hResult;
688 
689  HMENU hMenuBar = (HMENU) V_INTREF(&menuOut);
690 
691  // FIXME: Figure out the proper way to do this.
692  HMENU hMenuFavs = GetSubMenu(hMenuBar, 3);
693  if (hMenuFavs)
694  {
696  }
697 
698  hResult = menubar->SetMenu(hMenuBar, ownerWindow, SMSET_DONTOWN);
699  if (FAILED_UNEXPECTEDLY(hResult))
700  return hResult;
701  }
702 
703  hResult = IUnknown_Exec(menubar, CGID_MenuBand, 3, 1, NULL, NULL);
704  if (FAILED_UNEXPECTEDLY(hResult))
705  return hResult;
706 
707  *pMenuBar = menubar.Detach();
708 
709  return S_OK;
710 }
#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:1329
CComPtr< CMenuCallback > fMenuCallback
#define CGID_MenuBand
#define V_INTREF(A)
Definition: oleauto.h:252
LONG HRESULT
Definition: typedefs.h:79
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
CComPtr< IUnknown > fSite
#define V_VT(A)
Definition: oleauto.h:211
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define S_OK
Definition: intsafe.h:52
#define CMenuBand_CreateInstance
Definition: shellmenu.h:81
#define NULL
Definition: types.h:112
static IPrintDialogCallback callback
Definition: printdlg.c:326
T * Detach()
Definition: atlcomcli.h:163
#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:1080

Referenced by InitNew().

◆ CreateToolsBar()

HRESULT CInternetToolbar::CreateToolsBar ( IUnknown **  toolsBar)

◆ EnumBands()

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

Implements IBandSite.

Definition at line 1442 of file internettoolbar.cpp.

1443 {
1444  UNIMPLEMENTED;
1445  return E_NOTIMPL;
1446 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ Exec()

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

Implements IOleCommandTarget.

Definition at line 1151 of file internettoolbar.cpp.

1153 {
1154  if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1155  {
1156  switch (nCmdID)
1157  {
1158  case 1:
1159  // what do I do here?
1160  return S_OK;
1161  case ITID_TEXTLABELS:
1162  // toggle text labels
1163  return S_OK;
1164  case ITID_TOOLBARBANDSHOWN:
1166  case ITID_ADDRESSBANDSHOWN:
1168  case ITID_LINKSBANDSHOWN:
1169  // toggle links band visibility
1170  return S_OK;
1171  case ITID_CUSTOMIZEENABLED:
1172  // run customize
1173  return S_OK;
1174  case ITID_TOOLBARLOCKED:
1175  return LockUnlockToolbars(!fLocked);
1176  }
1177  }
1178  return E_FAIL;
1179 }
#define ITID_LINKSBANDSHOWN
Definition: undocshell.h:673
#define ITID_TEXTLABELS
Definition: undocshell.h:670
#define E_FAIL
Definition: ddrawi.h:102
HRESULT LockUnlockToolbars(bool locked)
#define ITID_TOOLBARLOCKED
Definition: undocshell.h:677
#define ITBBID_TOOLSBAND
Definition: undocshell.h:664
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:665
#define ITID_ADDRESSBANDSHOWN
Definition: undocshell.h:672
#define S_OK
Definition: intsafe.h:52
HRESULT ToggleBandVisibility(int BandID)
#define ITID_TOOLBARBANDSHOWN
Definition: undocshell.h:671
#define ITID_CUSTOMIZEENABLED
Definition: undocshell.h:676
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by OnMenuDropDown().

◆ GetBandObject()

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

Implements IBandSite.

Definition at line 1473 of file internettoolbar.cpp.

1474 {
1475  UNIMPLEMENTED;
1476  return E_NOTIMPL;
1477 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBandSiteInfo ( BANDSITEINFO pbsinfo)
virtual

Implements IBandSite.

Definition at line 1485 of file internettoolbar.cpp.

1486 {
1487  UNIMPLEMENTED;
1488  return E_NOTIMPL;
1489 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetBitmapSize()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetBitmapSize ( long paramC)
virtual

Definition at line 1294 of file internettoolbar.cpp.

1295 {
1296  if (paramC == NULL)
1297  return E_POINTER;
1298  *paramC = MAKELONG(24, 24);
1299  return S_OK;
1300 }
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ GetButton()

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

Definition at line 1267 of file internettoolbar.cpp.

1268 {
1269  return E_NOTIMPL;
1270 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetClassID ( CLSID pClassID)
virtual

Implements IPersist.

Definition at line 993 of file internettoolbar.cpp.

994 {
995  if (pClassID == NULL)
996  return E_POINTER;
997  *pClassID = CLSID_InternetToolbar;
998  return S_OK;
999 }
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#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 1191 of file internettoolbar.cpp.

1193 {
1194  return E_NOTIMPL;
1195 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetSite()

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

Definition at line 1372 of file internettoolbar.cpp.

1373 {
1374  if (ppvSite == NULL)
1375  return E_POINTER;
1376  if (fSite.p != NULL)
1377  return fSite->QueryInterface(riid, ppvSite);
1378  *ppvSite = NULL;
1379  return S_OK;
1380 }
REFIID riid
Definition: precomp.h:44
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetSizeMax ( ULARGE_INTEGER pcbSize)
virtual

Implements IPersistStreamInit.

Definition at line 1016 of file internettoolbar.cpp.

1017 {
1018  return E_NOTIMPL;
1019 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetState()

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

Definition at line 1272 of file internettoolbar.cpp.

1273 {
1274  if (theState == NULL)
1275  return E_POINTER;
1276  // map the command id
1277  *theState = (long)::SendMessage(fToolbarWindow, TB_GETSTATE, commandID, 0);
1278  return S_OK;
1279 }
#define S_OK
Definition: intsafe.h:52
#define TB_GETSTATE
Definition: commctrl.h:1055
#define long
Definition: qsort.c:33
#define NULL
Definition: types.h:112
#define SendMessage
Definition: winuser.h:5833
#define E_POINTER
Definition: winerror.h:2365

◆ GetTypeInfo()

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

Implements IDispatch.

Definition at line 1186 of file internettoolbar.cpp.

1187 {
1188  return E_NOTIMPL;
1189 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetTypeInfoCount()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetTypeInfoCount ( UINT pctinfo)
virtual

Implements IDispatch.

Definition at line 1181 of file internettoolbar.cpp.

1182 {
1183  return E_NOTIMPL;
1184 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CInternetToolbar::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 868 of file internettoolbar.cpp.

869 {
870  if (lphwnd == NULL)
871  return E_POINTER;
872  *lphwnd = m_hWnd;
873  return S_OK;
874 }
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CInternetToolbar::HasFocusIO ( )
virtual

Definition at line 824 of file internettoolbar.cpp.

825 {
826  HRESULT hr = S_FALSE;
827 
828  if (fMenuBar)
830  if (hr != S_FALSE)
831  return hr;
832 
833  if (fControlsBar)
835  if (hr != S_FALSE)
836  return hr;
837 
838  if (fNavigationBar)
840  if (hr != S_FALSE)
841  return hr;
842 
843  return S_FALSE;
844 }
HRESULT hr
Definition: shlfolder.c:183
CComPtr< IUnknown > fControlsBar
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4182
CComPtr< IUnknown > fNavigationBar
CComPtr< IShellMenu > fMenuBar

◆ InitNew()

HRESULT STDMETHODCALLTYPE CInternetToolbar::InitNew ( void  )
virtual

Implements IPersistStreamInit.

Definition at line 1021 of file internettoolbar.cpp.

1022 {
1023  CComPtr<IShellMenu> menuBar;
1024  CComPtr<IUnknown> logoBar;
1025  CComPtr<IUnknown> toolsBar;
1026  CComPtr<IUnknown> navigationBar;
1027  HRESULT hResult;
1028 
1029  /* Create and attach the menubar to the rebar */
1030  hResult = CreateMenuBar(&menuBar);
1031  if (FAILED_UNEXPECTEDLY(hResult))
1032  return hResult;
1034 
1035  hResult = IUnknown_GetWindow(menuBar, &fMenuBandWindow);
1036  fMenuBar.Attach(menuBar.Detach()); // transfer the ref count
1037 
1038  // FIXME: The ROS Rebar does not properly support fixed-size items such as the brandband,
1039  // and it will put them in their own row, sized to take up the whole row.
1040 #if 0
1041  /* Create and attach the brand/logo to the rebar */
1042  hResult = CBrandBand_CreateInstance(IID_PPV_ARG(IUnknown, &logoBar));
1043  if (FAILED_UNEXPECTEDLY(hResult))
1044  return hResult;
1046  fLogoBar.Attach(logoBar.Detach()); // transfer the ref count
1047 #endif
1048 
1049  /* Create and attach the standard toolbar to the rebar */
1050  hResult = CToolsBand_CreateInstance(IID_PPV_ARG(IUnknown, &toolsBar));
1051  if (FAILED_UNEXPECTEDLY(hResult))
1052  return hResult;
1054  fControlsBar.Attach(toolsBar.Detach()); // transfer the ref count
1056  if (FAILED_UNEXPECTEDLY(hResult))
1057  return hResult;
1058 
1059  /* Create and attach the address/navigation toolbar to the rebar */
1060  hResult = CAddressBand_CreateInstance(IID_PPV_ARG(IUnknown, &navigationBar));
1061  if (FAILED_UNEXPECTEDLY(hResult))
1062  return hResult;
1064  fNavigationBar.Attach(navigationBar.Detach());
1066 
1067  return S_OK;
1068 }
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1329
CComPtr< IUnknown > fLogoBar
#define ITBBID_MENUBAND
Definition: undocshell.h:662
CComPtr< IUnknown > fControlsBar
HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:51
#define ITBBID_TOOLSBAND
Definition: undocshell.h:664
LONG HRESULT
Definition: typedefs.h:79
#define ITBBID_BRANDBAND
Definition: undocshell.h:663
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:665
HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:24
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:52
void AddDockItem(IUnknown *newItem, int bandID, int flags)
CComPtr< IShellMenu > fMenuBar
HRESULT CreateMenuBar(IShellMenu **menuBar)
T * Detach()
Definition: atlcomcli.h:163
void Attach(T *lp)
Definition: atlcomcli.h:156
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 1197 of file internettoolbar.cpp.

1199 {
1200  HRESULT hResult;
1201 
1202  switch(dispIdMember)
1203  {
1204  case DISPID_BEFORENAVIGATE:
1205  hResult = S_OK;
1206  break;
1208  hResult = S_OK;
1209  break;
1211  if (pDispParams->cArgs != 2)
1212  return E_INVALIDARG;
1213  if (V_VT(&pDispParams->rgvarg[0]) != VT_BOOL || V_VT(&pDispParams->rgvarg[1]) != VT_I4)
1214  return E_INVALIDARG;
1215  return CommandStateChanged(V_BOOL(&pDispParams->rgvarg[0]) != VARIANT_FALSE,
1216  V_I4(&pDispParams->rgvarg[1]));
1217  case DISPID_DOWNLOADBEGIN:
1218  hResult = S_OK;
1219  break;
1221  hResult = S_OK;
1222  break;
1224  hResult = S_OK;
1225  break;
1226  }
1227  return S_OK;
1228 }
#define DISPID_COMMANDSTATECHANGE
Definition: webchild.h:40
Definition: compat.h:2298
#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:79
#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:52
HRESULT CommandStateChanged(bool newValue, int commandID)

◆ IsBandVisible()

HRESULT CInternetToolbar::IsBandVisible ( int  BandID)

Definition at line 1070 of file internettoolbar.cpp.

1071 {
1072  int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1073 
1076 
1077  return (bandInfo.fStyle & RBBS_HIDDEN) ? S_FALSE : S_OK;
1078 }
#define RB_GETBANDINFOW
Definition: commctrl.h:1609
#define RBBIM_STYLE
Definition: commctrl.h:1502
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:52
#define RBBS_HIDDEN
Definition: commctrl.h:1492
#define RB_IDTOINDEX
Definition: commctrl.h:1588
#define SendMessage
Definition: winuser.h:5833
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 1001 of file internettoolbar.cpp.

1002 {
1003  return E_NOTIMPL;
1004 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CInternetToolbar::IsWindowOwner ( HWND  hWnd)
virtual

Definition at line 1430 of file internettoolbar.cpp.

1431 {
1432  UNIMPLEMENTED;
1433  return E_NOTIMPL;
1434 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ Load()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Load ( IStream pStm)
virtual

Definition at line 1006 of file internettoolbar.cpp.

1007 {
1008  return E_NOTIMPL;
1009 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ LockUnlockToolbars()

HRESULT CInternetToolbar::LockUnlockToolbars ( bool  locked)

Definition at line 712 of file internettoolbar.cpp.

713 {
714  REBARBANDINFOW rebarBandInfo;
715  int bandCount;
716  CDockSite *dockSite;
717  HRESULT hResult;
718 
719  if (locked != fLocked)
720  {
721  fLocked = locked;
722  rebarBandInfo.cbSize = sizeof(rebarBandInfo);
723  rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_LPARAM;
724  bandCount = (int)SendMessage(fMainReBar, RB_GETBANDCOUNT, 0, 0);
725  for (INT x = 0; x < bandCount; x++)
726  {
727  SendMessage(fMainReBar, RB_GETBANDINFOW, x, (LPARAM)&rebarBandInfo);
728  dockSite = reinterpret_cast<CDockSite *>(rebarBandInfo.lParam);
729  if (dockSite != NULL)
730  {
731  rebarBandInfo.fStyle &= ~(RBBS_NOGRIPPER | RBBS_GRIPPERALWAYS);
732  if (dockSite->fFlags & CDockSite::ITF_NOGRIPPER || fLocked)
733  rebarBandInfo.fStyle |= RBBS_NOGRIPPER;
734  if (dockSite->fFlags & CDockSite::ITF_GRIPPERALWAYS && !fLocked)
735  rebarBandInfo.fStyle |= RBBS_GRIPPERALWAYS;
736  SendMessage(fMainReBar, RB_SETBANDINFOW, x, (LPARAM)&rebarBandInfo);
737  }
738  }
739  hResult = ReserveBorderSpace(0);
740 
741  // TODO: refresh view menu?
742  }
743  return S_OK;
744 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define RB_GETBANDINFOW
Definition: commctrl.h:1609
#define RBBIM_LPARAM
Definition: commctrl.h:1512
int32_t INT
Definition: typedefs.h:58
#define RBBIM_STYLE
Definition: commctrl.h:1502
#define RB_GETBANDCOUNT
Definition: commctrl.h:1585
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
LONG_PTR LPARAM
Definition: windef.h:208
LONG HRESULT
Definition: typedefs.h:79
#define RB_SETBANDINFOW
Definition: commctrl.h:1584
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1496
#define SendMessage
Definition: winuser.h:5833
#define RBBS_NOGRIPPER
Definition: commctrl.h:1497
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 1314 of file internettoolbar.cpp.

1315 {
1316  return E_NOTIMPL;
1317 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnChange()

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

Definition at line 1319 of file internettoolbar.cpp.

1320 {
1321  return E_NOTIMPL;
1322 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnCommand()

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

Definition at line 1812 of file internettoolbar.cpp.

1813 {
1814  LRESULT theResult;
1815  HRESULT hResult;
1816 
1817  hResult = OnWinEvent((HWND) lParam, uMsg, wParam, lParam, &theResult);
1818 
1819  bHandled = hResult == S_OK;
1820 
1821  return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1822 }
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:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
#define S_OK
Definition: intsafe.h:52
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 1664 of file internettoolbar.cpp.

1665 {
1666  HMENU contextMenuBar;
1667  HMENU contextMenu;
1668  POINT clickLocation;
1669  int command;
1670  RBHITTESTINFO hitTestInfo;
1671  REBARBANDINFOW rebarBandInfo;
1672  int bandID;
1673  BOOL goButtonChecked;
1674 
1675  clickLocation.x = LOWORD(lParam);
1676  clickLocation.y = HIWORD(lParam);
1677  hitTestInfo.pt = clickLocation;
1678  ScreenToClient(&hitTestInfo.pt);
1679  SendMessage(fMainReBar, RB_HITTEST, 0, (LPARAM)&hitTestInfo);
1680  if (hitTestInfo.iBand == -1)
1681  return 0;
1682  rebarBandInfo.cbSize = sizeof(rebarBandInfo);
1683  rebarBandInfo.fMask = RBBIM_ID;
1684  SendMessage(fMainReBar, RB_GETBANDINFOW, hitTestInfo.iBand, (LPARAM)&rebarBandInfo);
1685  bandID = rebarBandInfo.wID;
1686  contextMenuBar = LoadMenu(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDM_CABINET_CONTEXTMENU));
1687  contextMenu = GetSubMenu(contextMenuBar, 0);
1688  switch (bandID)
1689  {
1690  case ITBBID_MENUBAND: // menu band
1694  break;
1695  case ITBBID_BRANDBAND: // brand band
1699  break;
1700  case ITBBID_TOOLSBAND: // tools band
1703  break;
1704  case ITBBID_ADDRESSBAND: // navigation band
1707  break;
1708  default:
1709  break;
1710  }
1711 
1713 
1719  goButtonChecked = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
1720  SHCheckMenuItem(contextMenu, IDM_TOOLBARS_GOBUTTON, goButtonChecked);
1721 
1722  // TODO: use GetSystemMetrics(SM_MENUDROPALIGNMENT) to determine menu alignment
1724  clickLocation.x, clickLocation.y, 0, m_hWnd, NULL);
1725  switch (command)
1726  {
1727  case IDM_TOOLBARS_STANDARDBUTTONS: // standard buttons
1729  break;
1730  case IDM_TOOLBARS_ADDRESSBAR: // address bar
1732  break;
1733  case IDM_TOOLBARS_LINKSBAR: // links
1734  break;
1735  case IDM_TOOLBARS_LOCKTOOLBARS: // lock the toolbars
1737  break;
1738  case IDM_TOOLBARS_CUSTOMIZE: // customize
1740  break;
1741  case IDM_TOOLBARS_GOBUTTON:
1743  break;
1744  }
1745 
1746  DestroyMenu(contextMenuBar);
1747  return 1;
1748 }
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDM_TOOLBARS_LINKSBAR
Definition: resource.h:32
#define MF_BYCOMMAND
Definition: winuser.h:202
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define TRUE
Definition: types.h:120
#define TPM_LEFTALIGN
Definition: winuser.h:2367
HRESULT IsBandVisible(int BandID)
#define TPM_RETURNCMD
Definition: winuser.h:2377
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:1510
#define TB_CUSTOMIZE
Definition: commctrl.h:1130
#define RB_GETBANDINFOW
Definition: commctrl.h:1609
#define IDM_TOOLBARS_TEXTLABELS
Definition: resource.h:35
#define ITBBID_MENUBAND
Definition: undocshell.h:662
#define TPM_RIGHTBUTTON
Definition: winuser.h:2370
HRESULT LockUnlockToolbars(bool locked)
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TPM_TOPALIGN
Definition: winuser.h:2373
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
LONG_PTR LPARAM
Definition: windef.h:208
#define ITBBID_TOOLSBAND
Definition: undocshell.h:664
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ITBBID_BRANDBAND
Definition: undocshell.h:663
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:665
#define RB_HITTEST
Definition: commctrl.h:1581
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1730
DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck)
Definition: ordinal.c:1793
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define IDM_TOOLBARS_LOCKTOOLBARS
Definition: resource.h:33
#define S_OK
Definition: intsafe.h:52
#define IDM_TOOLBARS_STANDARDBUTTONS
Definition: resource.h:30
#define LoadMenu
Definition: winuser.h:5807
#define IDM_TOOLBARS_CUSTOMIZE
Definition: resource.h:34
HRESULT ToggleBandVisibility(int BandID)
UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable)
Definition: ordinal.c:1774
#define NULL
Definition: types.h:112
int command(const char *fmt,...)
Definition: ftp.c:266
#define SendMessage
Definition: winuser.h:5833
#define HIWORD(l)
Definition: typedefs.h:247
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 1527 of file internettoolbar.cpp.

1528 {
1529  IUnknown_Exec(fSite, CGID_Explorer, 0x23, 0, NULL, NULL);
1530  return 1;
1531 }
CComPtr< IUnknown > fSite
#define NULL
Definition: types.h:112
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1080

◆ OnForwardToCommandTarget()

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

Definition at line 1533 of file internettoolbar.cpp.

1534 {
1535  HRESULT hResult;
1536 
1537  if (fCommandTarget.p != NULL)
1538  {
1539  hResult = fCommandTarget->Exec(&fCommandCategory, wID, 0, NULL, NULL);
1540  if (FAILED(hResult))
1541  {
1542  ::SendMessageW(::GetParent(m_hWnd), WM_COMMAND, wID, 0);
1543  }
1544  }
1545  return 1;
1546 }
LONG HRESULT
Definition: typedefs.h:79
CComPtr< IOleCommandTarget > fCommandTarget
#define WM_COMMAND
Definition: winuser.h:1730
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NULL
Definition: types.h:112

◆ OnLDown()

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

Definition at line 1838 of file internettoolbar.cpp.

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

◆ OnLUp()

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

Definition at line 1883 of file internettoolbar.cpp.

1884 {
1885  bHandled = FALSE;
1886  if (!fSizing)
1887  return 0;
1888 
1889  OnMouseMove(uMsg, wParam, lParam, bHandled);
1890 
1891  fSizing = FALSE;
1892 
1893  ReleaseCapture();
1894 
1895  return 0;
1896 }
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
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 1548 of file internettoolbar.cpp.

1549 {
1550  CComPtr<IBrowserService> browserService;
1551  CComPtr<IOleCommandTarget> commandTarget;
1552  CComPtr<ITravelLog> travelLog;
1553  NMTOOLBARW *notifyInfo;
1554  RECT bounds;
1555  HMENU newMenu;
1556  TPMPARAMS params;
1557  int selectedItem;
1558  VARIANT parmIn;
1559  OLECMD commandInfo;
1560  HRESULT hResult;
1561  wchar_t templateString[200];
1562 
1563  notifyInfo = (NMTOOLBARW *)pNMHDR;
1564  if (notifyInfo->hdr.hwndFrom != fToolbarWindow)
1565  {
1566  // not from the toolbar, keep looking for a message handler
1567  bHandled = FALSE;
1568  return 0;
1569  }
1570  SendMessage(fToolbarWindow, TB_GETRECT, notifyInfo->iItem, reinterpret_cast<LPARAM>(&bounds));
1571  ::MapWindowPoints(fToolbarWindow, NULL, reinterpret_cast<POINT *>(&bounds), 2);
1572  switch (notifyInfo->iItem)
1573  {
1574  case IDM_GOTO_BACK:
1575  newMenu = CreatePopupMenu();
1577  hResult = browserService->GetTravelLog(&travelLog);
1578  hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_BACK);
1579  commandInfo.cmdID = 0x1d;
1580  hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1581  if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1582  travelLog->CountEntries(browserService) > 1)
1583  {
1584  AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1585 
1586  if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1587  IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1588  StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1589 
1590  AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1591  }
1592  params.cbSize = sizeof(params);
1593  params.rcExclude = bounds;
1594  selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1595  bounds.left, bounds.bottom, m_hWnd, &params);
1596  if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1597  {
1598  V_VT(&parmIn) = VT_I4;
1599  V_I4(&parmIn) = 1;
1600  Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1601  }
1602  else if (selectedItem != 0)
1603  hResult = travelLog->Travel(browserService, -selectedItem);
1604  DestroyMenu(newMenu);
1605  break;
1606  case IDM_GOTO_FORWARD:
1607  newMenu = CreatePopupMenu();
1609  hResult = browserService->GetTravelLog(&travelLog);
1610  hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_FORE);
1611  commandInfo.cmdID = 0x1d;
1612  hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1613  if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1614  travelLog->CountEntries(browserService) > 1)
1615  {
1616  AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1617 
1618  if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1619  IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1620  StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1621 
1622  AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1623  }
1624  params.cbSize = sizeof(params);
1625  params.rcExclude = bounds;
1626  selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1627  bounds.left, bounds.bottom, m_hWnd, &params);
1628  if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1629  {
1630  V_VT(&parmIn) = VT_I4;
1631  V_I4(&parmIn) = 1;
1632  Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1633  }
1634  else if (selectedItem != 0)
1635  hResult = travelLog->Travel(browserService, selectedItem);
1636  DestroyMenu(newMenu);
1637  break;
1638  case gViewsCommandID:
1639  VARIANT inValue;
1640  CComVariant outValue;
1641  HRESULT hResult;
1642 
1643  V_VT(&inValue) = VT_INT_PTR;
1644  V_INTREF(&inValue) = reinterpret_cast<INT *>(&bounds);
1645 
1646  if (fCommandTarget.p != NULL)
1647  hResult = fCommandTarget->Exec(&fCommandCategory, FCIDM_SHVIEW_AUTOARRANGE, 1, &inValue, &outValue);
1648  // pvaOut is VT_I4 with value 0x403
1649  break;
1650  }
1651  return TBDDRET_DEFAULT;
1652 }
Definition: compat.h:2298
#define IDM_GOTO_FORWARD
Definition: resource.h:46
#define IDS_HISTORYTEXT
Definition: resource.h:129
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:816
#define TPM_LEFTALIGN
Definition: winuser.h:2367
struct IOleCommandTarget::_tagOLECMD OLECMD
#define TPM_RETURNCMD
Definition: winuser.h:2377
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:1153
#define TBDDRET_DEFAULT
Definition: commctrl.h:1424
LONG left
Definition: windef.h:306
#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:1494
#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
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
GLenum const GLfloat * params
Definition: glext.h:5645
#define TPM_TOPALIGN
Definition: winuser.h:2373
#define MF_SEPARATOR
Definition: winuser.h:137
#define V_INTREF(A)
Definition: oleauto.h:252
#define TLMENUF_BACK
Definition: shlobj.h:2594
LONG HRESULT
Definition: typedefs.h:79
CComPtr< IUnknown > fSite
#define V_VT(A)
Definition: oleauto.h:211
static const int gViewsCommandID
CComPtr< IOleCommandTarget > fCommandTarget
HWND hwndFrom
Definition: winuser.h:3147
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define IDM_EXPLORERBAR_HISTORY
Definition: resource.h:42
#define NULL
Definition: types.h:112
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
#define SendMessage
Definition: winuser.h:5833
LONG bottom
Definition: windef.h:309
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:1041
#define TLMENUF_FORE
Definition: shlobj.h:2595
#define SID_SShellBrowser
Definition: shlguid.h:128
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 1865 of file internettoolbar.cpp.

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

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

1824 {
1825  NMHDR *notifyHeader;
1826  LRESULT theResult;
1827  HRESULT hResult;
1828 
1829  notifyHeader = reinterpret_cast<NMHDR *>(lParam);
1830 
1831  hResult = OnWinEvent(notifyHeader->hwndFrom, uMsg, wParam, lParam, &theResult);
1832 
1833  bHandled = hResult == S_OK;
1834 
1835  return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1836 }
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:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
HWND hwndFrom
Definition: winuser.h:3147
#define S_OK
Definition: intsafe.h:52
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 1659 of file internettoolbar.cpp.

1660 {
1661  return 1;
1662 }

◆ OnQueryInsert()

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

Definition at line 1654 of file internettoolbar.cpp.

1655 {
1656  return 1;
1657 }

◆ OnSearch()

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

Definition at line 1521 of file internettoolbar.cpp.

1522 {
1523  IUnknown_Exec(fSite, CGID_Explorer, 0x1c, 1, NULL, NULL);
1524  return 1;
1525 }
CComPtr< IUnknown > fSite
#define NULL
Definition: types.h:112
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1080

◆ OnSetCursor()

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

Definition at line 1760 of file internettoolbar.cpp.

1761 {
1762  if ((short)lParam != HTCLIENT || (HWND)wParam != m_hWnd)
1763  {
1764  bHandled = FALSE;
1765  return 0;
1766  }
1768  return 1;
1769 }
WPARAM wParam
Definition: combotst.c:138
#define IDC_SIZENS
Definition: winuser.h:690
#define FALSE
Definition: types.h:117
#define LoadCursor
Definition: winuser.h:5802
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define NULL
Definition: types.h:112
#define HTCLIENT
Definition: winuser.h:2465
LPARAM lParam
Definition: combotst.c:139

◆ OnSize()

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

Definition at line 1750 of file internettoolbar.cpp.

1751 {
1752  if (wParam != SIZE_MINIMIZED)
1753  {
1756  }
1757  return 1;
1758 }
#define SWP_NOZORDER
Definition: winuser.h:1237
WPARAM wParam
Definition: combotst.c:138
#define SIZE_MINIMIZED
Definition: winuser.h:2496
#define NULL
Definition: types.h:112
#define HIWORD(l)
Definition: typedefs.h:247
#define SWP_NOMOVE
Definition: winuser.h:1234
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:1239

◆ OnTipText()

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

Definition at line 1771 of file internettoolbar.cpp.

1772 {
1773  CComPtr<IBrowserService> browserService;
1774  CComPtr<ITravelLog> travelLog;
1775  TOOLTIPTEXTW *pTTTW;
1776  UINT nID;
1777  HRESULT hResult;
1778  wchar_t tempString[300];
1779 
1780  pTTTW = reinterpret_cast<TOOLTIPTEXTW *>(pNMHDR);
1781  if ((pTTTW->uFlags & TTF_IDISHWND) != 0)
1782  nID = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
1783  else
1784  nID = (UINT)pNMHDR->idFrom;
1785 
1786  if (nID != 0)
1787  {
1788  if (nID == (UINT)IDM_GOTO_BACK || nID == (UINT)IDM_GOTO_FORWARD)
1789  {
1790  // TODO: Should this call QueryService?
1791  hResult = fSite->QueryInterface(IID_PPV_ARG(IBrowserService, &browserService));
1792  hResult = browserService->GetTravelLog(&travelLog);
1793  hResult = travelLog->GetToolTipText(browserService,
1794  (nID == (UINT)IDM_GOTO_BACK) ? TLOG_BACK : TLOG_FORE,
1795  0, tempString, 299);
1796  if (FAILED_UNEXPECTEDLY(hResult))
1797  {
1798  bHandled = FALSE;
1799  return 0;
1800  }
1801  }
1802  else
1803  tempString[0] = 0;
1804  wcsncpy (pTTTW->szText, tempString, sizeof(pTTTW->szText) / sizeof(wchar_t));
1805  ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0,
1807  return 0;
1808  }
1809  return 0;
1810 }
#define TLOG_BACK
Definition: shlobj.h:2589
#define IDM_GOTO_FORWARD
Definition: resource.h:46
#define HWND_TOP
Definition: winuser.h:1197
if(dx==0 &&dy==0)
Definition: linetemp.h:174
#define IID_PPV_ARG(Itype, ppType)
#define IDM_GOTO_BACK
Definition: resource.h:45
int WINAPI GetDlgCtrlID(_In_ HWND)
#define FALSE
Definition: types.h:117
UINT_PTR idFrom
Definition: winuser.h:3148
#define TTF_IDISHWND
Definition: commctrl.h:1764
#define TLOG_FORE
Definition: shlobj.h:2590
LONG HRESULT
Definition: typedefs.h:79
#define SWP_NOACTIVATE
Definition: winuser.h:1232
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
CComPtr< IUnknown > fSite
HWND hwndFrom
Definition: winuser.h:3147
#define TOOLTIPTEXTW
Definition: commctrl.h:1884
#define SWP_NOSIZE
Definition: winuser.h:1235
_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:1234
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1239

◆ OnTravelBack()

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

Definition at line 1491 of file internettoolbar.cpp.

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

◆ OnTravelForward()

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

Definition at line 1503 of file internettoolbar.cpp.

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

◆ OnUpLevel()

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

Definition at line 1515 of file internettoolbar.cpp.

1516 {
1517  IUnknown_Exec(fSite, CGID_ShellBrowser, IDM_GOTO_UPONELEVEL, 0, NULL, NULL);
1518  return 1;
1519 }
#define IDM_GOTO_UPONELEVEL
Definition: resource.h:47
CComPtr< IUnknown > fSite
#define NULL
Definition: types.h:112
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1080

◆ OnWinEvent()

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

Definition at line 1401 of file internettoolbar.cpp.

1403 {
1404  HRESULT hResult;
1405 
1406  if (fMenuBar)
1407  {
1408  hResult = IUnknown_RelayWinEvent(fMenuBar, hWnd, uMsg, wParam, lParam, theResult);
1409  if (hResult != S_FALSE)
1410  return hResult;
1411  }
1412 
1413  if (fNavigationBar)
1414  {
1415  hResult = IUnknown_RelayWinEvent(fNavigationBar, hWnd, uMsg, wParam, lParam, theResult);
1416  if (hResult != S_FALSE)
1417  return hResult;
1418  }
1419 
1420  if (fLogoBar)
1421  {
1422  hResult = IUnknown_RelayWinEvent(fLogoBar, hWnd, uMsg, wParam, lParam, theResult);
1423  if (hResult != S_FALSE)
1424  return hResult;
1425  }
1426 
1427  return S_FALSE;
1428 }
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:79
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 1898 of file internettoolbar.cpp.

1899 {
1900  HRESULT hr;
1901  HWND hwndMenu;
1902 
1903  hr = IUnknown_GetWindow(fMenuBar, &hwndMenu);
1904  if (FAILED_UNEXPECTEDLY(hr))
1905  return 0;
1906 
1907  CComPtr<IWinEventHandler> menuWinEventHandler;
1908  hr = fMenuBar->QueryInterface(IID_PPV_ARG(IWinEventHandler, &menuWinEventHandler));
1909  if (FAILED_UNEXPECTEDLY(hr))
1910  return 0;
1911 
1912  LRESULT lres;
1913  hr = menuWinEventHandler->OnWinEvent(hwndMenu, uMsg, wParam, lParam, &lres);
1914  if (FAILED_UNEXPECTEDLY(hr))
1915  return 0;
1916 
1917  return lres;
1918 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1329
WPARAM wParam
Definition: combotst.c:138
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
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 1448 of file internettoolbar.cpp.

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

◆ QueryService()

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

Implements IServiceProvider.

Definition at line 1382 of file internettoolbar.cpp.

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

Referenced by CDockSite::QueryService().

◆ QueryStatus()

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

Implements IOleCommandTarget.

Definition at line 1098 of file internettoolbar.cpp.

1100 {
1101  if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1102  {
1103  while (cCmds != 0)
1104  {
1105  switch (prgCmds->cmdID)
1106  {
1107  case ITID_TEXTLABELS: // Text Labels state
1108  prgCmds->cmdf = OLECMDF_SUPPORTED;
1109  break;
1110  case ITID_TOOLBARBANDSHOWN: // toolbar visibility
1111  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1113  prgCmds->cmdf |= OLECMDF_LATCHED;
1114  break;
1115  case ITID_ADDRESSBANDSHOWN: // address bar visibility
1116  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1118  prgCmds->cmdf |= OLECMDF_LATCHED;
1119  break;
1120  case ITID_LINKSBANDSHOWN: // links bar visibility
1121  prgCmds->cmdf = 0;
1122  break;
1123  case ITID_MENUBANDSHOWN: // Menubar band visibility
1124  prgCmds->cmdf = OLECMDF_SUPPORTED;
1125  if (fMenuBar)
1126  prgCmds->cmdf |= OLECMDF_LATCHED;
1127  break;
1128  case ITID_AUTOHIDEENABLED: // Auto hide enabled/disabled
1129  prgCmds->cmdf = 0;
1130  break;
1131  case ITID_CUSTOMIZEENABLED: // customize enabled
1132  prgCmds->cmdf = OLECMDF_SUPPORTED;
1133  break;
1134  case ITID_TOOLBARLOCKED: // lock toolbars
1135  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1136  if (fLocked)
1137  prgCmds->cmdf |= OLECMDF_LATCHED;
1138  break;
1139  default:
1140  prgCmds->cmdf = 0;
1141  break;
1142  }
1143  prgCmds++;
1144  cCmds--;
1145  }
1146  return S_OK;
1147  }
1148  return E_FAIL;
1149 }
#define ITID_LINKSBANDSHOWN
Definition: undocshell.h:673
HRESULT IsBandVisible(int BandID)
#define ITID_TEXTLABELS
Definition: undocshell.h:670
#define E_FAIL
Definition: ddrawi.h:102
#define ITID_TOOLBARLOCKED
Definition: undocshell.h:677
#define ITBBID_TOOLSBAND
Definition: undocshell.h:664
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:665
#define ITID_MENUBANDSHOWN
Definition: undocshell.h:674
#define ITID_ADDRESSBANDSHOWN
Definition: undocshell.h:672
#define S_OK
Definition: intsafe.h:52
CComPtr< IShellMenu > fMenuBar
#define ITID_AUTOHIDEENABLED
Definition: undocshell.h:675
#define ITID_TOOLBARBANDSHOWN
Definition: undocshell.h:671
#define ITID_CUSTOMIZEENABLED
Definition: undocshell.h:676
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ RemoveBand()

HRESULT STDMETHODCALLTYPE CInternetToolbar::RemoveBand ( DWORD  dwBandID)
virtual

Implements IBandSite.

Definition at line 1467 of file internettoolbar.cpp.

1468 {
1469  UNIMPLEMENTED;
1470  return E_NOTIMPL;
1471 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ReserveBorderSpace()

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

Definition at line 631 of file internettoolbar.cpp.

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

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

◆ ResizeBorderDW()

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

Implements IDockingWindow.

Definition at line 958 of file internettoolbar.cpp.

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

Referenced by ReserveBorderSpace().

◆ Save()

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

Definition at line 1011 of file internettoolbar.cpp.

1012 {
1013  return E_NOTIMPL;
1014 }
#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 1302 of file internettoolbar.cpp.

1304 {
1305  return E_NOTIMPL;
1306 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetBandSiteInfo()

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

Implements IBandSite.

Definition at line 1479 of file internettoolbar.cpp.

1480 {
1481  UNIMPLEMENTED;
1482  return E_NOTIMPL;
1483 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ SetBandState()

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

Implements IBandSite.

Definition at line 1461 of file internettoolbar.cpp.

1462 {
1463  UNIMPLEMENTED;
1464  return E_NOTIMPL;
1465 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ SetCommandTarget()

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

Definition at line 1230 of file internettoolbar.cpp.

1231 {
1232  HRESULT hResult;
1233 
1234  TRACE("SetCommandTarget %p category %s param %d\n", theTarget, wine_dbgstr_guid(category), param14);
1235 
1236  fCommandTarget.Release();
1238  if (FAILED_UNEXPECTEDLY(hResult))
1239  return hResult;
1241  return S_OK;
1242 }
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:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
CComPtr< IOleCommandTarget > fCommandTarget
#define S_OK
Definition: intsafe.h:52
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 1308 of file internettoolbar.cpp.

1310 {
1311  return E_NOTIMPL;
1312 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetSite()

HRESULT STDMETHODCALLTYPE CInternetToolbar::SetSite ( IUnknown pUnkSite)
virtual

Implements IObjectWithSite.

Definition at line 1324 of file internettoolbar.cpp.

1325 {
1326  CComPtr<IBrowserService> browserService;
1327  HWND ownerWindow;
1328  HWND dockContainer;
1329  HRESULT hResult;
1330 
1331  if (pUnkSite == NULL)
1332  {
1333  hResult = AtlUnadvise(fSite, DIID_DWebBrowserEvents, fAdviseCookie);
1335  DestroyWindow();
1336  fSite.Release();
1337  }
1338  else
1339  {
1340  // get window handle of owner
1341  hResult = IUnknown_GetWindow(pUnkSite, &ownerWindow);
1342  if (FAILED_UNEXPECTEDLY(hResult))
1343  return hResult;
1344  if (ownerWindow == NULL)
1345  return E_FAIL;
1346 
1347  // create dock container
1348  fSite = pUnkSite;
1349  dockContainer = SHCreateWorkerWindowW(0, ownerWindow, 0,
1351  if (dockContainer == NULL)
1352  return E_FAIL;
1353  SubclassWindow(dockContainer);
1354 
1355  // create rebar in dock container
1361  0, 0, 700, 60, dockContainer, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
1362  if (fMainReBar == NULL)
1363  return E_FAIL;
1364 
1365  // take advice to watch events
1366  hResult = IUnknown_QueryService(pUnkSite, SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService));
1367  hResult = AtlAdvise(browserService, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &fAdviseCookie);
1368  }
1369  return S_OK;
1370 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define RBS_VARHEIGHT
Definition: commctrl.h:1471
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:45
#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:1329
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1494
#define RBS_BANDBORDERS
Definition: commctrl.h:1472
#define REBARCLASSNAMEW
Definition: commctrl.h:1463
#define CCS_NODIVIDER
Definition: commctrl.h:2248
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define CreateWindowEx
Definition: winuser.h:5745
#define CCS_TOP
Definition: commctrl.h:2242
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2246
#define WS_EX_LEFT
Definition: winuser.h:391
#define RBS_AUTOSIZE
Definition: commctrl.h:1475
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:73
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
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:52
#define WS_BORDER
Definition: pedump.c:625
void Release()
Definition: atlcomcli.h:147
#define NULL
Definition: types.h:112
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1477
HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2918
#define SID_SShellBrowser
Definition: shlguid.h:128
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
#define RBS_REGISTERDROP
Definition: commctrl.h:1474

Referenced by CloseDW().

◆ SetState() [1/2]

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

Definition at line 746 of file internettoolbar.cpp.

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

Referenced by CommandStateChanged().

◆ SetState() [2/2]

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

Definition at line 1281 of file internettoolbar.cpp.

1282 {
1283  // map the command id
1284  ::SendMessage(fToolbarWindow, TB_SETSTATE, commandID, MAKELONG(theState, 0));
1285  return S_OK;
1286 }
#define TB_SETSTATE
Definition: commctrl.h:1054
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define S_OK
Definition: intsafe.h:52
#define SendMessage
Definition: winuser.h:5833

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CInternetToolbar::ShowDW ( BOOL  fShow)
virtual

Implements IDockingWindow.

Definition at line 881 of file internettoolbar.cpp.

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

◆ ToggleBandVisibility()

HRESULT CInternetToolbar::ToggleBandVisibility ( int  BandID)

Definition at line 1080 of file internettoolbar.cpp.

1081 {
1082  int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1083 
1086 
1087  if (bandInfo.fStyle & RBBS_HIDDEN)
1088  bandInfo.fStyle &= ~RBBS_HIDDEN;
1089  else
1090  bandInfo.fStyle |= RBBS_HIDDEN;
1091 
1093 
1094  ReserveBorderSpace(0);
1095  return S_OK;
1096 }
#define RB_GETBANDINFOW
Definition: commctrl.h:1609
#define RBBIM_STYLE
Definition: commctrl.h:1502
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:1584
#define S_OK
Definition: intsafe.h:52
#define RBBS_HIDDEN
Definition: commctrl.h:1492
#define RB_IDTOINDEX
Definition: commctrl.h:1588
#define SendMessage
Definition: winuser.h:5833
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 846 of file internettoolbar.cpp.

847 {
848  HRESULT hr = S_FALSE;
849 
850  if (fMenuBar)
852  if (hr == S_OK)
853  return hr;
854 
855  if (fControlsBar)
857  if (hr == S_OK)
858  return hr;
859 
860  if (fNavigationBar)
862  if (hr == S_OK)
863  return hr;
864 
865  return S_FALSE;
866 }
HRESULT hr
Definition: shlfolder.c:183
CComPtr< IUnknown > fControlsBar
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:79
CComPtr< IUnknown > fNavigationBar
#define S_OK
Definition: intsafe.h:52
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4150
CComPtr< IShellMenu > fMenuBar

◆ UIActivateIO()

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

Definition at line 819 of file internettoolbar.cpp.

820 {
821  return E_NOTIMPL;
822 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Unknown1()

HRESULT STDMETHODCALLTYPE CInternetToolbar::Unknown1 ( )
virtual

Definition at line 1244 of file internettoolbar.cpp.

1245 {
1246  return E_NOTIMPL;
1247 }
#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: