Click here to Skip to main content
15,896,730 members
Articles / Desktop Programming / MFC

Creating Flyout Toolbars

Rate me:
Please Sign up or sign in to vote.
4.88/5 (9 votes)
31 Oct 20013 min read 183K   5.3K   50  
Attach a sub-toolbar/s to another toolbar's button/s. The sub-toolbar will popup if the user clicks on that button a little bit longer
// FOToolBar_SampleView.h : interface of the CFOToolBar_SampleView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_FOTOOLBAR_SAMPLEVIEW_H__7E364655_79B1_4F04_AB1F_75E262207815__INCLUDED_)
#define AFX_FOTOOLBAR_SAMPLEVIEW_H__7E364655_79B1_4F04_AB1F_75E262207815__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CFOToolBar_SampleView : public CView
{
protected: // create from serialization only
	CFOToolBar_SampleView();
	DECLARE_DYNCREATE(CFOToolBar_SampleView)

// Attributes
public:
	CFOToolBar_SampleDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFOToolBar_SampleView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CFOToolBar_SampleView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFOToolBar_SampleView)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in FOToolBar_SampleView.cpp
inline CFOToolBar_SampleDoc* CFOToolBar_SampleView::GetDocument()
   { return (CFOToolBar_SampleDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FOTOOLBAR_SAMPLEVIEW_H__7E364655_79B1_4F04_AB1F_75E262207815__INCLUDED_)

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


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

Comments and Discussions