Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

MFC extension library - A plugin to handle owner drawn menus

, 11 May 2004 CPOL
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__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDebugMenu dialog


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


void CDebugMenu::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDebugMenu)
	DDX_Control(pDX, IDC_ENABLED, m_enabledList);
	DDX_Control(pDX, IDC_DISABLED, m_disabledList);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDebugMenu, CDialog)
	//{{AFX_MSG_MAP(CDebugMenu)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDebugMenu message handlers
#ifdef _DEBUG
BOOL CDebugMenu::OnInitDialog() 
{
	CDialog::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
}
#endif

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)

Share

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]http://www.ryushinkan.co.uk/[/url] Karate at this time of my life, training from 4-6 times a week and recently achieved my 1st Dan after 6 years.

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