Click here to Skip to main content
15,891,136 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.2K   5.7K   64  
Create Popup menus in MFC with a gradient and text on the left side
// GrMenuTestDoc.cpp : implementation of the CGrMenuTestDoc class
//

#include "stdafx.h"
#include "GrMenuTest.h"

#include "GrMenuTestDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CGrMenuTestDoc

IMPLEMENT_DYNCREATE(CGrMenuTestDoc, CDocument)

BEGIN_MESSAGE_MAP(CGrMenuTestDoc, CDocument)
	//{{AFX_MSG_MAP(CGrMenuTestDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGrMenuTestDoc construction/destruction

CGrMenuTestDoc::CGrMenuTestDoc()
{
	// TODO: add one-time construction code here

}

CGrMenuTestDoc::~CGrMenuTestDoc()
{
}

BOOL CGrMenuTestDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CGrMenuTestDoc serialization

void CGrMenuTestDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CGrMenuTestDoc diagnostics

#ifdef _DEBUG
void CGrMenuTestDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CGrMenuTestDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CGrMenuTestDoc commands

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