Click here to Skip to main content
15,885,244 members
Articles / Desktop Programming / MFC

A ToolBarCtrl Based Menubar Control

Rate me:
Please Sign up or sign in to vote.
4.85/5 (19 votes)
3 Dec 20011 min read 212.1K   4.3K   67  
A ToolBarCtrl based menubar control using CMenuXP
// MenuBarXPAppDlg.h : header file
//

#if !defined(AFX_MENUBARXPAPPDLG_H__4DD5805F_B928_4154_B644_A58D8AC4711D__INCLUDED_)
#define AFX_MENUBARXPAPPDLG_H__4DD5805F_B928_4154_B644_A58D8AC4711D__INCLUDED_

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

#include "MenuXP.h"
#include "MenuBarXP.h"
#include "ToolBarXP.h"
/////////////////////////////////////////////////////////////////////////////
// CMenuBarXPAppDlg dialog

class CMenuBarXPAppDlg : public CDialog
{
// Construction
public:
	CMenuBarXPAppDlg(CWnd* pParent = NULL);	// standard constructor

	CMenuBarXP	m_wndMenuBar;
	CReBarCtrl	m_wndReBar;
	CToolBarXP	m_wndToolBar;

	CMenuXP		*CreateMenuXP(void);

// Dialog Data
	//{{AFX_DATA(CMenuBarXPAppDlg)
	enum { IDD = IDD_MENUBARXPAPP_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMenuBarXPAppDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMenuBarXPAppDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_MENUBARXPAPPDLG_H__4DD5805F_B928_4154_B644_A58D8AC4711D__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.


Written By
China China
I'm a chinese programer living in Shanghai, currently working for a software company whose main business is to deliver computer based testing. Software simulation for computer based testing and certifications is my main responsibility in this company. Execpt for software development, I like out-door activities and photography. I am willing to make friends in China and all over the world, so contact me if you have anything in common with meSmile | :)

Comments and Discussions