ReactOS 0.4.16-dev-814-g656a5dc
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 527 of file basebarsite.cpp.

528{
529 return InsertBar(punk);
530}
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 532 of file basebarsite.cpp.

533{
535
536 if (uBand == -1ul)
537 return (HRESULT)SendMessage(RB_GETBANDCOUNT, 0, 0);
538 if (pdwBandID == NULL)
539 return E_INVALIDARG;
540
542 return E_INVALIDARG;
543 *pdwBandID = bandInfo.wID;
544 return S_OK;
545}
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 REBARBANDINFO
Definition: commctrl.h:1569
#define RB_GETBANDCOUNT
Definition: commctrl.h:1585
#define SendMessage
Definition: winuser.h:5855

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 479 of file basebarsite.cpp.

481{
482 if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
483 {
484 switch (nCmdID)
485 {
486 case 0:
487 //update band info ?
488 case 1: // insert a new band
489 if (V_VT(pvaIn) != VT_UNKNOWN)
490 return E_INVALIDARG;
491 return InsertBar(V_UNKNOWN(pvaIn));
492 case 0x17:
493 // redim band
494 break;
495 }
496 }
497 return E_FAIL;
498}
#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 763 of file basebarsite.cpp.

764{
765 DWORD numBands;
766 DWORD i;
768 CBarInfo *realInfo;
769
770 numBands = EnumBands(-1, NULL);
771 for (i = 0; i < numBands; i++)
772 {
774 return E_FAIL;
775 realInfo = (CBarInfo*)bandInfo.lParam;
776 if (IsEqualGUID(pGuid, realInfo->fBarClass))
777 {
778 *pdwBandID = realInfo->fBandID;
779 return S_OK;
780 }
781 }
782 return S_FALSE;
783}
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
#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 603 of file basebarsite.cpp.

604{
606 HRESULT hr;
607 CBarInfo *pInfo;
608 DWORD index;
609
610 if (ppv == NULL)
611 return E_POINTER;
612
613 // Retrieve the right index of the coolbar knowing the id
614 index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
615 if (index == 0xffffffff)
616 return E_INVALIDARG;
617
619 return E_INVALIDARG;
620
621 pInfo = reinterpret_cast<CBarInfo*>(bandInfo.lParam);
622 hr = pInfo->fTheBar->QueryInterface(riid, ppv);
623 if (!SUCCEEDED(hr))
624 return E_NOINTERFACE;
625 return S_OK;
626}
#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
HRESULT hr
Definition: shlfolder.c:183
#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 635 of file basebarsite.cpp.

636{
637 if (pbsinfo == NULL)
638 return E_POINTER;
639 return E_NOTIMPL;
640}

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetClassID ( CLSID pClassID)
overrideprivate

Implements IPersist.

Definition at line 642 of file basebarsite.cpp.

643{
644 if (pClassID == NULL)
645 return E_POINTER;
646 // TODO: what class to return here?
647 return E_NOTIMPL;
648}

◆ GetInternalBandInfo() [1/2]

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

Definition at line 500 of file basebarsite.cpp.

501{
502 if (!pBandInfo)
503 return E_INVALIDARG;
504 memset(pBandInfo, 0, sizeof(REBARBANDINFO));
505 pBandInfo->cbSize = sizeof(REBARBANDINFO);
506 pBandInfo->fMask = RBBIM_LPARAM | RBBIM_ID;
507
508 // Grab our bandinfo from rebar control
509 if (!SendMessage(RB_GETBANDINFO, uBand, reinterpret_cast<LPARAM>(pBandInfo)))
510 return E_INVALIDARG;
511 return S_OK;
512}
#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 514 of file basebarsite.cpp.

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

◆ GetSize()

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

Definition at line 468 of file basebarsite.cpp.

469{
470 return E_NOTIMPL;
471}

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetSizeMax ( ULARGE_INTEGER pcbSize)
overrideprivate

Implements IPersistStream.

Definition at line 665 of file basebarsite.cpp.

666{
667 if (pcbSize == NULL)
668 return E_POINTER;
669 return E_NOTIMPL;
670}

◆ GetTitleFont()

HFONT CBaseBarSite::GetTitleFont ( )
private

Definition at line 750 of file basebarsite.cpp.

751{
752 NONCLIENTMETRICS mt;
753 mt.cbSize = sizeof(mt);
754 if (!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(mt), &mt, 0))
755 {
756 ERR("Can't get system parameters !\n");
757 return NULL;
758 }
759 return CreateFontIndirect(&mt.lfMenuFont);
760
761}
#define ERR(fmt,...)
Definition: precomp.h:57
#define CreateFontIndirect
Definition: wingdi.h:4444
#define SystemParametersInfo
Definition: winuser.h:5870

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:4311

◆ 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:2498
#define IID_PPV_ARG(Itype, ppType)

Referenced by AddBand(), and Exec().

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CBaseBarSite::IsDirty ( void  )
overrideprivate

Implements IPersistStream.

Definition at line 650 of file basebarsite.cpp.

651{
652 return E_NOTIMPL;
653}

◆ 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 655 of file basebarsite.cpp.

656{
657 return E_NOTIMPL;
658}

◆ OnCommand()

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

Definition at line 684 of file basebarsite.cpp.

685{
687 {
688 /* Tell the base bar to hide */
689 IUnknown_Exec(fDeskBarSite, IID_IDeskBarClient, 0, 0, NULL, NULL);
690 bHandled = TRUE;
691 }
692 return 0;
693}
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:1087
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247
#define BN_CLICKED
Definition: winuser.h:1928

◆ OnCustomDraw()

LRESULT CBaseBarSite::OnCustomDraw ( LPNMCUSTOMDRAW  pnmcd)
private

Definition at line 695 of file basebarsite.cpp.

696{
697 switch (pnmcd->dwDrawStage)
698 {
699 case CDDS_PREPAINT:
700 case CDDS_PREERASE:
701 return CDRF_NOTIFYITEMDRAW;
703 if (fVertical)
704 {
706 WCHAR wszTitle[MAX_PATH];
707 DWORD index;
708 UINT pad = GetSystemMetrics(SM_CXEDGE), leftpad = max(pad * 2, 4);
709 UINT btnw = 20, btnh = 18, btnarea = 1 + btnw + 1;
710 HFONT newFont, oldFont;
711
713 ZeroMemory(&info, sizeof(info));
714 ZeroMemory(wszTitle, sizeof(wszTitle));
715 DrawEdge(pnmcd->hdc, &pnmcd->rc, EDGE_ETCHED, BF_BOTTOM);
716 // We also resize our close button
717 ::SetWindowPos(toolbarWnd, HWND_TOP, pnmcd->rc.right - btnarea, 0, btnw, btnh, SWP_SHOWWINDOW);
718 // Draw the text
719 info.cch = MAX_PATH;
720 info.lpText = wszTitle;
721 RECT rt = pnmcd->rc;
722 rt.right -= btnarea;
723 rt.left += leftpad;
724 rt.bottom -= 1;
726 return CDRF_SKIPDEFAULT;
727 newFont = GetTitleFont();
728 if (newFont)
729 oldFont = (HFONT)SelectObject(pnmcd->hdc, newFont);
730 COLORREF orgclrtxt = SetTextColor(pnmcd->hdc, GetSysColor(COLOR_BTNTEXT));
731 DrawText(pnmcd->hdc, info.lpText, -1, &rt, DT_SINGLELINE | DT_LEFT | DT_VCENTER);
732 SetTextColor(pnmcd->hdc, orgclrtxt);
733 SelectObject(pnmcd->hdc, oldFont);
734 DeleteObject(newFont);
735 return CDRF_SKIPDEFAULT;
736 }
737 else
738 {
739 DrawEdge(pnmcd->hdc, &pnmcd->rc, EDGE_ETCHED, BF_BOTTOM);
740 // We also resize our close button
742 }
743 return CDRF_SKIPDEFAULT;
744 default:
745 break;
746 }
747 return CDRF_DODEFAULT;
748}
HFONT GetTitleFont()
#define MAX_PATH
Definition: compat.h:34
pKey DeleteObject()
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
#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 max(a, b)
Definition: svc.c:63
#define ZeroMemory
Definition: winbase.h:1737
DWORD COLORREF
Definition: windef.h:300
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_BTNTEXT
Definition: winuser.h:936
#define SM_CXEDGE
Definition: winuser.h:1011
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:5783
#define DT_LEFT
Definition: winuser.h:534
#define HWND_TOP
Definition: winuser.h:1210
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define SWP_SHOWWINDOW
Definition: winuser.h:1251
#define DT_VCENTER
Definition: winuser.h:543
int WINAPI GetSystemMetrics(_In_ int)
__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:4783

◆ OnNotify()

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

Definition at line 672 of file basebarsite.cpp.

673{
674 NMHDR *notifyHeader;
675
676 notifyHeader = reinterpret_cast<NMHDR *>(lParam);
677 if (notifyHeader->hwndFrom == m_hWnd)
678 {
679 }
680 bHandled = FALSE; /* forward notification to parent */
681 return 0;
682}
LPARAM lParam
Definition: combotst.c:139
#define FALSE
Definition: types.h:117
HWND hwndFrom
Definition: winuser.h:3160

◆ 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:3162
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 547 of file basebarsite.cpp.

549{
550 return E_NOTIMPL;
551}

◆ 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 473 of file basebarsite.cpp.

475{
476 return E_NOTIMPL;
477}

◆ RemoveBand()

HRESULT STDMETHODCALLTYPE CBaseBarSite::RemoveBand ( DWORD  dwBandID)
overrideprivate

Implements IBandSite.

Definition at line 558 of file basebarsite.cpp.

559{
561 HRESULT hr;
562 CBarInfo *pInfo;
565 DWORD index;
566
567 // Retrieve the right index of the coolbar knowing the id
568 index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
569 if (index == 0xffffffff)
570 return E_INVALIDARG;
571
573 return E_INVALIDARG;
574
575 pInfo = reinterpret_cast<CBarInfo*>(bandInfo.lParam);
576 if (!pInfo)
577 return E_INVALIDARG;
578
579 /* Windows sends a CloseDW before setting site to NULL */
580 hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IDockingWindow, &pDockWnd));
581 if (SUCCEEDED(hr))
582 pDockWnd->CloseDW(0);
583
584 hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pSite));
585 if (SUCCEEDED(hr))
586 pSite->SetSite(NULL);
587
588 // Delete the band from rebar
590 {
591 ERR("Can't delete the band\n");
592 return E_INVALIDARG;
593 }
594 if (pInfo == fCurrentActiveBar)
595 {
596 // FIXME: what to do when we are deleting active bar ? Let's assume we remove it for now
598 }
599 delete pInfo;
600 return S_OK;
601}
#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 660 of file basebarsite.cpp.

661{
662 return E_NOTIMPL;
663}

◆ SetBandSiteInfo()

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

Implements IBandSite.

Definition at line 628 of file basebarsite.cpp.

629{
630 if (pbsinfo == NULL)
631 return E_POINTER;
632 return E_NOTIMPL;
633}

◆ SetBandState()

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

Implements IBandSite.

Definition at line 553 of file basebarsite.cpp.

554{
555 return E_NOTIMPL;
556}

◆ 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 TRACE("Destroying site\n");
384 /* Cleanup our bands */
385 for (UINT i = EnumBands(-1, NULL); i;)
386 {
387 hResult = EnumBands(--i, &dwBandID);
388 if (!FAILED_UNEXPECTEDLY(hResult))
389 RemoveBand(dwBandID);
390 }
392 }
393 else
394 {
395 TBBUTTON closeBtn;
396 HBITMAP hBmp;
397
398 hResult = punkSite->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow));
399 if (FAILED_UNEXPECTEDLY(hResult))
400 return hResult;
401 hResult = punkSite->QueryInterface(IID_PPV_ARG(IUnknown, &fDeskBarSite));
402 if (FAILED_UNEXPECTEDLY(hResult))
403 return hResult;
404 hResult = oleWindow->GetWindow(&ownerWindow);
405 if (FAILED_UNEXPECTEDLY(hResult))
406 return hResult;
407
411 if (fVertical)
412 dwStyle |= CCS_VERT;
413
414 /* Create site window */
415 HWND tmp = CreateWindowW(REBARCLASSNAMEW, NULL, dwStyle, 0, 0, 0, 0, ownerWindow, NULL,
416 _AtlBaseModule.GetModuleInstance(), NULL);
417
418 /* Give window management to ATL */
419 SubclassWindow(tmp);
420
423
424 /* Create close toolbar and imagelist */
429 , 0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
430
432
433 hBmp = (HBITMAP)LoadImage(_AtlBaseModule.GetModuleInstance(),
436
437 ImageList_AddMasked(toolImageList, hBmp, RGB(192, 192, 192));
438 DeleteObject(hBmp);
439
441
442 /* Add button to toolbar */
443 closeBtn.iBitmap = MAKELONG(1, 0);
444 closeBtn.idCommand = IDM_BASEBAR_CLOSE;
445 closeBtn.fsState = TBSTATE_ENABLED;
446 closeBtn.fsStyle = BTNS_BUTTON;
447 ZeroMemory(closeBtn.bReserved, sizeof(closeBtn.bReserved));
448 closeBtn.dwData = 0;
449 closeBtn.iString = (INT_PTR)L"Close";
450
453 //SendMessage(toolbarWnd, TB_AUTOSIZE, 0, 0);
454 }
455 return S_OK;
456}
STDMETHOD() RemoveBand(DWORD dwBandID) override
HIMAGELIST toolImageList
Definition: basebarsite.cpp:68
#define IDB_BANDBUTTONS
Definition: resource.h:149
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
Definition: imagelist.c:573
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:814
#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:2254
#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:2253
#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:2251
#define CCS_NORESIZE
Definition: commctrl.h:2250
#define CCS_NOMOVEY
Definition: commctrl.h:2248
#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:1096
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4319
#define LoadImage
Definition: winuser.h:5827
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ SetModeDBC()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetModeDBC ( DWORD  dwMode)
overrideprivate

Definition at line 458 of file basebarsite.cpp.

459{
460 return E_NOTIMPL;
461}

◆ ShowBand()

HRESULT CBaseBarSite::ShowBand ( DWORD  dwBandID)
private

Definition at line 785 of file basebarsite.cpp.

786{
787 UINT index;
788 CComPtr<IDeskBand> dockingWindow;
789 HRESULT hResult;
791
792 // show our band
793 hResult = GetBandObject(dwBandID, IID_PPV_ARG(IDeskBand, &dockingWindow));
794 if (FAILED_UNEXPECTEDLY(hResult))
795 return E_FAIL;
796
797 hResult = dockingWindow->ShowDW(TRUE);
798
799 // Hide old band while adding new one
800 if (fCurrentActiveBar && fCurrentActiveBar->fBandID != dwBandID)
801 {
802 DWORD index;
804 if (index != 0xffffffff)
806 }
807 if (FAILED_UNEXPECTEDLY(hResult))
808 return hResult;
809
810 // Display the current band
811 index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
812 if (index != 0xffffffff)
815 return E_FAIL;
816 fCurrentActiveBar = (CBarInfo*)bandInfo.lParam;
817 return S_OK;
818}
STDMETHOD() GetBandObject(DWORD dwBandID, REFIID riid, void **ppv) override
#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:4279
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define DispatchMessage
Definition: winuser.h:5777

◆ UIActivateDBC()

HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateDBC ( DWORD  dwState)
overrideprivate

Definition at line 463 of file basebarsite.cpp.

464{
465 return E_NOTIMPL;
466}

◆ 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:1633

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: