ReactOS 0.4.16-dev-401-g45b008d
CToolsBand Class Reference
Inheritance diagram for CToolsBand:
Collaboration diagram for CToolsBand:

Public Member Functions

 CToolsBand ()
 
virtual ~CToolsBand ()
 
STDMETHOD() GetBandInfo (DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
 
STDMETHOD() SetSite (IUnknown *pUnkSite) override
 
STDMETHOD() GetSite (REFIID riid, void **ppvSite) override
 
STDMETHOD() GetWindow (HWND *lphwnd) override
 
STDMETHOD() ContextSensitiveHelp (BOOL fEnterMode) override
 
STDMETHOD() CloseDW (DWORD dwReserved) override
 
STDMETHOD() ResizeBorderDW (const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
 
STDMETHOD() ShowDW (BOOL fShow) override
 
STDMETHOD() HasFocusIO () override
 
STDMETHOD() TranslateAcceleratorIO (LPMSG lpMsg) override
 
STDMETHOD() UIActivateIO (BOOL fActivate, LPMSG lpMsg) 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 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< 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 ()
 
HRESULT GetBandInfo ([in] DWORD dwBandID, [in] DWORD dwViewMode, [in, out] DESKBANDINFO *pdbi)
 
- Public Member Functions inherited from IDockingWindow
HRESULT ShowDW ([in] BOOL fShow)
 
HRESULT CloseDW ([in] DWORD dwReserved)
 
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
- 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 SetSite ([in] IUnknown *pUnkSite)
 
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 
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 Attributes

CComPtr< IDockingWindowSite > fDockSite
 
HIMAGELIST m_himlNormal
 
HIMAGELIST m_himlHot
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 
- 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< 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 27 of file toolsband.cpp.

Constructor & Destructor Documentation

◆ CToolsBand()

CToolsBand::CToolsBand ( )

Definition at line 93 of file toolsband.cpp.

95{
96}
CComPtr< IDockingWindowSite > fDockSite
Definition: toolsband.cpp:36
#define NULL
Definition: types.h:112

◆ ~CToolsBand()

CToolsBand::~CToolsBand ( )
virtual

Definition at line 98 of file toolsband.cpp.

99{
100}

Member Function Documentation

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CToolsBand::CloseDW ( DWORD  dwReserved)
override

Implements IDockingWindow.

Definition at line 327 of file toolsband.cpp.

328{
329 ShowDW(FALSE);
330
331 if (IsWindow())
333
334 m_hWnd = NULL;
335
336 if (fDockSite)
338
339 if (m_himlNormal)
341
342 if (m_himlHot)
344
345 return S_OK;
346}
void Release()
Definition: atlcomcli.h:170
BOOL DestroyWindow()
Definition: atlwin.h:462
HWND m_hWnd
Definition: atlwin.h:273
BOOL IsWindow() const
Definition: atlwin.h:947
STDMETHOD() ShowDW(BOOL fShow) override
Definition: toolsband.cpp:353
HIMAGELIST m_himlHot
Definition: toolsband.cpp:38
HIMAGELIST m_himlNormal
Definition: toolsband.cpp:37
#define FALSE
Definition: types.h:117
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define S_OK
Definition: intsafe.h:52

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CToolsBand::ContextSensitiveHelp ( BOOL  fEnterMode)
override

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

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}
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
#define L(x)
Definition: ntvdm.h:50
#define TB_AUTOSIZE
Definition: commctrl.h:1137
#define TB_GETIDEALSIZE
Definition: commctrl.h:1284
#define TB_GETBUTTONSIZE
Definition: commctrl.h:1160
#define TB_GETMAXSIZE
Definition: commctrl.h:1189
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
COLORREF crBkgnd
Definition: shobjidl.idl:2499
WCHAR wszTitle[256]
Definition: shobjidl.idl:2497
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG_PTR LPARAM
Definition: windef.h:208
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CToolsBand::GetClassID ( CLSID pClassID)
override

Implements IPersist.

Definition at line 380 of file toolsband.cpp.

381{
382 return E_NOTIMPL;
383}

◆ GetSite()

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

Definition at line 307 of file toolsband.cpp.

308{
309 if (fDockSite == NULL)
310 return E_FAIL;
311 return fDockSite->QueryInterface(riid, ppvSite);
312}
#define E_FAIL
Definition: ddrawi.h:102
REFIID riid
Definition: atlbase.h:39

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CToolsBand::GetSizeMax ( ULARGE_INTEGER pcbSize)
override

Implements IPersistStream.

Definition at line 400 of file toolsband.cpp.

401{
402 return E_NOTIMPL;
403}

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CToolsBand::GetWindow ( HWND lphwnd)
override

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}
#define E_POINTER
Definition: winerror.h:2365

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CToolsBand::HasFocusIO ( )
override

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

Implements IPersistStream.

Definition at line 385 of file toolsband.cpp.

386{
387 return E_NOTIMPL;
388}

◆ Load()

HRESULT STDMETHODCALLTYPE CToolsBand::Load ( IStream pStm)
override

Implements IPersistStream.

Definition at line 390 of file toolsband.cpp.

391{
392 return E_NOTIMPL;
393}

◆ 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:1431
TBBUTTON tbButtonsAdd[numShownButtons+numHiddenButtons]
Definition: toolsband.cpp:227
const int numShownButtons
Definition: toolsband.cpp:225
const int numHiddenButtons
Definition: toolsband.cpp:226

◆ ResizeBorderDW()

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

Definition at line 348 of file toolsband.cpp.

349{
350 return E_NOTIMPL;
351}

◆ Save()

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

Implements IPersistStream.

Definition at line 395 of file toolsband.cpp.

396{
397 return E_NOTIMPL;
398}

◆ SetSite()

HRESULT STDMETHODCALLTYPE CToolsBand::SetSite ( IUnknown pUnkSite)
override

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 IDB_SHELL_EXPLORER_LG
Definition: resource.h:150
#define IDB_SHELL_EXPLORER_LG_HOT
Definition: resource.h:151
#define IDS_STANDARD_TOOLBAR
Definition: resource.h:125
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1336
#define RGB(r, g, b)
Definition: precomp.h:71
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define FAILED(hr)
Definition: intsafe.h:51
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1190
#define TBSTYLE_EX_DRAWDDARROWS
Definition: commctrl.h:1009
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:989
#define TBSTYLE_LIST
Definition: commctrl.h:993
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:1012
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1134
#define TB_ADDSTRINGW
Definition: commctrl.h:1132
#define TB_SETIMAGELIST
Definition: commctrl.h:1150
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
Definition: commctrl.h:1013
#define TBSTYLE_EX_DOUBLEBUFFER
Definition: commctrl.h:1014
#define TBSTYLE_TRANSPARENT
Definition: commctrl.h:996
#define CCS_NODIVIDER
Definition: commctrl.h:2253
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define CCS_TOP
Definition: commctrl.h:2247
#define TBSTYLE_REGISTERDROP
Definition: commctrl.h:995
#define TBSTYLE_FLAT
Definition: commctrl.h:992
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2251
#define CCS_NORESIZE
Definition: commctrl.h:2250
#define TB_SETHOTIMAGELIST
Definition: commctrl.h:1154
#define TB_ADDBUTTONSW
Definition: commctrl.h:1266
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1162
#define GetModuleHandle
Definition: winbase.h:3852
UINT_PTR WPARAM
Definition: windef.h:207
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define CreateWindowEx
Definition: winuser.h:5767
#define IMAGE_BITMAP
Definition: winuser.h:211
#define SM_CXEDGE
Definition: winuser.h:1011
#define LR_CREATEDIBSECTION
Definition: winuser.h:1101
#define SendMessage
Definition: winuser.h:5855
#define WM_USER
Definition: winuser.h:1898
#define LR_DEFAULTSIZE
Definition: winuser.h:1097
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
int WINAPI GetSystemMetrics(_In_ int)
#define IID_PPV_ARG(Itype, ppType)

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CToolsBand::ShowDW ( BOOL  fShow)
override

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:771
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:778

Referenced by CloseDW().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CToolsBand::TranslateAcceleratorIO ( LPMSG  lpMsg)
override

Definition at line 370 of file toolsband.cpp.

371{
372 return S_FALSE;
373}

◆ UIActivateIO()

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

Definition at line 375 of file toolsband.cpp.

376{
377 return E_NOTIMPL;
378}

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: