Click here to Skip to main content
15,884,836 members
Articles / Desktop Programming / MFC

Menu Bitmaps from Minimal Source Code

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
1 Feb 2002CPOL2 min read 235.2K   3.3K   53  
Add bitmaps to your menus easily and with very little source code.
// BmpMenuDoc.cpp : implementation of the CBmpMenuDoc class
//

#include "stdafx.h"
#include "BmpMenu.h"

#include "BmpMenuDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBmpMenuDoc

IMPLEMENT_DYNCREATE(CBmpMenuDoc, CDocument)

BEGIN_MESSAGE_MAP(CBmpMenuDoc, CDocument)
	//{{AFX_MSG_MAP(CBmpMenuDoc)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBmpMenuDoc construction/destruction

CBmpMenuDoc::CBmpMenuDoc()
{
}

CBmpMenuDoc::~CBmpMenuDoc()
{
}

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CBmpMenuDoc serialization

void CBmpMenuDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
	}
	else
	{
	}
}

/////////////////////////////////////////////////////////////////////////////
// CBmpMenuDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CBmpMenuDoc 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


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

Comments and Discussions