This article implements
TabedReBar control similar to
CReBar which displays bars via Tab control. The main propose of the
TabedReBar control is reducing space of the MainFrame window by collecting several bars in one
TabedReBar. Each bar (ToolBar, StatusBar, DialogBar etc.) added in
TabedReBar is separated by a Tab.
CBHTabedReBar is derived from
CControlBar and contains the following methods and data members:
void DrawGripper(CDC* pDC);
BOOL AddBar(CControlBar*pBar,LPCTSTR pszText = NULL);
CTabCtrl& GetTabCtrl() const;
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnTabSelChange(NMHDR* pNMHDR, LRESULT* pResult) ;
afx_msg void OnWindowPosChanged(WINDOWPOS* lpwndpos);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
virtual BOOL Create( CWnd* pParentWnd,
DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP,
UINT nID = AFX_IDW_TABED_REBAR);
virtual CSize CalcFixedLayout( BOOL bStretch, BOOL bHorz );
virtual void DoPaint(CDC* pDC);
CList <TCB_ITEM *,TCB_ITEM *> m_Bars;
CBHTabedReBar class supports docking (top, bottom from now) and floating features. Define
CBHTabedReBar class object on the same way as you define
In MainFrm.h, declare variable
In MainFrm.cpp, in
OnCreate message member after creation of ToolBars, DialogBar etc., add code similar to this:
int CMainFrame:: OnCreate(LPCREATESTRUCT lpCreateStruct)
CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
m_images.Create(IDB_TABIMAGES, 16, 1, RGB(255,0,255));
- 220.127.116.11 June 5. 2004, First release version.
Bahrudin Hrnjica holds a Ph.D. degree in Technical Science/Engineering from University in Bihać.
Besides teaching at University, he is in the software industry for more than two decades, focusing on development technologies e.g. .NET, Visual Studio, Desktop/Web/Cloud solutions.
He works on the development and application of different ML algorithms. In the development of ML-oriented solutions and modeling, he has more than 10 years of experience. His field of interest is also the development of predictive models with the ML.NET and Keras, but also actively develop two ML-based .NET open source projects: GPdotNET-genetic programming tool and ANNdotNET - deep learning tool on .NET platform. He works in multidisciplinary teams with the mission of optimizing and selecting the ML algorithms to build ML models.
He is the author of several books, and many online articles, writes a blog at http://bhrnjica.net, regularly holds lectures at local and regional conferences, User groups and Code Camp gatherings, and is also the founder of the Bihac Developer Meetup Group. Microsoft recognizes his work and awarded him with the prestigious Microsoft MVP title for the first time in 2011, which he still holds today.