Click here to Skip to main content
15,886,806 members
Articles / Desktop Programming / MFC

Pinnable ControlBar

Rate me:
Please Sign up or sign in to vote.
4.81/5 (28 votes)
4 Dec 2003CPOL1 min read 187.2K   3.6K   65  
This article is based on Cristi Posea's CSizeControlBar
class CMyBar : public CPinDockBar
{
// Construction
public:
	CMyBar();

// Attributes
public:
	CTabCtrl m_tabctrl;
	CImageList m_ImgList;
	CTreeCtrl m_Tree;
	CListBox m_List;
	CEdit m_Edit;
	// Operations
	void AddToDrawBar(CAutoHideBar * pDrawBar);
	void RemoveFromDrawBar(CAutoHideBar * pDrawBar);
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyBar)
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMyBar();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyBar)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	afx_msg void OnTabSelChange(NMHDR* pNMHDR, LRESULT* pResult);
	DECLARE_MESSAGE_MAP()
};


class CMyBar2 : public CPinDockBar
{
// Construction
public:
	CMyBar2();

// Attributes
public:
	CListBox m_List;
	// Operations
	void AddToDrawBar(CAutoHideBar * pDrawBar);
	void RemoveFromDrawBar(CAutoHideBar * pDrawBar);
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyBar2)
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMyBar2();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyBar)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions