ReactOS  0.4.14-dev-41-g31d7680
CToolsBand Class Reference
Inheritance diagram for CToolsBand:
Collaboration diagram for CToolsBand:

Public Member Functions

 CToolsBand ()
 
virtual ~CToolsBand ()
 
virtual HRESULT STDMETHODCALLTYPE GetBandInfo (DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
 
virtual HRESULT STDMETHODCALLTYPE SetSite (IUnknown *pUnkSite)
 
virtual HRESULT STDMETHODCALLTYPE GetSite (REFIID riid, void **ppvSite)
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE CloseDW (DWORD dwReserved)
 
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW (const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
 
virtual HRESULT STDMETHODCALLTYPE ShowDW (BOOL fShow)
 
virtual HRESULT STDMETHODCALLTYPE HasFocusIO ()
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO (LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE UIActivateIO (BOOL fActivate, LPMSG lpMsg)
 
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 OnGetButtonInfo (UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
 
- Public Member Functions inherited from ATL::CWindowImpl< CToolsBand, 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 IDockingWindow
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IObjectWithSite
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 

Private Attributes

CComPtr< IDockingWindowSite > fDockSite
 
HIMAGELIST m_himlNormal
 
HIMAGELIST m_himlHot
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< CWindow >
enum  
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IObjectWithSite
typedef IObjectWithSiteLPOBJECTWITHSITE
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CToolsBand, 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 27 of file toolsband.cpp.

Constructor & Destructor Documentation

◆ CToolsBand()

CToolsBand::CToolsBand ( )

Definition at line 93 of file toolsband.cpp.

94  : fDockSite(NULL)
95 {
96 }
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IDockingWindowSite > fDockSite
Definition: toolsband.cpp:36

◆ ~CToolsBand()

CToolsBand::~CToolsBand ( )
virtual

Definition at line 98 of file toolsband.cpp.

99 {
100 }

Member Function Documentation

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CToolsBand::CloseDW ( DWORD  dwReserved)
virtual

Implements IDockingWindow.

Definition at line 327 of file toolsband.cpp.

328 {
329  ShowDW(FALSE);
330 
331  if (IsWindow())
332  DestroyWindow();
333 
334  m_hWnd = NULL;
335 
336  if (fDockSite)
337  fDockSite.Release();
338 
339  if (m_himlNormal)
341 
342  if (m_himlHot)
344 
345  return S_OK;
346 }
HIMAGELIST m_himlNormal
Definition: toolsband.cpp:37
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow)
Definition: toolsband.cpp:353
BOOL IsWindow() const
Definition: atlwin.h:879
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
smooth NULL
Definition: ftsmooth.c:416
HIMAGELIST m_himlHot
Definition: toolsband.cpp:38
HWND m_hWnd
Definition: atlwin.h:268
BOOL DestroyWindow()
Definition: atlwin.h:428
#define S_OK
Definition: intsafe.h:59
void Release()
Definition: atlcomcli.h:140
CComPtr< IDockingWindowSite > fDockSite
Definition: toolsband.cpp:36

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CToolsBand::ContextSensitiveHelp ( BOOL  fEnterMode)
virtual

Implements IOleWindow.

Definition at line 322 of file toolsband.cpp.

323 {
324  return E_NOTIMPL;
325 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetBandInfo()

HRESULT STDMETHODCALLTYPE CToolsBand::GetBandInfo ( DWORD  dwBandID,
DWORD  dwViewMode,
DESKBANDINFO pdbi 
)
virtual

Implements IDeskBand.

Definition at line 102 of file toolsband.cpp.

103 {
104  RECT actualRect;
105  POINTL actualSize;
106  POINTL idealSize;
107  POINTL maxSize;
108  POINTL itemSize;
109 
110  ::GetWindowRect(m_hWnd, &actualRect);
111  actualSize.x = actualRect.right - actualRect.left;
112  actualSize.y = actualRect.bottom - actualRect.top;
113 
114  /* Obtain the ideal size, to be used as min and max */
116  SendMessageW(m_hWnd, TB_GETMAXSIZE, 0, reinterpret_cast<LPARAM>(&maxSize));
117 
118  idealSize = maxSize;
119  SendMessageW(m_hWnd, TB_GETIDEALSIZE, FALSE, reinterpret_cast<LPARAM>(&idealSize));
120 
121  /* Obtain the button size, to be used as the integral size */
123  itemSize.x = GET_X_LPARAM(size);
124  itemSize.y = GET_Y_LPARAM(size);
125 
126  if (pdbi->dwMask & DBIM_MINSIZE)
127  {
128  pdbi->ptMinSize = idealSize;
129  }
130  if (pdbi->dwMask & DBIM_MAXSIZE)
131  {
132  pdbi->ptMaxSize = maxSize;
133  }
134  if (pdbi->dwMask & DBIM_INTEGRAL)
135  {
136  pdbi->ptIntegral = itemSize;
137  }
138  if (pdbi->dwMask & DBIM_ACTUAL)
139  {
140  pdbi->ptActual = actualSize;
141  }
142  if (pdbi->dwMask & DBIM_TITLE)
143  wcscpy(pdbi->wszTitle, L"");
144  if (pdbi->dwMask & DBIM_MODEFLAGS)
145  pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
146  if (pdbi->dwMask & DBIM_BKCOLOR)
147  pdbi->crBkgnd = 0;
148  return S_OK;
149 }
LONG top
Definition: windef.h:292
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
LONG left
Definition: windef.h:291
#define TB_GETMAXSIZE
Definition: commctrl.h:1161
LONG right
Definition: windef.h:293
LONG y
Definition: windef.h:315
#define TB_AUTOSIZE
Definition: commctrl.h:1109
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:764
#define TB_GETIDEALSIZE
Definition: commctrl.h:1256
#define TB_GETBUTTONSIZE
Definition: commctrl.h:1132
GLsizeiptr size
Definition: glext.h:5919
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG x
Definition: windef.h:314
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
LONG bottom
Definition: windef.h:294

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CToolsBand::GetClassID ( CLSID pClassID)
virtual

Implements IPersist.

Definition at line 380 of file toolsband.cpp.

381 {
382  return E_NOTIMPL;
383 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetSite()

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

Definition at line 307 of file toolsband.cpp.

308 {
309  if (fDockSite == NULL)
310  return E_FAIL;
311  return fDockSite->QueryInterface(riid, ppvSite);
312 }
REFIID riid
Definition: precomp.h:44
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IDockingWindowSite > fDockSite
Definition: toolsband.cpp:36

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CToolsBand::GetSizeMax ( ULARGE_INTEGER pcbSize)
virtual

Implements IPersistStream.

Definition at line 400 of file toolsband.cpp.

401 {
402  return E_NOTIMPL;
403 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CToolsBand::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 314 of file toolsband.cpp.

315 {
316  if (lphwnd == NULL)
317  return E_POINTER;
318  *lphwnd = m_hWnd;
319  return S_OK;
320 }
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 CToolsBand::HasFocusIO ( )
virtual

Definition at line 365 of file toolsband.cpp.

366 {
367  return S_FALSE;
368 }
#define S_FALSE
Definition: winerror.h:2357

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CToolsBand::IsDirty ( void  )
virtual

Implements IPersistStream.

Definition at line 385 of file toolsband.cpp.

386 {
387  return E_NOTIMPL;
388 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Load()

HRESULT STDMETHODCALLTYPE CToolsBand::Load ( IStream pStm)
virtual

Implements IPersistStream.

Definition at line 390 of file toolsband.cpp.

391 {
392  return E_NOTIMPL;
393 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnGetButtonInfo()

LRESULT CToolsBand::OnGetButtonInfo ( UINT  idControl,
NMHDR pNMHDR,
BOOL bHandled 
)

Definition at line 405 of file toolsband.cpp.

406 {
407  TBNOTIFYW *pTBntf = reinterpret_cast<TBNOTIFYW *>(pNMHDR);
408 
409  if (pTBntf->iItem >= 0 && pTBntf->iItem < (numShownButtons + numHiddenButtons))
410  {
411  pTBntf->tbButton = tbButtonsAdd[pTBntf->iItem];
412  return TRUE;
413  }
414  else
415  return FALSE;
416  return 0;
417 }
#define TRUE
Definition: types.h:120
#define TBNOTIFYW
Definition: commctrl.h:1403
const int numShownButtons
Definition: toolsband.cpp:225
const int numHiddenButtons
Definition: toolsband.cpp:226
TBBUTTON tbButtonsAdd[numShownButtons+numHiddenButtons]
Definition: toolsband.cpp:227

◆ ResizeBorderDW()

HRESULT STDMETHODCALLTYPE CToolsBand::ResizeBorderDW ( const RECT prcBorder,
IUnknown punkToolbarSite,
BOOL  fReserved 
)
virtual

Definition at line 348 of file toolsband.cpp.

349 {
350  return E_NOTIMPL;
351 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Save()

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

Implements IPersistStream.

Definition at line 395 of file toolsband.cpp.

396 {
397  return E_NOTIMPL;
398 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetSite()

HRESULT STDMETHODCALLTYPE CToolsBand::SetSite ( IUnknown pUnkSite)
virtual

Implements IObjectWithSite.

Definition at line 258 of file toolsband.cpp.

258  {
259  HWND parentWindow;
260  HWND toolbar;
261  HRESULT hResult;
262 
264 
265  if (pUnkSite == NULL)
266  return S_OK;
267  hResult = pUnkSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &fDockSite));
268  if (FAILED_UNEXPECTEDLY(hResult))
269  return hResult;
270  parentWindow = NULL;
271  hResult = IUnknown_GetWindow(pUnkSite, &parentWindow);
272  if (FAILED(hResult) || !::IsWindow(parentWindow))
273  return E_FAIL;
274 
275  toolbar = CreateWindowEx(
281  0, 0, 500, 20, parentWindow, NULL, _AtlBaseModule.GetModuleInstance(), 0);
282  if (toolbar == NULL)
283  return E_FAIL;
284  SubclassWindow(toolbar);
286 
291 
292  m_himlNormal = ImageList_LoadImageW(_AtlBaseModule.GetResourceInstance(),
294  0, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_DEFAULTSIZE | LR_CREATEDIBSECTION);
295 
296  m_himlHot = ImageList_LoadImageW(_AtlBaseModule.GetResourceInstance(),
298  0, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_DEFAULTSIZE | LR_CREATEDIBSECTION);
299 
303 
304  return hResult;
305 }
#define TBSTYLE_EX_DOUBLEBUFFER
Definition: commctrl.h:986
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define TB_SETHOTIMAGELIST
Definition: commctrl.h:1126
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDS_STANDARD_TOOLBAR
Definition: resource.h:122
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
Definition: commctrl.h:985
#define TB_ADDSTRINGW
Definition: commctrl.h:1104
#define TBSTYLE_TRANSPARENT
Definition: commctrl.h:968
HIMAGELIST m_himlNormal
Definition: toolsband.cpp:37
BOOL IsWindow() const
Definition: atlwin.h:879
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
#define IDB_SHELL_EXPLORER_LG_HOT
Definition: resource.h:148
#define TBSTYLE_EX_DRAWDDARROWS
Definition: commctrl.h:981
#define SM_CXEDGE
Definition: winuser.h:998
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1134
#define CCS_NODIVIDER
Definition: commctrl.h:2220
#define TBSTYLE_REGISTERDROP
Definition: commctrl.h:967
const int numShownButtons
Definition: toolsband.cpp:225
#define CreateWindowEx
Definition: winuser.h:5656
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_TOP
Definition: commctrl.h:2214
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
HIMAGELIST m_himlHot
Definition: toolsband.cpp:38
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
#define LR_DEFAULTSIZE
Definition: winuser.h:1084
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define RGB(r, g, b)
Definition: wingdi.h:2935
int WINAPI GetSystemMetrics(_In_ int)
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:961
#define CCS_NORESIZE
Definition: commctrl.h:2217
static const WCHAR L[]
Definition: oid.c:1250
#define TB_ADDBUTTONSW
Definition: commctrl.h:1238
#define WM_USER
Definition: winuser.h:1877
#define S_OK
Definition: intsafe.h:59
#define GetModuleHandle
Definition: winbase.h:3644
void Release()
Definition: atlcomcli.h:140
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define IDB_SHELL_EXPLORER_LG
Definition: resource.h:147
#define IMAGE_BITMAP
Definition: winuser.h:211
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:984
CComPtr< IDockingWindowSite > fDockSite
Definition: toolsband.cpp:36
TBBUTTON tbButtonsAdd[numShownButtons+numHiddenButtons]
Definition: toolsband.cpp:227
#define WS_VISIBLE
Definition: pedump.c:620
#define TBSTYLE_LIST
Definition: commctrl.h:965
#define TBSTYLE_FLAT
Definition: commctrl.h:964
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1162

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CToolsBand::ShowDW ( BOOL  fShow)
virtual

Implements IDockingWindow.

Definition at line 353 of file toolsband.cpp.

354 {
355  if (m_hWnd)
356  {
357  if (fShow)
359  else
361  }
362  return S_OK;
363 }
#define SW_HIDE
Definition: winuser.h:762
#define SW_SHOW
Definition: winuser.h:769
HWND m_hWnd
Definition: atlwin.h:268
#define S_OK
Definition: intsafe.h:59
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1265

Referenced by CloseDW().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CToolsBand::TranslateAcceleratorIO ( LPMSG  lpMsg)
virtual

Definition at line 370 of file toolsband.cpp.

371 {
372  return S_FALSE;
373 }
#define S_FALSE
Definition: winerror.h:2357

◆ UIActivateIO()

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

Definition at line 375 of file toolsband.cpp.

376 {
377  return E_NOTIMPL;
378 }
#define E_NOTIMPL
Definition: ddrawi.h:99

Member Data Documentation

◆ fDockSite

CComPtr<IDockingWindowSite> CToolsBand::fDockSite
private

Definition at line 36 of file toolsband.cpp.

Referenced by CloseDW(), GetSite(), and SetSite().

◆ m_himlHot

HIMAGELIST CToolsBand::m_himlHot
private

Definition at line 38 of file toolsband.cpp.

Referenced by CloseDW(), and SetSite().

◆ m_himlNormal

HIMAGELIST CToolsBand::m_himlNormal
private

Definition at line 37 of file toolsband.cpp.

Referenced by CloseDW(), and SetSite().


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