ReactOS 0.4.15-dev-8109-gd7be748
CBaseBarSite Class Reference
Inheritance diagram for CBaseBarSite:
Collaboration diagram for CBaseBarSite:

Classes

class  CBarInfo
 

Public Member Functions

 CBaseBarSite ()
 
 ~CBaseBarSite ()
 
HRESULT Initialize (BOOL vert)
 
- Public Member Functions inherited from ATL::CWindowImpl< CBaseBarSite, CWindow, CControlWinTraits >
HWND Create (HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
- Public Member Functions inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
HWND UnsubclassWindow (BOOL bForce=FALSE)
 
virtual WNDPROC GetWindowProc ()
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName, DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, ATOM atom, LPVOID lpCreateParam)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< TBase >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 
- 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 IServiceProvider
HRESULT QueryService ([in] REFGUID guidService, [in] REFIID riid, [out] void **ppvObject)
 
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
HRESULT QueryStatus ([in, unique] const GUID *pguidCmdGroup, [in] ULONG cCmds, [in, out, size_is(cCmds)] OLECMD prgCmds[], [in, out, unique] OLECMDTEXT *pCmdText)
 
HRESULT Exec ([in, unique] const GUID *pguidCmdGroup, [in] DWORD nCmdID, [in] DWORD nCmdexecopt, [in, unique] VARIANT *pvaIn, [in, out, unique] VARIANT *pvaOut)
 
HRESULT AddBand ([in] IUnknown *punk)
 
HRESULT EnumBands ([in] UINT uBand, [out] DWORD *pdwBandID)
 
HRESULT QueryBand ([in] DWORD dwBandID, [out] IDeskBand **ppstb, [out] DWORD *pdwState, [out, string, size_is(cchName)] LPWSTR pszName, [in] int cchName)
 
HRESULT SetBandState ([in] DWORD dwBandID, [in] DWORD dwMask, [in] DWORD dwState)
 
HRESULT RemoveBand ([in] DWORD dwBandID)
 
HRESULT GetBandObject ([in] DWORD dwBandID, [in] REFIID riid, [out, iid_is(riid)] void **ppv)
 
HRESULT SetBandSiteInfo ([in] const BANDSITEINFO *pbsinfo)
 
HRESULT GetBandSiteInfo ([in, out] BANDSITEINFO *pbsinfo)
 
HRESULT IsDirty ()
 
HRESULT Load ([in, unique] IStream *pStm)
 
HRESULT Save ([in, unique] IStream *pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 

Private Member Functions

HRESULT InsertBar (IUnknown *newBar)
 
STDMETHOD() GetWindow (HWND *lphwnd) override
 
STDMETHOD() ContextSensitiveHelp (BOOL fEnterMode) override
 
STDMETHOD() UIActivateIO (BOOL fActivate, LPMSG lpMsg) override
 
STDMETHOD() HasFocusIO () override
 
STDMETHOD() TranslateAcceleratorIO (LPMSG lpMsg) override
 
STDMETHOD() QueryService (REFGUID guidService, REFIID riid, void **ppvObject) override
 
STDMETHOD() OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
 
STDMETHOD() IsWindowOwner (HWND hWnd) override
 
STDMETHOD() OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus) override
 
STDMETHOD() SetDeskBarSite (IUnknown *punkSite) override
 
STDMETHOD() SetModeDBC (DWORD dwMode) override
 
STDMETHOD() UIActivateDBC (DWORD dwState) override
 
STDMETHOD() GetSize (DWORD dwWhich, LPRECT prc) override
 
STDMETHOD() QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
 
STDMETHOD() Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
 
STDMETHOD() AddBand (IUnknown *punk) override
 
STDMETHOD() EnumBands (UINT uBand, DWORD *pdwBandID) override
 
STDMETHOD() QueryBand (DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) override
 
STDMETHOD() SetBandState (DWORD dwBandID, DWORD dwMask, DWORD dwState) override
 
STDMETHOD() RemoveBand (DWORD dwBandID) override
 
STDMETHOD() GetBandObject (DWORD dwBandID, REFIID riid, void **ppv) override
 
STDMETHOD() SetBandSiteInfo (const BANDSITEINFO *pbsinfo) override
 
STDMETHOD() GetBandSiteInfo (BANDSITEINFO *pbsinfo) override
 
STDMETHOD() GetClassID (CLSID *pClassID) override
 
STDMETHOD() IsDirty () override
 
STDMETHOD() Load (IStream *pStm) override
 
STDMETHOD() Save (IStream *pStm, BOOL fClearDirty) override
 
STDMETHOD() GetSizeMax (ULARGE_INTEGER *pcbSize) override
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCustomDraw (LPNMCUSTOMDRAW pnmcd)
 
HFONT GetTitleFont ()
 
HRESULT FindBandByGUID (REFIID pGuid, DWORD *pdwBandID)
 
HRESULT ShowBand (DWORD dwBandID)
 
HRESULT GetInternalBandInfo (UINT uBand, REBARBANDINFO *pBandInfo)
 
HRESULT GetInternalBandInfo (UINT uBand, REBARBANDINFO *pBandInfo, DWORD fMask)
 

Private Attributes

CBarInfofCurrentActiveBar
 
CComPtr< IUnknownfDeskBarSite
 
DWORD fNextBandID
 
HWND toolbarWnd
 
HIMAGELIST toolImageList
 
BOOL fVertical
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- 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 IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CBaseBarSite, CWindow, CControlWinTraits >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
static DWORD GetWndStyle (DWORD dwStyle)
 
static DWORD GetWndExStyle (DWORD dwExStyle)
 
static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< TBase >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 39 of file basebarsite.cpp.

Constructor & Destructor Documentation

◆ CBaseBarSite()

CBaseBarSite::CBaseBarSite ( )

Definition at line 164 of file basebarsite.cpp.

164 : fVertical(TRUE)
165{
167 fNextBandID = 1;
168}
DWORD fNextBandID
Definition: basebarsite.cpp:66
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120

◆ ~CBaseBarSite()

CBaseBarSite::~CBaseBarSite ( )

Definition at line 170 of file basebarsite.cpp.

171{
172 TRACE("CBaseBarSite deleted\n");
173}
#define TRACE(s)
Definition: solgame.cpp:4

Member Function Documentation

◆ AddBand()

HRESULT STDMETHODCALLTYPE CBaseBarSite::AddBand ( IUnknown punk)
overrideprivate

Implements IBandSite.

Definition at line 529 of file basebarsite.cpp.

530{
531 return InsertBar(punk);
532}
HRESULT InsertBar(IUnknown *newBar)

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CBaseBarSite::ContextSensitiveHelp ( BOOL  fEnterMode)
overrideprivate

Definition at line 265 of file basebarsite.cpp.

266{
267 return E_NOTIMPL;
268}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ EnumBands()

HRESULT STDMETHODCALLTYPE CBaseBarSite::EnumBands ( UINT  uBand,
DWORD pdwBandID 
)
overrideprivate

Implements IBandSite.

Definition at line 534 of file basebarsite.cpp.

535{
537
538 if (pdwBandID == NULL)
539 return E_INVALIDARG;
540 if (uBand == 0xffffffff)
541 {
542 *pdwBandID = (DWORD)SendMessage(RB_GETBANDCOUNT, 0, 0);
543 return S_OK;
544 }
546 return E_INVALIDARG;
547 *pdwBandID = bandInfo.wID;
548 return S_OK;
549}
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define DWORD
Definition: nt_native.h:44
#define REBARBANDINFO
Definition: commctrl.h:1569
#define RB_GETBANDCOUNT
Definition: commctrl.h:1585
#define SendMessage
Definition: winuser.h:5843

Referenced by FindBandByGUID(), and SetDeskBarSite().

◆ Exec()

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

Implements IOleCommandTarget.

Definition at line 481 of file basebarsite.cpp.

483{
484 if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
485 {
486 switch (nCmdID)
487 {
488 case 0:
489 //update band info ?
490 case 1: // insert a new band
491 if (V_VT(pvaIn) != VT_UNKNOWN)
492 return E_INVALIDARG;
493 return InsertBar(V_UNKNOWN(pvaIn));
494 case 0x17:
495 // redim band
496 break;
497 }
498 }
499 return E_FAIL;
500}
#define E_FAIL
Definition: ddrawi.h:102
@ VT_UNKNOWN
Definition: compat.h:2308
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ FindBandByGUID()

HRESULT CBaseBarSite::FindBandByGUID ( REFIID  pGuid,
DWORD pdwBandID 
)
private

Definition at line 769 of file basebarsite.cpp.

770{
771 DWORD numBands;
772 DWORD i;
773 HRESULT hr;
775 CBarInfo *realInfo;
776
777 hr = EnumBands(-1, &numBands);
779 return E_FAIL;
780
781 for(i = 0; i < numBands; i++)
782 {
784 return E_FAIL;
785 realInfo = (CBarInfo*)bandInfo.lParam;
786 if (IsEqualGUID(pGuid, realInfo->fBarClass))
787 {
788 *pdwBandID = realInfo->fBandID;
789 return S_OK;
790 }
791 }
792 return S_FALSE;
793}
STDMETHOD() EnumBands(UINT uBand, DWORD *pdwBandID) override
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
if(dx< 0)
Definition: linetemp.h:194
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
HRESULT hr
Definition: shlfolder.c:183
#define S_FALSE
Definition: winerror.h:2357

Referenced by InsertBar().

◆ GetBandObject()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetBandObject ( DWORD  dwBandID,
REFIID  riid,
void **  ppv 
)
overrideprivate

Implements IBandSite.

Definition at line 612 of file basebarsite.cpp.

613{
615 HRESULT hr;
616 CBarInfo *pInfo;
617 DWORD index;
618
619 if (ppv == NULL)
620 return E_POINTER;
621
622 // Retrieve the right index of the coolbar knowing the id
623 index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
624 if (index == 0xffffffff)
625 return E_INVALIDARG;
626
628 return E_INVALIDARG;
629
630 pInfo = reinterpret_cast<CBarInfo*>(bandInfo.lParam);
631 hr = pInfo->fTheBar->QueryInterface(riid, ppv);
632 if (!SUCCEEDED(hr))
633 return E_NOINTERFACE;
634 return S_OK;
635}
#define index(s, c)
Definition: various.h:29
GLuint index
Definition: glext.h:6031
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define RB_IDTOINDEX
Definition: commctrl.h:1588
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365

Referenced by ShowBand().

◆ GetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetBandSiteInfo ( BANDSITEINFO pbsinfo)
overrideprivate

Implements IBandSite.

Definition at line 644 of file basebarsite.cpp.

645{
646 if (pbsinfo == NULL)
647 return E_POINTER;
648 return E_NOTIMPL;
649}

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetClassID ( CLSID pClassID)
overrideprivate

Implements IPersist.

Definition at line 651 of file basebarsite.cpp.

652{
653 if (pClassID == NULL)
654 return E_POINTER;
655 // TODO: what class to return here?
656 return E_NOTIMPL;
657}

◆ GetInternalBandInfo() [1/2]

HRESULT CBaseBarSite::GetInternalBandInfo ( UINT  uBand,
REBARBANDINFO pBandInfo 
)
private

Definition at line 502 of file basebarsite.cpp.

503{
504 if (!pBandInfo)
505 return E_INVALIDARG;
506 memset(pBandInfo, 0, sizeof(REBARBANDINFO));
507 pBandInfo->cbSize = sizeof(REBARBANDINFO);
508 pBandInfo->fMask = RBBIM_LPARAM | RBBIM_ID;
509
510 // Grab our bandinfo from rebar control
511 if (!SendMessage(RB_GETBANDINFO, uBand, reinterpret_cast<LPARAM>(pBandInfo)))
512 return E_INVALIDARG;
513 return S_OK;
514}
#define RB_GETBANDINFO
Definition: commctrl.h:1612
#define RBBIM_ID
Definition: commctrl.h:1510
#define RBBIM_LPARAM
Definition: commctrl.h:1512
#define memset(x, y, z)
Definition: compat.h:39
LONG_PTR LPARAM
Definition: windef.h:208

Referenced by EnumBands(), FindBandByGUID(), GetBandObject(), OnCustomDraw(), RemoveBand(), and ShowBand().

◆ GetInternalBandInfo() [2/2]

HRESULT CBaseBarSite::GetInternalBandInfo ( UINT  uBand,
REBARBANDINFO pBandInfo,
DWORD  fMask 
)
private

Definition at line 516 of file basebarsite.cpp.

517{
518 if (!pBandInfo)
519 return E_INVALIDARG;
520 pBandInfo->cbSize = sizeof(REBARBANDINFO);
521 pBandInfo->fMask = fMask;
522
523 // Grab our bandinfo from rebar control
524 if (!SendMessage(RB_GETBANDINFO, uBand, reinterpret_cast<LPARAM>(pBandInfo)))
525 return E_INVALIDARG;
526 return S_OK;
527}

◆ GetSize()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetSize ( DWORD  dwWhich,
LPRECT  prc 
)
overrideprivate

Definition at line 470 of file basebarsite.cpp.

471{
472 return E_NOTIMPL;
473}

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetSizeMax ( ULARGE_INTEGER pcbSize)
overrideprivate

Implements IPersistStream.

Definition at line 674 of file basebarsite.cpp.

675{
676 if (pcbSize == NULL)
677 return E_POINTER;
678 return E_NOTIMPL;
679}

◆ GetTitleFont()

HFONT CBaseBarSite::GetTitleFont ( )
private

Definition at line 756 of file basebarsite.cpp.

757{
758 NONCLIENTMETRICS mt;
759 mt.cbSize = sizeof(mt);
760 if (!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(mt), &mt, 0))
761 {
762 ERR("Can't get system parameters !\n");
763 return NULL;
764 }
765 return CreateFontIndirect(&mt.lfMenuFont);
766
767}
#define ERR(fmt,...)
Definition: debug.h:113
#define CreateFontIndirect
Definition: wingdi.h:4444
#define SystemParametersInfo
Definition: winuser.h:5858

Referenced by OnCustomDraw().

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetWindow ( HWND lphwnd)
overrideprivate

Definition at line 257 of file basebarsite.cpp.

258{
259 if (lphwnd == NULL)
260 return E_POINTER;
261 *lphwnd = m_hWnd;
262 return S_OK;
263}
HWND m_hWnd
Definition: atlwin.h:273

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CBaseBarSite::HasFocusIO ( )
overrideprivate

Definition at line 278 of file basebarsite.cpp.

279{
281 return S_FALSE;
282
284}
CComPtr< IUnknown > fTheBar
Definition: basebarsite.cpp:58
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4295

◆ Initialize()

HRESULT CBaseBarSite::Initialize ( BOOL  vert)
inline

Definition at line 73 of file basebarsite.cpp.

73{ fVertical = vert; return S_OK; };

◆ InsertBar()

HRESULT CBaseBarSite::InsertBar ( IUnknown newBar)
private

Definition at line 175 of file basebarsite.cpp.

176{
177 CComPtr<IPersist> persist;
179 CComPtr<IOleWindow> oleWindow;
180 CComPtr<IDeskBand> deskBand;
181 CBarInfo *newInfo;
183 DESKBANDINFO deskBandInfo;
184 DWORD thisBandID;
185 HRESULT hResult;
186 CLSID tmp;
187
188 hResult = newBar->QueryInterface(IID_PPV_ARG(IPersist, &persist));
189 if (FAILED_UNEXPECTEDLY(hResult))
190 return hResult;
191 hResult = newBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &site));
192 if (FAILED_UNEXPECTEDLY(hResult))
193 return hResult;
194 hResult = newBar->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow));
195 if (FAILED_UNEXPECTEDLY(hResult))
196 return hResult;
197 hResult = newBar->QueryInterface(IID_PPV_ARG(IDeskBand, &deskBand));
198 if (FAILED_UNEXPECTEDLY(hResult))
199 return hResult;
200
201 // Check if the GUID already exists
202 hResult = persist->GetClassID(&tmp);
203 if (!SUCCEEDED(hResult))
204 {
205 return E_INVALIDARG;
206 }
207 if (FindBandByGUID(tmp, &thisBandID) == S_OK)
208 {
209 return ShowBand(thisBandID);
210 }
211
212 hResult = site->SetSite(static_cast<IOleWindow *>(this));
213 if (FAILED_UNEXPECTEDLY(hResult))
214 return hResult;
215
216 ATLTRY(newInfo = new CBarInfo);
217 if (newInfo == NULL)
218 return E_OUTOFMEMORY;
219
220 // set new bar info
221 thisBandID = fNextBandID++;
222 newInfo->fTheBar = newBar;
223 newInfo->fBandID = thisBandID;
224 newInfo->fBarClass = tmp;
225
226 // get band info
227 deskBandInfo.dwMask = DBIM_MINSIZE | DBIM_ACTUAL | DBIM_TITLE | DBIM_BKCOLOR;
228 deskBandInfo.wszTitle[0] = 0;
229 hResult = deskBand->GetBandInfo(0, (fVertical) ? DBIF_VIEWMODE_VERTICAL : DBIF_VIEWMODE_NORMAL, &deskBandInfo);
230
231 // insert band
232 memset(&bandInfo, 0, sizeof(bandInfo));
233 bandInfo.cbSize = sizeof(bandInfo);
237 bandInfo.lpText = deskBandInfo.wszTitle;
238 hResult = oleWindow->GetWindow(&bandInfo.hwndChild);
239 /* It seems Windows XP doesn't take account of band minsize */
240#if 0
241 bandInfo.cxMinChild = 200; //deskBandInfo.ptMinSize.x;
242 bandInfo.cyMinChild = 200; //deskBandInfo.ptMinSize.y;
243#endif
244 bandInfo.cx = 0;
245 bandInfo.wID = thisBandID;
246 bandInfo.cyChild = -1; //deskBandInfo.ptActual.y;
247 bandInfo.cyMaxChild = 32000;
248 bandInfo.cyIntegral = 1;
249 bandInfo.cxIdeal = 0; //deskBandInfo.ptActual.x;
250 bandInfo.lParam = reinterpret_cast<LPARAM>(newInfo);
251 SendMessage(RB_INSERTBANDW, -1, reinterpret_cast<LPARAM>(&bandInfo));
252 hResult = ShowBand(newInfo->fBandID);
253 //fCurrentActiveBar = newInfo;
254 return hResult;
255 }
#define ATLTRY(x)
Definition: atlcomcli.h:44
HRESULT FindBandByGUID(REFIID pGuid, DWORD *pdwBandID)
HRESULT ShowBand(DWORD dwBandID)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static IActiveScriptSite * site
Definition: script.c:149
#define RBBS_TOPALIGN
Definition: commctrl.h:1500
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1507
#define RB_INSERTBANDW
Definition: commctrl.h:1583
#define RBBIM_CHILD
Definition: commctrl.h:1506
#define RBBS_NOGRIPPER
Definition: commctrl.h:1497
#define RBBIM_STYLE
Definition: commctrl.h:1502
#define RBBIM_TEXT
Definition: commctrl.h:1504
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1495
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1511
WCHAR wszTitle[256]
Definition: shobjidl.idl:2426
#define IID_PPV_ARG(Itype, ppType)

Referenced by AddBand(), and Exec().

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CBaseBarSite::IsDirty ( void  )
overrideprivate

Implements IPersistStream.

Definition at line 659 of file basebarsite.cpp.

660{
661 return E_NOTIMPL;
662}

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CBaseBarSite::IsWindowOwner ( HWND  hWnd)
overrideprivate

Definition at line 363 of file basebarsite.cpp.

364{
365 return E_NOTIMPL;
366}

◆ Load()

HRESULT STDMETHODCALLTYPE CBaseBarSite::Load ( IStream pStm)
overrideprivate

Implements IPersistStream.

Definition at line 664 of file basebarsite.cpp.

665{
666 return E_NOTIMPL;
667}

◆ OnCommand()

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

Definition at line 693 of file basebarsite.cpp.

694{
696 {
697 /* Tell the base bar to hide */
698 IUnknown_Exec(fDeskBarSite, IID_IDeskBarClient, 0, 0, NULL, NULL);
699 bHandled = TRUE;
700 }
701 return 0;
702}
CComPtr< IUnknown > fDeskBarSite
Definition: basebarsite.cpp:65
WPARAM wParam
Definition: combotst.c:138
#define IDM_BASEBAR_CLOSE
Definition: resource.h:75
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1083
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247
#define BN_CLICKED
Definition: winuser.h:1925

◆ OnCustomDraw()

LRESULT CBaseBarSite::OnCustomDraw ( LPNMCUSTOMDRAW  pnmcd)
private

Definition at line 704 of file basebarsite.cpp.

705{
706 switch (pnmcd->dwDrawStage)
707 {
708 case CDDS_PREPAINT:
709 case CDDS_PREERASE:
710 return CDRF_NOTIFYITEMDRAW;
712 if (fVertical)
713 {
715 WCHAR wszTitle[MAX_PATH];
716 DWORD index;
717 RECT rt;
718 HFONT newFont, oldFont;
719
721 ZeroMemory(&info, sizeof(info));
722 ZeroMemory(wszTitle, sizeof(wszTitle));
723 DrawEdge(pnmcd->hdc, &pnmcd->rc, EDGE_ETCHED, BF_BOTTOM);
724 // We also resize our close button
725 ::SetWindowPos(toolbarWnd, HWND_TOP, pnmcd->rc.right - 22, 0, 20, 18, SWP_SHOWWINDOW);
726 // Draw the text
727 info.cch = MAX_PATH;
728 info.lpText = wszTitle;
729 rt = pnmcd->rc;
730 rt.right -= 24;
731 rt.left += 2;
732 rt.bottom -= 1;
734 return CDRF_SKIPDEFAULT;
735 newFont = GetTitleFont();
736 if (newFont)
737 oldFont = (HFONT)SelectObject(pnmcd->hdc, newFont);
738 DrawText(pnmcd->hdc, info.lpText, -1, &rt, DT_SINGLELINE | DT_LEFT | DT_VCENTER);
739 SelectObject(pnmcd->hdc, oldFont);
740 DeleteObject(newFont);
741 return CDRF_SKIPDEFAULT;
742 }
743 else
744 {
745 DrawEdge(pnmcd->hdc, &pnmcd->rc, EDGE_ETCHED, BF_BOTTOM);
746 // We also resize our close button
748 }
749 return CDRF_SKIPDEFAULT;
750 default:
751 break;
752 }
753 return CDRF_DODEFAULT;
754}
HFONT GetTitleFont()
#define MAX_PATH
Definition: compat.h:34
pKey DeleteObject()
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:285
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:275
#define CDRF_DODEFAULT
Definition: commctrl.h:268
#define CDDS_PREPAINT
Definition: commctrl.h:280
#define CDRF_SKIPDEFAULT
Definition: commctrl.h:270
#define CDDS_PREERASE
Definition: commctrl.h:282
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG left
Definition: windef.h:306
#define ZeroMemory
Definition: winbase.h:1712
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define DT_SINGLELINE
Definition: winuser.h:540
#define EDGE_ETCHED
Definition: winuser.h:452
#define BF_BOTTOM
Definition: winuser.h:457
#define DrawText
Definition: winuser.h:5771
#define DT_LEFT
Definition: winuser.h:534
#define HWND_TOP
Definition: winuser.h:1207
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define SWP_SHOWWINDOW
Definition: winuser.h:1248
#define DT_VCENTER
Definition: winuser.h:543
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by OnWinEvent().

◆ OnFocusChangeIS()

HRESULT STDMETHODCALLTYPE CBaseBarSite::OnFocusChangeIS ( IUnknown punkObj,
BOOL  fSetFocus 
)
overrideprivate

Definition at line 368 of file basebarsite.cpp.

369{
370 // FIXME: should we directly pass-through, or advertise ourselves as focus owner ?
371 return IUnknown_OnFocusChangeIS(fDeskBarSite, punkObj, fSetFocus);
372}
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4767

◆ OnNotify()

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

Definition at line 681 of file basebarsite.cpp.

682{
683 NMHDR *notifyHeader;
684
685 notifyHeader = reinterpret_cast<NMHDR *>(lParam);
686 if (notifyHeader->hwndFrom == m_hWnd)
687 {
688 }
689 bHandled = FALSE; /* forward notification to parent */
690 return 0;
691}
LPARAM lParam
Definition: combotst.c:139
#define FALSE
Definition: types.h:117
HWND hwndFrom
Definition: winuser.h:3157

◆ OnWinEvent()

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

Definition at line 317 of file basebarsite.cpp.

319{
320 CComPtr<IDeskBar> deskBar;
321 CComPtr<IWinEventHandler> winEventHandler;
322 NMHDR *notifyHeader;
323 // RECT newBounds;
324 HRESULT hResult;
326
327 hResult = S_OK;
328 if (uMsg == WM_NOTIFY)
329 {
330 notifyHeader = (NMHDR *)lParam;
331 if (notifyHeader->hwndFrom == m_hWnd)
332 {
333 switch (notifyHeader->code)
334 {
335 case RBN_AUTOSIZE:
336 // For now, don't notify basebar we tried to resize ourselves, we don't
337 // get correct values at the moment.
338#if 0
339 hResult = fDeskBarSite->QueryInterface(IID_PPV_ARG(IDeskBar, &deskBar));
340 GetClientRect(&newBounds);
341 hResult = deskBar->OnPosRectChangeDB(&newBounds);
342
343#endif
344 break;
345 case NM_CUSTOMDRAW:
347 if (theResult)
348 *theResult = result;
349 return S_OK;
350 }
351 }
352 }
353 if (fCurrentActiveBar != NULL)
354 {
355 hResult = fCurrentActiveBar->fTheBar->QueryInterface(
356 IID_PPV_ARG(IWinEventHandler, &winEventHandler));
357 if (SUCCEEDED(hResult) && winEventHandler.p != NULL)
358 hResult = winEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
359 }
360 return hResult;
361}
HWND hWnd
Definition: settings.c:17
LRESULT OnCustomDraw(LPNMCUSTOMDRAW pnmcd)
GLuint64EXT * result
Definition: glext.h:11304
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define RBN_AUTOSIZE
Definition: commctrl.h:1631
#define WM_NOTIFY
Definition: richedit.h:61
UINT code
Definition: winuser.h:3159
LONG_PTR LRESULT
Definition: windef.h:209
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ QueryBand()

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

Implements IBandSite.

Definition at line 551 of file basebarsite.cpp.

553{
554 return E_NOTIMPL;
555}

◆ QueryService()

HRESULT STDMETHODCALLTYPE CBaseBarSite::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
overrideprivate

Implements IServiceProvider.

Definition at line 301 of file basebarsite.cpp.

302{
303 CComPtr<IServiceProvider> serviceProvider;
304 HRESULT hResult;
305
306 if (fDeskBarSite == NULL)
307 return E_FAIL;
308 hResult = fDeskBarSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider));
309 if (FAILED_UNEXPECTEDLY(hResult))
310 return hResult;
311 // called for SID_STopLevelBrowser, IID_IBrowserService to find top level browser
312 // called for SID_IWebBrowserApp, IID_IConnectionPointContainer
313 // connection point called for DIID_DWebBrowserEvents2 to establish connection
314 return serviceProvider->QueryService(guidService, riid, ppvObject);
315}
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

◆ QueryStatus()

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

Implements IOleCommandTarget.

Definition at line 475 of file basebarsite.cpp.

477{
478 return E_NOTIMPL;
479}

◆ RemoveBand()

HRESULT STDMETHODCALLTYPE CBaseBarSite::RemoveBand ( DWORD  dwBandID)
overrideprivate

Implements IBandSite.

Definition at line 562 of file basebarsite.cpp.

563{
565 HRESULT hr;
566 CBarInfo *pInfo;
568 CComPtr<IDeskBand> pDockWnd;
569 DWORD index;
570
571 // Retrieve the right index of the coolbar knowing the id
572 index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
573 if (index == 0xffffffff)
574 return E_INVALIDARG;
575
577 return E_INVALIDARG;
578
579 pInfo = reinterpret_cast<CBarInfo*>(bandInfo.lParam);
580 if (!pInfo)
581 return E_INVALIDARG;
582
583 hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IDeskBand, &pDockWnd));
585 {
586 return E_NOINTERFACE;
587 }
588 hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pSite));
590 {
591 return E_NOINTERFACE;
592 }
593 /* Windows sends a CloseDW before setting site to NULL */
594 pDockWnd->CloseDW(0);
595 pSite->SetSite(NULL);
596
597 // Delete the band from rebar
599 {
600 ERR("Can't delete the band\n");
601 return E_INVALIDARG;
602 }
603 if (pInfo == fCurrentActiveBar)
604 {
605 // FIXME: what to do when we are deleting active bar ? Let's assume we remove it for now
607 }
608 delete pInfo;
609 return S_OK;
610}
#define RB_DELETEBAND
Definition: commctrl.h:1576

Referenced by SetDeskBarSite().

◆ Save()

HRESULT STDMETHODCALLTYPE CBaseBarSite::Save ( IStream pStm,
BOOL  fClearDirty 
)
overrideprivate

Implements IPersistStream.

Definition at line 669 of file basebarsite.cpp.

670{
671 return E_NOTIMPL;
672}

◆ SetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetBandSiteInfo ( const BANDSITEINFO pbsinfo)
overrideprivate

Implements IBandSite.

Definition at line 637 of file basebarsite.cpp.

638{
639 if (pbsinfo == NULL)
640 return E_POINTER;
641 return E_NOTIMPL;
642}

◆ SetBandState()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetBandState ( DWORD  dwBandID,
DWORD  dwMask,
DWORD  dwState 
)
overrideprivate

Implements IBandSite.

Definition at line 557 of file basebarsite.cpp.

558{
559 return E_NOTIMPL;
560}

◆ SetDeskBarSite()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetDeskBarSite ( IUnknown punkSite)
overrideprivate

Definition at line 374 of file basebarsite.cpp.

375{
376 CComPtr<IOleWindow> oleWindow;
377 HWND ownerWindow;
378 HRESULT hResult;
379 DWORD dwBandID;
380
381 if (punkSite == NULL)
382 {
383
384 TRACE("Destroying site \n");
385 /* Cleanup our bands */
386 while(SUCCEEDED(EnumBands(-1, &dwBandID)) && dwBandID)
387 {
388 hResult = EnumBands(0, &dwBandID);
389 if(FAILED_UNEXPECTEDLY(hResult))
390 continue;
391 RemoveBand(dwBandID);
392 }
394 }
395 else
396 {
397 TBBUTTON closeBtn;
398 HBITMAP hBmp;
399
400 hResult = punkSite->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow));
401 if (FAILED_UNEXPECTEDLY(hResult))
402 return hResult;
403 hResult = punkSite->QueryInterface(IID_PPV_ARG(IUnknown, &fDeskBarSite));
404 if (FAILED_UNEXPECTEDLY(hResult))
405 return hResult;
406 hResult = oleWindow->GetWindow(&ownerWindow);
407 if (FAILED_UNEXPECTEDLY(hResult))
408 return hResult;
409
413 if (fVertical)
414 dwStyle |= CCS_VERT;
415
416 /* Create site window */
417 HWND tmp = CreateWindowW(REBARCLASSNAMEW, NULL, dwStyle, 0, 0, 0, 0, ownerWindow, NULL,
418 _AtlBaseModule.GetModuleInstance(), NULL);
419
420 /* Give window management to ATL */
421 SubclassWindow(tmp);
422
425
426 /* Create close toolbar and imagelist */
431 , 0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
432
434
435 hBmp = (HBITMAP)LoadImage(_AtlBaseModule.GetModuleInstance(),
438
439 ImageList_AddMasked(toolImageList, hBmp, RGB(192, 192, 192));
440 DeleteObject(hBmp);
441
443
444 /* Add button to toolbar */
445 closeBtn.iBitmap = MAKELONG(1, 0);
446 closeBtn.idCommand = IDM_BASEBAR_CLOSE;
447 closeBtn.fsState = TBSTATE_ENABLED;
448 closeBtn.fsStyle = BTNS_BUTTON;
449 ZeroMemory(closeBtn.bReserved, sizeof(closeBtn.bReserved));
450 closeBtn.dwData = 0;
451 closeBtn.iString = (INT_PTR)L"Close";
452
455 //SendMessage(toolbarWnd, TB_AUTOSIZE, 0, 0);
456 }
457 return S_OK;
458}
STDMETHOD() RemoveBand(DWORD dwBandID) override
HIMAGELIST toolImageList
Definition: basebarsite.cpp:68
#define IDB_BANDBUTTONS
Definition: resource.h:150
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
Definition: imagelist.c:563
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define RGB(r, g, b)
Definition: precomp.h:71
static HBITMAP
Definition: button.c:44
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define WS_BORDER
Definition: pedump.c:625
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define TB_INSERTBUTTON
Definition: commctrl.h:1270
#define RB_SETTEXTCOLOR
Definition: commctrl.h:1593
#define BTNS_BUTTON
Definition: commctrl.h:998
#define RBS_REGISTERDROP
Definition: commctrl.h:1474
#define REBARCLASSNAMEW
Definition: commctrl.h:1463
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:989
#define RBS_AUTOSIZE
Definition: commctrl.h:1475
#define CCS_VERT
Definition: commctrl.h:2249
#define TB_SETIMAGELIST
Definition: commctrl.h:1150
#define RB_SETBKCOLOR
Definition: commctrl.h:1591
#define TBSTYLE_TRANSPARENT
Definition: commctrl.h:996
#define CCS_NODIVIDER
Definition: commctrl.h:2248
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define CLR_DEFAULT
Definition: commctrl.h:320
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define TBSTYLE_FLAT
Definition: commctrl.h:992
#define RBS_VARHEIGHT
Definition: commctrl.h:1471
#define ILC_MASK
Definition: commctrl.h:351
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2246
#define CCS_NORESIZE
Definition: commctrl.h:2245
#define CCS_NOMOVEY
Definition: commctrl.h:2243
#define ILC_COLOR24
Definition: commctrl.h:357
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1162
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1477
#define RBS_VERTICALGRIPPER
Definition: commctrl.h:1476
BYTE fsState
Definition: commctrl.h:951
INT_PTR iString
Definition: commctrl.h:959
int idCommand
Definition: commctrl.h:950
DWORD_PTR dwData
Definition: commctrl.h:958
int iBitmap
Definition: commctrl.h:949
BYTE fsStyle
Definition: commctrl.h:952
BYTE bReserved[2]
Definition: commctrl.h:956
int32_t INT_PTR
Definition: typedefs.h:64
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define IMAGE_BITMAP
Definition: winuser.h:211
#define LR_LOADTRANSPARENT
Definition: winuser.h:1093
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
#define LoadImage
Definition: winuser.h:5815
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ SetModeDBC()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetModeDBC ( DWORD  dwMode)
overrideprivate

Definition at line 460 of file basebarsite.cpp.

461{
462 return E_NOTIMPL;
463}

◆ ShowBand()

HRESULT CBaseBarSite::ShowBand ( DWORD  dwBandID)
private

Definition at line 795 of file basebarsite.cpp.

796{
797 UINT index;
798 CComPtr<IDeskBand> dockingWindow;
799 HRESULT hResult;
801
802 // show our band
803 hResult = GetBandObject(dwBandID, IID_PPV_ARG(IDeskBand, &dockingWindow));
804 if (FAILED_UNEXPECTEDLY(hResult))
805 return E_FAIL;
806
807 hResult = dockingWindow->ShowDW(TRUE);
808
809 // Hide old band while adding new one
810 if (fCurrentActiveBar && fCurrentActiveBar->fBandID != dwBandID)
811 {
812 DWORD index;
814 if (index != 0xffffffff)
816 }
817 if (FAILED_UNEXPECTEDLY(hResult))
818 return hResult;
819
820 // Display the current band
821 index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
822 if (index != 0xffffffff)
825 return E_FAIL;
826 fCurrentActiveBar = (CBarInfo*)bandInfo.lParam;
827 return S_OK;
828}
STDMETHOD() GetBandObject(DWORD dwBandID, REFIID riid, void **ppv) override
unsigned int UINT
Definition: ndis.h:50
#define RB_SHOWBAND
Definition: commctrl.h:1618

Referenced by InsertBar().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CBaseBarSite::TranslateAcceleratorIO ( LPMSG  lpMsg)
overrideprivate

Definition at line 286 of file basebarsite.cpp.

287{
289 {
290 if (lpMsg)
291 {
292 TranslateMessage(lpMsg);
293 DispatchMessage(lpMsg);
294 }
295 return S_OK;
296 }
297
299}
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4263
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define DispatchMessage
Definition: winuser.h:5765

◆ UIActivateDBC()

HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateDBC ( DWORD  dwState)
overrideprivate

Definition at line 465 of file basebarsite.cpp.

466{
467 return E_NOTIMPL;
468}

◆ UIActivateIO()

HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateIO ( BOOL  fActivate,
LPMSG  lpMsg 
)
overrideprivate

Definition at line 270 of file basebarsite.cpp.

271{
273 return S_OK;
274
275 return IUnknown_UIActivateIO(fCurrentActiveBar->fTheBar, fActivate, lpMsg);
276}
HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg)
Definition: ordinal.c:1629

Member Data Documentation

◆ fCurrentActiveBar

CBarInfo* CBaseBarSite::fCurrentActiveBar
private

◆ fDeskBarSite

CComPtr<IUnknown> CBaseBarSite::fDeskBarSite
private

Definition at line 65 of file basebarsite.cpp.

Referenced by OnCommand(), OnFocusChangeIS(), OnWinEvent(), QueryService(), and SetDeskBarSite().

◆ fNextBandID

DWORD CBaseBarSite::fNextBandID
private

Definition at line 66 of file basebarsite.cpp.

Referenced by CBaseBarSite(), and InsertBar().

◆ fVertical

BOOL CBaseBarSite::fVertical
private

Definition at line 69 of file basebarsite.cpp.

Referenced by Initialize(), InsertBar(), OnCustomDraw(), and SetDeskBarSite().

◆ toolbarWnd

HWND CBaseBarSite::toolbarWnd
private

Definition at line 67 of file basebarsite.cpp.

Referenced by OnCustomDraw(), and SetDeskBarSite().

◆ toolImageList

HIMAGELIST CBaseBarSite::toolImageList
private

Definition at line 68 of file basebarsite.cpp.

Referenced by SetDeskBarSite().


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