ReactOS  0.4.14-dev-98-gb0d4763
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< CWindow, CControlWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
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< CWindow >
 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 (int nID)
 
UINT GetDlgItemInt (int nID, BOOL *lpTrans=NULL, BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (int nID, LPTSTR lpStr, int nMaxCount) const
 
BOOL GetDlgItemText (int nID, 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 (LPTSTR lpszStringBuf, int nMaxCount) const
 
BOOL GetWindowText (BSTR &bstrText)
 
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 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 ()
 

Private Member Functions

HRESULT InsertBar (IUnknown *newBar)
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE UIActivateIO (BOOL fActivate, LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE HasFocusIO ()
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO (LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
virtual HRESULT STDMETHODCALLTYPE OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
 
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner (HWND hWnd)
 
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus)
 
virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite (IUnknown *punkSite)
 
virtual HRESULT STDMETHODCALLTYPE SetModeDBC (DWORD dwMode)
 
virtual HRESULT STDMETHODCALLTYPE UIActivateDBC (DWORD dwState)
 
virtual HRESULT STDMETHODCALLTYPE GetSize (DWORD dwWhich, LPRECT prc)
 
virtual HRESULT STDMETHODCALLTYPE QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
virtual HRESULT STDMETHODCALLTYPE Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
virtual HRESULT STDMETHODCALLTYPE AddBand (IUnknown *punk)
 
virtual HRESULT STDMETHODCALLTYPE EnumBands (UINT uBand, DWORD *pdwBandID)
 
virtual HRESULT STDMETHODCALLTYPE QueryBand (DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName)
 
virtual HRESULT STDMETHODCALLTYPE SetBandState (DWORD dwBandID, DWORD dwMask, DWORD dwState)
 
virtual HRESULT STDMETHODCALLTYPE RemoveBand (DWORD dwBandID)
 
virtual HRESULT STDMETHODCALLTYPE GetBandObject (DWORD dwBandID, REFIID riid, void **ppv)
 
virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo (const BANDSITEINFO *pbsinfo)
 
virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo (BANDSITEINFO *pbsinfo)
 
virtual HRESULT STDMETHODCALLTYPE GetClassID (CLSID *pClassID)
 
virtual HRESULT STDMETHODCALLTYPE IsDirty ()
 
virtual HRESULT STDMETHODCALLTYPE Load (IStream *pStm)
 
virtual HRESULT STDMETHODCALLTYPE Save (IStream *pStm, BOOL fClearDirty)
 
virtual HRESULT STDMETHODCALLTYPE GetSizeMax (ULARGE_INTEGER *pcbSize)
 
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< CWindow >
enum  
 
- 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< CWindow, CControlWinTraits >
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< CWindow, CControlWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< CWindow >
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 }
#define TRUE
Definition: types.h:120
DWORD fNextBandID
Definition: basebarsite.cpp:66
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
smooth NULL
Definition: ftsmooth.c:416

◆ ~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)
privatevirtual

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)
privatevirtual

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 
)
privatevirtual

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  }
545  if (!SUCCEEDED(GetInternalBandInfo(uBand, &bandInfo)))
546  return E_INVALIDARG;
547  *pdwBandID = bandInfo.wID;
548  return S_OK;
549 }
#define DWORD
Definition: nt_native.h:44
#define RB_GETBANDCOUNT
Definition: commctrl.h:1557
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define REBARBANDINFO
Definition: commctrl.h:1541
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define S_OK
Definition: intsafe.h:59
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by FindBandByGUID(), and SetDeskBarSite().

◆ Exec()

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

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
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT InsertBar(IUnknown *newBar)
#define V_VT(A)
Definition: oleauto.h:211
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ FindBandByGUID()

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

Definition at line 768 of file basebarsite.cpp.

769 {
770  DWORD numBands;
771  DWORD i;
772  HRESULT hr;
774  CBarInfo *realInfo;
775 
776  hr = EnumBands(-1, &numBands);
777  if (FAILED_UNEXPECTEDLY(hr))
778  return E_FAIL;
779 
780  for(i = 0; i < numBands; i++)
781  {
783  return E_FAIL;
784  realInfo = (CBarInfo*)bandInfo.lParam;
785  if (IsEqualGUID(pGuid, realInfo->fBarClass))
786  {
787  *pdwBandID = realInfo->fBandID;
788  return S_OK;
789  }
790  }
791  return S_FALSE;
792 }
HRESULT hr
Definition: shlfolder.c:183
virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID)
#define E_FAIL
Definition: ddrawi.h:102
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
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define S_FALSE
Definition: winerror.h:2357
#define REBARBANDINFO
Definition: commctrl.h:1541
if(!(yy_init))
Definition: macro.lex.yy.c:714
LONG HRESULT
Definition: typedefs.h:77
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

Referenced by InsertBar().

◆ GetBandObject()

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

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 E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define REBARBANDINFO
Definition: commctrl.h:1541
LONG HRESULT
Definition: typedefs.h:77
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
#define index(s, c)
Definition: various.h:29
#define S_OK
Definition: intsafe.h:59
#define RB_IDTOINDEX
Definition: commctrl.h:1560
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by ShowBand().

◆ GetBandSiteInfo()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetBandSiteInfo ( BANDSITEINFO pbsinfo)
privatevirtual

Implements IBandSite.

Definition at line 644 of file basebarsite.cpp.

645 {
646  if (pbsinfo == NULL)
647  return E_POINTER;
648  return E_NOTIMPL;
649 }
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetClassID ( CLSID pClassID)
privatevirtual

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 }
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ 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:1584
#define RBBIM_ID
Definition: commctrl.h:1482
#define RBBIM_LPARAM
Definition: commctrl.h:1484
#define E_INVALIDARG
Definition: ddrawi.h:101
#define REBARBANDINFO
Definition: commctrl.h:1541
#define S_OK
Definition: intsafe.h:59
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define memset(x, y, z)
Definition: compat.h:39

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 }
#define RB_GETBANDINFO
Definition: commctrl.h:1584
#define E_INVALIDARG
Definition: ddrawi.h:101
#define REBARBANDINFO
Definition: commctrl.h:1541
#define S_OK
Definition: intsafe.h:59
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048

◆ GetSize()

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

Definition at line 470 of file basebarsite.cpp.

471 {
472  return E_NOTIMPL;
473 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetSizeMax ( ULARGE_INTEGER pcbSize)
privatevirtual

Implements IPersistStream.

Definition at line 674 of file basebarsite.cpp.

675 {
676  if (pcbSize == NULL)
677  return E_POINTER;
678  return E_NOTIMPL;
679 }
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ GetTitleFont()

HFONT CBaseBarSite::GetTitleFont ( )
private

Definition at line 755 of file basebarsite.cpp.

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

Referenced by OnCustomDraw().

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CBaseBarSite::GetWindow ( HWND lphwnd)
privatevirtual

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 }
smooth NULL
Definition: ftsmooth.c:416
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CBaseBarSite::HasFocusIO ( )
privatevirtual

Definition at line 278 of file basebarsite.cpp.

279 {
280  if (!fCurrentActiveBar)
281  return S_FALSE;
282 
284 }
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define S_FALSE
Definition: winerror.h:2357
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4136
CComPtr< IUnknown > fTheBar
Definition: basebarsite.cpp:58

◆ Initialize()

HRESULT CBaseBarSite::Initialize ( BOOL  vert)
inline

Definition at line 73 of file basebarsite.cpp.

73 { fVertical = vert; return S_OK; };
#define S_OK
Definition: intsafe.h:59

◆ 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  }
DBIM_BKCOLOR struct tagDESKBANDINFO DESKBANDINFO
#define ATLTRY(x)
Definition: atlcomcli.h:44
#define RBBIM_CHILD
Definition: commctrl.h:1478
HRESULT FindBandByGUID(REFIID pGuid, DWORD *pdwBandID)
static IActiveScriptSite * site
Definition: script.c:149
DWORD fNextBandID
Definition: basebarsite.cpp:66
#define RBBIM_ID
Definition: commctrl.h:1482
#define RBBS_TOPALIGN
Definition: commctrl.h:1472
#define IID_PPV_ARG(Itype, ppType)
#define RBBIM_LPARAM
Definition: commctrl.h:1484
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
HRESULT ShowBand(DWORD dwBandID)
#define RB_INSERTBANDW
Definition: commctrl.h:1555
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1467
#define RBBIM_TEXT
Definition: commctrl.h:1476
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
#define S_OK
Definition: intsafe.h:59
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define RBBS_NOGRIPPER
Definition: commctrl.h:1469
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define memset(x, y, z)
Definition: compat.h:39
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by AddBand(), and Exec().

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CBaseBarSite::IsDirty ( void  )
privatevirtual

Implements IPersistStream.

Definition at line 659 of file basebarsite.cpp.

660 {
661  return E_NOTIMPL;
662 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CBaseBarSite::IsWindowOwner ( HWND  hWnd)
privatevirtual

Definition at line 363 of file basebarsite.cpp.

364 {
365  return E_NOTIMPL;
366 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Load()

HRESULT STDMETHODCALLTYPE CBaseBarSite::Load ( IStream pStm)
privatevirtual

Implements IPersistStream.

Definition at line 664 of file basebarsite.cpp.

665 {
666  return E_NOTIMPL;
667 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define TRUE
Definition: types.h:120
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define BN_CLICKED
Definition: winuser.h:1907
CComPtr< IUnknown > fDeskBarSite
Definition: basebarsite.cpp:65
#define IDM_BASEBAR_CLOSE
Definition: resource.h:75
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1034

◆ 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;
711  case CDDS_ITEMPREPAINT:
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;
733  return CDRF_SKIPDEFAULT;
734  newFont = GetTitleFont();
735  if (newFont)
736  oldFont = (HFONT)SelectObject(pnmcd->hdc, newFont);
737  DrawText(pnmcd->hdc, info.lpText, -1, &rt, DT_SINGLELINE | DT_LEFT);
738  SelectObject(pnmcd->hdc, oldFont);
739  DeleteObject(newFont);
740  return CDRF_SKIPDEFAULT;
741  }
742  else
743  {
744  DrawEdge(pnmcd->hdc, &pnmcd->rc, EDGE_ETCHED, BF_BOTTOM);
745  // We also resize our close button
747  }
748  return CDRF_SKIPDEFAULT;
749  default:
750  break;
751  }
752  return CDRF_DODEFAULT;
753 }
HFONT GetTitleFont()
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define BF_BOTTOM
Definition: winuser.h:457
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
Definition: atlwin.h:1220
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:270
#define ZeroMemory
Definition: winbase.h:1642
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define HWND_TOP
Definition: winuser.h:1193
LONG left
Definition: windef.h:291
#define CDRF_SKIPDEFAULT
Definition: commctrl.h:255
LONG right
Definition: windef.h:293
#define DrawText
Definition: winuser.h:5672
struct _test_info info[]
Definition: SetCursorPos.c:19
#define DT_LEFT
Definition: winuser.h:534
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:260
GLuint index
Definition: glext.h:6031
#define REBARBANDINFO
Definition: commctrl.h:1541
#define RBBIM_TEXT
Definition: commctrl.h:1476
__wchar_t WCHAR
Definition: xmlstorage.h:180
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CDRF_DODEFAULT
Definition: commctrl.h:253
#define EDGE_ETCHED
Definition: winuser.h:452
#define CDDS_PREPAINT
Definition: commctrl.h:265
#define index(s, c)
Definition: various.h:29
#define DT_SINGLELINE
Definition: winuser.h:540
#define RB_IDTOINDEX
Definition: commctrl.h:1560
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define CDDS_PREERASE
Definition: commctrl.h:267

Referenced by OnWinEvent().

◆ OnFocusChangeIS()

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

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:4594
CComPtr< IUnknown > fDeskBarSite
Definition: basebarsite.cpp:65

◆ 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 }
HWND m_hWnd
Definition: atlwin.h:268
HWND hwndFrom
Definition: winuser.h:3131
LPARAM lParam
Definition: combotst.c:139

◆ OnWinEvent()

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

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;
325  LRESULT result;
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 }
#define RBN_AUTOSIZE
Definition: commctrl.h:1603
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
HWND hWnd
Definition: settings.c:17
#define IID_PPV_ARG(Itype, ppType)
WPARAM wParam
Definition: combotst.c:138
UINT code
Definition: winuser.h:3133
LRESULT OnCustomDraw(LPNMCUSTOMDRAW pnmcd)
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:507
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
CComPtr< IUnknown > fDeskBarSite
Definition: basebarsite.cpp:65
HWND m_hWnd
Definition: atlwin.h:268
HWND hwndFrom
Definition: winuser.h:3131
#define S_OK
Definition: intsafe.h:59
CComPtr< IUnknown > fTheBar
Definition: basebarsite.cpp:58
LONG_PTR LRESULT
Definition: windef.h:209
GLuint64EXT * result
Definition: glext.h:11304
LPARAM lParam
Definition: combotst.c:139
#define WM_NOTIFY
Definition: richedit.h:61
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ QueryBand()

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

Implements IBandSite.

Definition at line 551 of file basebarsite.cpp.

553 {
554  return E_NOTIMPL;
555 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ QueryService()

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

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 }
REFIID riid
Definition: precomp.h:44
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< IUnknown > fDeskBarSite
Definition: basebarsite.cpp:65
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ QueryStatus()

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

Implements IOleCommandTarget.

Definition at line 475 of file basebarsite.cpp.

477 {
478  return E_NOTIMPL;
479 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ RemoveBand()

HRESULT STDMETHODCALLTYPE CBaseBarSite::RemoveBand ( DWORD  dwBandID)
privatevirtual

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));
584  if (FAILED_UNEXPECTEDLY(hr))
585  {
586  return E_NOINTERFACE;
587  }
588  hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pSite));
589  if (FAILED_UNEXPECTEDLY(hr))
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
598  if (!SendMessage(RB_DELETEBAND, index, 0))
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 E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define IID_PPV_ARG(Itype, ppType)
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define REBARBANDINFO
Definition: commctrl.h:1541
LONG HRESULT
Definition: typedefs.h:77
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
#define index(s, c)
Definition: various.h:29
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
#define RB_IDTOINDEX
Definition: commctrl.h:1560
#define RB_DELETEBAND
Definition: commctrl.h:1548
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048

Referenced by SetDeskBarSite().

◆ Save()

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

Implements IPersistStream.

Definition at line 669 of file basebarsite.cpp.

670 {
671  return E_NOTIMPL;
672 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetBandSiteInfo()

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

Implements IBandSite.

Definition at line 637 of file basebarsite.cpp.

638 {
639  if (pbsinfo == NULL)
640  return E_POINTER;
641  return E_NOTIMPL;
642 }
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ SetBandState()

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

Implements IBandSite.

Definition at line 557 of file basebarsite.cpp.

558 {
559  return E_NOTIMPL;
560 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetDeskBarSite()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetDeskBarSite ( IUnknown punkSite)
privatevirtual

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  }
393  fDeskBarSite = NULL;
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 
453  SendMessage(toolbarWnd, TB_INSERTBUTTON, 0, (LPARAM)&closeBtn);
455  //SendMessage(toolbarWnd, TB_AUTOSIZE, 0, 0);
456  }
457  return S_OK;
458 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define IDB_BANDBUTTONS
Definition: resource.h:146
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
#define TBSTYLE_TRANSPARENT
Definition: commctrl.h:968
virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID)
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
#define ZeroMemory
Definition: winbase.h:1642
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define WS_CHILD
Definition: pedump.c:617
int32_t INT_PTR
Definition: typedefs.h:62
#define TB_INSERTBUTTON
Definition: commctrl.h:1242
BYTE fsStyle
Definition: commctrl.h:924
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define IID_PPV_ARG(Itype, ppType)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4217
#define CCS_VERT
Definition: commctrl.h:2221
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1134
#define REBARCLASSNAMEW
Definition: commctrl.h:1435
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HIMAGELIST toolImageList
Definition: basebarsite.cpp:68
#define BTNS_BUTTON
Definition: commctrl.h:970
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define RB_SETBKCOLOR
Definition: commctrl.h:1563
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
INT_PTR iString
Definition: commctrl.h:931
DWORD_PTR dwData
Definition: commctrl.h:930
int iBitmap
Definition: commctrl.h:921
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
#define RBS_AUTOSIZE
Definition: commctrl.h:1447
#define TRACE(s)
Definition: solgame.cpp:4
#define RB_SETTEXTCOLOR
Definition: commctrl.h:1565
LONG HRESULT
Definition: typedefs.h:77
#define ILC_COLOR24
Definition: commctrl.h:342
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define RGB(r, g, b)
Definition: wingdi.h:2935
unsigned long DWORD
Definition: ntddk_ex.h:95
BYTE bReserved[2]
Definition: commctrl.h:928
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:961
#define CCS_NORESIZE
Definition: commctrl.h:2217
CComPtr< IUnknown > fDeskBarSite
Definition: basebarsite.cpp:65
static const WCHAR L[]
Definition: oid.c:1250
int idCommand
Definition: commctrl.h:922
#define LR_LOADTRANSPARENT
Definition: winuser.h:1083
#define ILC_MASK
Definition: commctrl.h:336
#define IDM_BASEBAR_CLOSE
Definition: resource.h:75
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59
#define WS_BORDER
Definition: pedump.c:625
#define IMAGE_BITMAP
Definition: winuser.h:211
#define CLR_DEFAULT
Definition: commctrl.h:305
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define TBSTATE_ENABLED
Definition: commctrl.h:946
#define CCS_NOMOVEY
Definition: commctrl.h:2215
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define RBS_VERTICALGRIPPER
Definition: commctrl.h:1448
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1449
#define LoadImage
Definition: winuser.h:5716
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
Definition: imagelist.c:563
static HBITMAP
Definition: button.c:44
BYTE fsState
Definition: commctrl.h:923
#define WS_VISIBLE
Definition: pedump.c:620
virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID)
#define TBSTYLE_FLAT
Definition: commctrl.h:964
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define RBS_REGISTERDROP
Definition: commctrl.h:1446

◆ SetModeDBC()

HRESULT STDMETHODCALLTYPE CBaseBarSite::SetModeDBC ( DWORD  dwMode)
privatevirtual

Definition at line 460 of file basebarsite.cpp.

461 {
462  return E_NOTIMPL;
463 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ShowBand()

HRESULT CBaseBarSite::ShowBand ( DWORD  dwBandID)
private

Definition at line 794 of file basebarsite.cpp.

795 {
796  UINT index;
797  CComPtr<IDeskBand> dockingWindow;
798  HRESULT hResult;
800 
801  // show our band
802  hResult = GetBandObject(dwBandID, IID_PPV_ARG(IDeskBand, &dockingWindow));
803  if (FAILED_UNEXPECTEDLY(hResult))
804  return E_FAIL;
805 
806  hResult = dockingWindow->ShowDW(TRUE);
807 
808  // Hide old band while adding new one
809  if (fCurrentActiveBar && fCurrentActiveBar->fBandID != dwBandID)
810  {
811  DWORD index;
813  if (index != 0xffffffff)
815  }
816  if (FAILED_UNEXPECTEDLY(hResult))
817  return hResult;
818 
819  // Display the current band
820  index = SendMessage(RB_IDTOINDEX, dwBandID, 0);
821  if (index != 0xffffffff)
824  return E_FAIL;
825  fCurrentActiveBar = (CBarInfo*)bandInfo.lParam;
826  return S_OK;
827 }
#define TRUE
Definition: types.h:120
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv)
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
GLuint index
Definition: glext.h:6031
#define REBARBANDINFO
Definition: commctrl.h:1541
LONG HRESULT
Definition: typedefs.h:77
HRESULT GetInternalBandInfo(UINT uBand, REBARBANDINFO *pBandInfo)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
#define RB_SHOWBAND
Definition: commctrl.h:1590
#define index(s, c)
Definition: various.h:29
#define S_OK
Definition: intsafe.h:59
#define RB_IDTOINDEX
Definition: commctrl.h:1560
unsigned int UINT
Definition: ndis.h:50
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048

Referenced by InsertBar().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CBaseBarSite::TranslateAcceleratorIO ( LPMSG  lpMsg)
privatevirtual

Definition at line 286 of file basebarsite.cpp.

287 {
288  if (!fCurrentActiveBar)
289  {
290  if (lpMsg)
291  {
292  TranslateMessage(lpMsg);
293  DispatchMessage(lpMsg);
294  }
295  return S_OK;
296  }
297 
299 }
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define S_OK
Definition: intsafe.h:59
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4104
CComPtr< IUnknown > fTheBar
Definition: basebarsite.cpp:58

◆ UIActivateDBC()

HRESULT STDMETHODCALLTYPE CBaseBarSite::UIActivateDBC ( DWORD  dwState)
privatevirtual

Definition at line 465 of file basebarsite.cpp.

466 {
467  return E_NOTIMPL;
468 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ UIActivateIO()

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

Definition at line 270 of file basebarsite.cpp.

271 {
272  if (!fCurrentActiveBar)
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:1580
CBarInfo * fCurrentActiveBar
Definition: basebarsite.cpp:63
#define S_OK
Definition: intsafe.h:59
CComPtr< IUnknown > fTheBar
Definition: basebarsite.cpp:58

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: