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

A Powerful Ownerdraw Menu

Rate me:
Please Sign up or sign in to vote.
4.92/5 (33 votes)
23 Oct 20012 min read 732.6K   9K   111  
An XP-style ownerdrawn menu with support for background images and icon shadow
// MenuXPAppDoc.h : interface of the CMenuXPAppDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MENUXPAPPDOC_H__F90EEEA0_D5B3_4825_8840_230B6CB0745A__INCLUDED_)
#define AFX_MENUXPAPPDOC_H__F90EEEA0_D5B3_4825_8840_230B6CB0745A__INCLUDED_

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


class CMenuXPAppDoc : public CDocument
{
protected: // create from serialization only
	CMenuXPAppDoc();
	DECLARE_DYNCREATE(CMenuXPAppDoc)

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMenuXPAppDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

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

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMenuXPAppDoc)
		// 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()
};

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

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

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