Click here to Skip to main content
13,249,443 members (34,051 online)
Click here to Skip to main content


45 bookmarked
Posted 11 May 2004

MFC extension library - A plugin to handle owner drawn menus

, 11 May 2004
Continuation of the Plugin Architecture series
// DebugMenu.cpp : implementation file

#include "stdafx.h"
#include "odmenu.h"
#include "DebugMenu.h"

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

// CDebugMenu dialog

CDebugMenu::CDebugMenu(CWnd* pParent /*=NULL*/)
	: CDialog(CDebugMenu::IDD, pParent)
		// NOTE: the ClassWizard will add member initialization here

void CDebugMenu::DoDataExchange(CDataExchange* pDX)
	DDX_Control(pDX, IDC_ENABLED, m_enabledList);
	DDX_Control(pDX, IDC_DISABLED, m_disabledList);


// CDebugMenu message handlers
#ifdef _DEBUG
BOOL CDebugMenu::OnInitDialog() 
	m_enabledList.SetImageList(&CODMenu::m_buttonImages, LVSIL_SMALL);
	m_disabledList.SetImageList(&CODMenu::m_disabledImages, LVSIL_SMALL);

	m_enabledList.InsertColumn(0, "Images", LVCFMT_LEFT, 100);
	m_disabledList.InsertColumn(0, "Images", LVCFMT_LEFT, 100);

	// add an atem to each list control with each image
	for (int item = 0 ; item < CODMenu::m_buttonImages.GetImageCount() ; item++)
		m_enabledList.InsertItem(item, "Item", item);
		m_disabledList.InsertItem(item, "Item", item);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE

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.


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


About the Author

Roger Allen
Software Developer (Senior) Sirius Analytical Instruments
United Kingdom United Kingdom
A research and development programmer working for a pharmaceutical instrument company for the past 17 years.

I am one of those lucky people who enjoys his work and spends more time than he should either doing work or reseaching new stuff. I can also be found on playing DDO on the Cannith server (Send a tell to "Maetrim" who is my current main)

I am also a keep fit fanatic, doing cross country running and am seriously into [url][/url] Karate at this time of my life, training from 4-6 times a week and recently achieved my 1st Dan after 6 years.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171114.1 | Last Updated 12 May 2004
Article Copyright 2004 by Roger Allen
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid