Click here to Skip to main content
15,897,891 members
Articles / Desktop Programming / MFC

Gradient Menus in MFC

Rate me:
Please Sign up or sign in to vote.
4.76/5 (10 votes)
14 May 2000 240.3K   5.7K   64  
Create Popup menus in MFC with a gradient and text on the left side
// GrMenuTestView.h : interface of the CGrMenuTestView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GRMENUTESTVIEW_H__9EFD6B6F_2129_11D4_8767_00C04F490CE0__INCLUDED_)
#define AFX_GRMENUTESTVIEW_H__9EFD6B6F_2129_11D4_8767_00C04F490CE0__INCLUDED_

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


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

// Attributes
public:
	CGrMenuTestDoc* GetDocument();

// Operations
public:

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

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

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CGrMenuTestView)
	afx_msg void OnFile();
	afx_msg void OnEdit();
	afx_msg void OnHelp();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnFileNew1();
	afx_msg void OnFileOpen1();
	afx_msg void OnAppExit1();
	afx_msg void OnAppAbout1();
	afx_msg void OnTryme();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in GrMenuTestView.cpp
inline CGrMenuTestDoc* CGrMenuTestView::GetDocument()
   { return (CGrMenuTestDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_GRMENUTESTVIEW_H__9EFD6B6F_2129_11D4_8767_00C04F490CE0__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
Web Developer Golden Crater Corp
Canada Canada
Jim is the President of Golden Crater Corp. (formerly Golden Crater Software) which produces:

Tiny eBook Reader - Read eBooks anywhere, on any web enabled device or phone.

Doberman BMS - Home Automation and Building Management System bridging and enhancing several automation hardware platforms.

Comments and Discussions