home     download     screen shots     bugs     mailing list     example output     generated MFC docs     help     tools and utilities


 Overview   Project   Class   Tree   Index 
MFC Class Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

MFC
Class CToolBar

CObject
   |
   +--CCmdTarget
         |
         +--CWnd
               |
               +--CControlBar
                     |
                     +--CToolBar

   in AFXEXT.H

class CToolBar
extends CControlBar


Field Summary
protected BOOL m_bDelayedButtonLayout
          
protected HBITMAP m_hbmImageWell
          
protected HINSTANCE m_hInstImageWell
          
protected HRSRC m_hRsrcImageWell
          
protected CMapStringToPtr* m_pStringMap
          
protected CSize m_sizeButton
          
protected CSize m_sizeImage
          
   
Fields inherited from class CControlBar
m_bAutoDelete, m_cxRightBorder, m_cxLeftBorder, m_cyBottomBorder, m_cyTopBorder, m_cxDefaultGap, m_nMRUWidth, m_nCount, m_pData, m_nStateFlags, m_dwStyle, m_dwDockStyle, m_pDockSite, m_pDockBar, m_pDockContext
   
Fields inherited from class CWnd
m_hWnd, wndTop, wndBottom, wndTopMost, wndNoTopMost, m_hWndOwner, m_nFlags, m_pfnSuper, m_nMsgDragList, m_nModalResult, m_pDropTarget, m_pCtrlCont, m_pCtrlSite, messageMap
   
Fields inherited from class CCmdTarget
messageMap, commandMap, dispatchMap, connectionMap, interfaceMap, eventsinkMap, m_dwRef, m_pOuterUnknown, m_xInnerUnknown, m_xDispatch, m_bResultExpected, m_xConnPtContainer
   
Fields inherited from class CObject
classCObject
 
Constructor Summary
CToolBar()
          
virtual ~CToolBar()
          
 
Method Summary
protected void _GetButton( int nIndex, TBBUTTON* pButton ) const
          
protected void _SetButton( int nIndex, TBBUTTON* pButton )
          
 BOOL AddReplaceBitmap( HBITMAP hbmImageWell )
          
 virtual CSize CalcDynamicLayout( int nLength, DWORD nMode )
          
 virtual CSize CalcFixedLayout( BOOL bStretch, BOOL bHorz )
          
protected CSize CalcLayout( DWORD nMode, int nLength =-1 )
          
protected CSize CalcSize( TBBUTTON* pData, int nCount )
          
 int CommandToIndex( UINT nIDFind ) const
          
 BOOL Create( CWnd* pParentWnd, DWORD dwStyle = WS_CHILD| WS_VISIBLE| CBRS_TOP, UINT nID = AFX_IDW_TOOLBAR )
          
 BOOL CreateEx( CWnd* pParentWnd, DWORD dwCtrlStyle = TBSTYLE_FLAT, DWORD dwStyle = WS_CHILD| WS_VISIBLE| CBRS_ALIGN_TOP, CRect rcBorders = CRect( 0, 0, 0, 0 ), UINT nID = AFX_IDW_TOOLBAR )
          
 void GetButtonInfo( int nIndex, UINT& nID, UINT& nStyle, int& iImage ) const
          
 UINT GetButtonStyle( int nIndex ) const
          
 CString GetButtonText( int nIndex ) const
          
 void GetButtonText( int nIndex, CString& rString ) const
          
 UINT GetItemID( int nIndex ) const
          
 virtual void GetItemRect( int nIndex, LPRECT lpRect ) const
          
 CToolBarCtrl& GetToolBarCtrl() const
          
protected void Layout()
          
 BOOL LoadBitmap( LPCTSTR lpszResourceName )
          
 BOOL LoadBitmap( UINT nIDResource )
          
 BOOL LoadToolBar( LPCTSTR lpszResourceName )
          
 BOOL LoadToolBar( UINT nIDResource )
          
 virtual void OnBarStyleChange( DWORD dwOldStyle, DWORD dwNewStyle )
          
protected afx_msg BOOL OnEraseBkgnd( CDC* pDC )
          
protected afx_msg void OnNcCalcSize( BOOL, NCCALCSIZE_PARAMS* )
          
protected afx_msg BOOL OnNcCreate( LPCREATESTRUCT )
          
protected afx_msg UINT OnNcHitTest( CPoint )
          
protected afx_msg void OnNcPaint()
          
protected afx_msg void OnPaint()
          
protected afx_msg LRESULT OnPreserveZeroBorderHelper( WPARAM, LPARAM )
          
protected afx_msg LRESULT OnSetBitmapSize( WPARAM, LPARAM )
          
protected afx_msg LRESULT OnSetButtonSize( WPARAM, LPARAM )
          
protected LRESULT OnSetSizeHelper( CSize& size, LPARAM lParam )
          
protected afx_msg void OnSysColorChange()
          
 virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const
          
 virtual void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler )
          
protected afx_msg void OnWindowPosChanging( LPWINDOWPOS )
          
 BOOL SetBitmap( HBITMAP hbmImageWell )
          
 void SetButtonInfo( int nIndex, UINT nID, UINT nStyle, int iImage )
          
 BOOL SetButtons( const UINT* lpIDArray, int nIDCount )
          
 void SetButtonStyle( int nIndex, UINT nStyle )
          
 BOOL SetButtonText( int nIndex, LPCTSTR lpszText )
          
 void SetHeight( int cyHeight )
          
 void SetOwner( CWnd* pOwnerWnd )
          
 void SetSizes( SIZE sizeButton, SIZE sizeImage )
          
protected void SizeToolBar( TBBUTTON* pData, int nCount, int nLength, BOOL bVert = FALSE )
          
protected int WrapToolBar( TBBUTTON* pData, int nCount, int nWidth )
          
   
Methods inherited from class CControlBar
GetCount, GetBarStyle, SetBarStyle, SetBorders, SetBorders, GetBorders, GetDockingFrame, IsFloating, CalcFixedLayout, CalcDynamicLayout, EnableDocking, OnUpdateCmdUI, DelayShow, IsVisible, RecalcDelayShow, IsDockBar, DestroyWindow, OnBarStyleChange, PreTranslateMessage, PreCreateWindow, PostNcDestroy, DoPaint, DrawBorders, DrawGripper, WindowProc, CalcInsideRect, AllocElements, SetStatusText, ResetTimer, EraseNonClient, GetBarInfo, SetBarInfo, OnTimer, OnCreate, OnDestroy, OnPaint, OnCtlColor, OnWindowPosChanging, OnSizeParent, OnHelpHitTest, OnInitialUpdate, OnIdleUpdateCmdUI, OnLButtonDown, OnLButtonDblClk, OnMouseActivate
   
Methods inherited from class CWnd
GetCurrentMessage, HWND, operator==, operator!=, GetSafeHwnd, GetStyle, GetExStyle, ModifyStyle, ModifyStyleEx, GetOwner, SetOwner, FromHandle, FromHandlePermanent, DeleteTempMap, Attach, Detach, PreSubclassWindow, SubclassWindow, SubclassDlgItem, UnsubclassWindow, ExecuteDlgInit, ExecuteDlgInit, Create, CreateEx, CreateEx, CreateControl, CreateControl, CreateControl, GetControlUnknown, DestroyWindow, PreCreateWindow, CalcWindowRect, GetDlgCtrlID, SetDlgCtrlID, GetDlgItem, GetDlgItem, GetDescendantWindow, SendMessageToDescendants, GetParentFrame, GetTopLevelParent, GetTopLevelOwner, GetParentOwner, GetTopLevelFrame, GetSafeOwner, SendMessage, PostMessage, SendNotifyMessage, SendChildNotifyLastMsg, IsDialogMessage, SetWindowText, GetWindowText, GetWindowText, GetWindowTextLength, SetFont, GetFont, GetMenu, SetMenu, DrawMenuBar, GetSystemMenu, HiliteMenuItem, IsIconic, IsZoomed, MoveWindow, MoveWindow, SetWindowRgn, GetWindowRgn, SetWindowPos, ArrangeIconicWindows, BringWindowToTop, GetWindowRect, GetClientRect, GetWindowPlacement, SetWindowPlacement, ClientToScreen, ClientToScreen, ScreenToClient, ScreenToClient, MapWindowPoints, MapWindowPoints, BeginPaint, EndPaint, GetDC, GetWindowDC, ReleaseDC, Print, PrintClient, UpdateWindow, SetRedraw, GetUpdateRect, GetUpdateRgn, Invalidate, InvalidateRect, InvalidateRgn, ValidateRect, ValidateRgn, ShowWindow, IsWindowVisible, ShowOwnedPopups, GetDCEx, LockWindowUpdate, UnlockWindowUpdate, RedrawWindow, EnableScrollBar, SetTimer, KillTimer, EnableToolTips, EnableTrackingToolTips, CancelToolTips, FilterToolTipMessage, OnToolHitTest, IsWindowEnabled, EnableWindow, GetActiveWindow, SetActiveWindow, SetForegroundWindow, GetForegroundWindow, GetCapture, SetCapture, GetFocus, SetFocus, GetDesktopWindow, CloseWindow, OpenIcon, CheckDlgButton, CheckRadioButton, GetCheckedRadioButton, DlgDirList, DlgDirListComboBox, DlgDirSelect, DlgDirSelectComboBox, GetDlgItemInt, GetDlgItemText, GetDlgItemText, GetNextDlgGroupItem, GetNextDlgTabItem, IsDlgButtonChecked, SendDlgItemMessage, SetDlgItemInt, SetDlgItemText, GetScrollPos, GetScrollRange, ScrollWindow, SetScrollPos, SetScrollRange, ShowScrollBar, EnableScrollBarCtrl, GetScrollBarCtrl, ScrollWindowEx, SetScrollInfo, GetScrollInfo, GetScrollLimit, ChildWindowFromPoint, ChildWindowFromPoint, FindWindow, GetNextWindow, GetTopWindow, GetWindow, GetLastActivePopup, IsChild, GetParent, SetParent, WindowFromPoint, FlashWindow, MessageBox, ChangeClipboardChain, SetClipboardViewer, OpenClipboard, GetClipboardOwner, GetClipboardViewer, GetOpenClipboardWindow, CreateCaret, CreateSolidCaret, CreateGrayCaret, GetCaretPos, SetCaretPos, HideCaret, ShowCaret, DragAcceptFiles, SetIcon, GetIcon, SetWindowContextHelpId, GetWindowContextHelpId, UpdateData, OnHelp, OnHelpIndex, OnHelpFinder, OnHelpUsing, WinHelp, RepositionBars, UpdateDialogControls, CenterWindow, RunModalLoop, ContinueModal, EndModalLoop, InvokeHelper, SetProperty, GetProperty, GetDSCCursor, BindDefaultProperty, BindProperty, OnCommand, OnNotify, OnActivate, OnActivateApp, OnActivateTopLevel, OnCancelMode, OnChildActivate, OnClose, OnContextMenu, OnCopyData, OnCreate, OnCtlColor, OnDestroy, OnEnable, OnEndSession, OnEnterIdle, OnEraseBkgnd, OnGetMinMaxInfo, OnHelpInfo, OnIconEraseBkgnd, OnKillFocus, OnMenuChar, OnMenuSelect, OnMove, OnPaint, OnParentNotify, OnQueryDragIcon, OnQueryEndSession, OnQueryNewPalette, OnQueryOpen, OnSetFocus, OnShowWindow, OnSize, OnTCard, OnWindowPosChanging, OnWindowPosChanged, OnNcActivate, OnNcCalcSize, OnNcCreate, OnNcDestroy, OnNcHitTest, OnNcLButtonDblClk, OnNcLButtonDown, OnNcLButtonUp, OnNcMButtonDblClk, OnNcMButtonDown, OnNcMButtonUp, OnNcMouseMove, OnNcPaint, OnNcRButtonDblClk, OnNcRButtonDown, OnNcRButtonUp, OnDropFiles, OnPaletteIsChanging, OnSysChar, OnSysCommand, OnSysDeadChar, OnSysKeyDown, OnSysKeyUp, OnCompacting, OnDevModeChange, OnFontChange, OnPaletteChanged, OnSpoolerStatus, OnSysColorChange, OnTimeChange, OnSettingChange, OnWinIniChange, OnChar, OnDeadChar, OnHScroll, OnVScroll, OnKeyDown, OnKeyUp, OnLButtonDblClk, OnLButtonDown, OnLButtonUp, OnMButtonDblClk, OnMButtonDown, OnMButtonUp, OnMouseActivate, OnMouseMove, OnMouseWheel, OnRegisteredMouseWheel, OnRButtonDblClk, OnRButtonDown, OnRButtonUp, OnSetCursor, OnTimer, OnInitMenu, OnInitMenuPopup, OnAskCbFormatName, OnChangeCbChain, OnDestroyClipboard, OnDrawClipboard, OnHScrollClipboard, OnPaintClipboard, OnRenderAllFormats, OnRenderFormat, OnSizeClipboard, OnVScrollClipboard, OnCompareItem, OnDeleteItem, OnDrawItem, OnGetDlgCode, OnMeasureItem, OnCharToItem, OnVKeyToItem, OnMDIActivate, OnEnterMenuLoop, OnExitMenuLoop, OnStyleChanged, OnStyleChanging, OnSizing, OnMoving, OnCaptureChanged, OnDeviceChange, GetSuperWndProcAddr, DoDataExchange, BeginModalState, EndModalState, PreTranslateMessage, OnAmbientProperty, WindowProc, OnWndMsg, Default, DefWindowProc, PostNcDestroy, OnChildNotify, ReflectChildNotify, ReflectLastMsg, CheckAutoCenter, SubclassCtl3d, SubclassDlg3d, GrayCtlColor, OnGrayCtlColor, HandleFloatingSysCommand, IsTopParentActive, ActivateTopParent, WalkPreTranslateTree, GetDescendantWindow, SendMessageToDescendants, IsFrameWnd, OnFinalRelease, PreTranslateInput, ModifyStyle, ModifyStyleEx, _FilterToolTipMessage, _EnableToolTips, GetSafeOwner_, CreateDlg, CreateDlgIndirect, CreateDlgIndirect, InitControlContainer, SetOccDialogInfo, AttachControlSite, AttachControlSite, OnNTCtlColor, OnQuery3dControls, OnDisplayChange, OnDragList, GetMessageMap
   
Methods inherited from class CCmdTarget
GetIDispatch, FromIDispatch, IsResultExpected, EnableAutomation, EnableConnections, BeginWaitCursor, EndWaitCursor, RestoreWaitCursor, EnumOleVerbs, DoOleVerb, OnCmdMsg, OnFinalRelease, IsInvokeAllowed, EnableTypeLib, GetTypeInfoOfGuid, GetDispatchIID, GetTypeInfoCount, GetTypeLibCache, GetTypeLib, GetNotSupported, SetNotSupported, GetRoutingView, GetRoutingFrame, GetRoutingView_, GetRoutingFrame_, GetMessageMap, GetCommandMap, GetDispatchMap, GetConnectionMap, GetInterfaceMap, GetEventSinkMap, EnableAggregation, ExternalDisconnect, GetControllingUnknown, InternalQueryInterface, InternalAddRef, InternalRelease, ExternalQueryInterface, ExternalAddRef, ExternalRelease, GetInterface, QueryAggregates, OnCreateAggregates, GetInterfaceHook, GetStandardProp, SetStandardProp, GetEntryCount, GetDispEntry, MemberIDFromName, GetStackSize, PushStackArgs, CallMemberFunc, OnEvent, GetEventSinkEntry, GetExtraConnectionPoints, GetConnectionHook
   
Methods inherited from class CObject
GetRuntimeClass, new, new, delete, IsSerializable, IsKindOf, Serialize
 

Field Detail

m_bDelayedButtonLayout

protected BOOL m_bDelayedButtonLayout;

m_hbmImageWell

protected HBITMAP m_hbmImageWell;

m_hInstImageWell

protected HINSTANCE m_hInstImageWell;

m_hRsrcImageWell

protected HRSRC m_hRsrcImageWell;

m_pStringMap

protected CMapStringToPtr* m_pStringMap;

m_sizeButton

protected CSize m_sizeButton;

m_sizeImage

protected CSize m_sizeImage;


Constructor Detail

CToolBar

public CToolBar();

~CToolBar

public virtual ~CToolBar();


Method Detail

_GetButton

protected void _GetButton( int nIndex, TBBUTTON* pButton ) const;

_SetButton

protected void _SetButton( int nIndex, TBBUTTON* pButton );

AddReplaceBitmap

public BOOL AddReplaceBitmap( HBITMAP hbmImageWell );

CalcDynamicLayout

public virtual CSize CalcDynamicLayout( int nLength, DWORD nMode );

CalcFixedLayout

public virtual CSize CalcFixedLayout( BOOL bStretch, BOOL bHorz );

CalcLayout

protected CSize CalcLayout( DWORD nMode, int nLength =-1 );

CalcSize

protected CSize CalcSize( TBBUTTON* pData, int nCount );

CommandToIndex

public int CommandToIndex( UINT nIDFind ) const;

Create

public BOOL Create( CWnd* pParentWnd, DWORD dwStyle = WS_CHILD| WS_VISIBLE| CBRS_TOP, UINT nID = AFX_IDW_TOOLBAR );

CreateEx

public BOOL CreateEx( CWnd* pParentWnd, DWORD dwCtrlStyle = TBSTYLE_FLAT, DWORD dwStyle = WS_CHILD| WS_VISIBLE| CBRS_ALIGN_TOP, CRect rcBorders = CRect( 0, 0, 0, 0 ), UINT nID = AFX_IDW_TOOLBAR );

GetButtonInfo

public void GetButtonInfo( int nIndex, UINT& nID, UINT& nStyle, int& iImage ) const;

GetButtonStyle

public UINT GetButtonStyle( int nIndex ) const;

GetButtonText

public CString GetButtonText( int nIndex ) const;

GetButtonText

public void GetButtonText( int nIndex, CString& rString ) const;

GetItemID

public UINT GetItemID( int nIndex ) const;

GetItemRect

public virtual void GetItemRect( int nIndex, LPRECT lpRect ) const;

GetToolBarCtrl

public CToolBarCtrl& GetToolBarCtrl() const;

Layout

protected void Layout();

LoadBitmap

public BOOL LoadBitmap( LPCTSTR lpszResourceName );

LoadBitmap

public BOOL LoadBitmap( UINT nIDResource );

LoadToolBar

public BOOL LoadToolBar( LPCTSTR lpszResourceName );

LoadToolBar

public BOOL LoadToolBar( UINT nIDResource );

OnBarStyleChange

public virtual void OnBarStyleChange( DWORD dwOldStyle, DWORD dwNewStyle );

OnEraseBkgnd

protected afx_msg BOOL OnEraseBkgnd( CDC* pDC );

OnNcCalcSize

protected afx_msg void OnNcCalcSize( BOOL, NCCALCSIZE_PARAMS* );

OnNcCreate

protected afx_msg BOOL OnNcCreate( LPCREATESTRUCT );

OnNcHitTest

protected afx_msg UINT OnNcHitTest( CPoint );

OnNcPaint

protected afx_msg void OnNcPaint();

OnPaint

protected afx_msg void OnPaint();

OnPreserveZeroBorderHelper

protected afx_msg LRESULT OnPreserveZeroBorderHelper( WPARAM, LPARAM );

OnSetBitmapSize

protected afx_msg LRESULT OnSetBitmapSize( WPARAM, LPARAM );

OnSetButtonSize

protected afx_msg LRESULT OnSetButtonSize( WPARAM, LPARAM );

OnSetSizeHelper

protected LRESULT OnSetSizeHelper( CSize& size, LPARAM lParam );

OnSysColorChange

protected afx_msg void OnSysColorChange();

OnToolHitTest

public virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const;

OnUpdateCmdUI

public virtual void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler );

OnWindowPosChanging

protected afx_msg void OnWindowPosChanging( LPWINDOWPOS );

SetBitmap

public BOOL SetBitmap( HBITMAP hbmImageWell );

SetButtonInfo

public void SetButtonInfo( int nIndex, UINT nID, UINT nStyle, int iImage );

SetButtons

public BOOL SetButtons( const UINT* lpIDArray, int nIDCount );

SetButtonStyle

public void SetButtonStyle( int nIndex, UINT nStyle );

SetButtonText

public BOOL SetButtonText( int nIndex, LPCTSTR lpszText );

SetHeight

public void SetHeight( int cyHeight );

SetOwner

public void SetOwner( CWnd* pOwnerWnd );

SetSizes

public void SetSizes( SIZE sizeButton, SIZE sizeImage );

SizeToolBar

protected void SizeToolBar( TBBUTTON* pData, int nCount, int nLength, BOOL bVert = FALSE );

WrapToolBar

protected int WrapToolBar( TBBUTTON* pData, int nCount, int nWidth );

 Overview   Project   Class   Tree   Index 
MFC Class Library
CppDoc v2.3.1
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD