Click here to Skip to main content
15,886,110 members
Articles / Desktop Programming / MFC

CRadioListBox: A ListBox with Radio Buttons (MFC version)

Rate me:
Please Sign up or sign in to vote.
4.79/5 (16 votes)
22 Dec 2007CPOL2 min read 132.9K   4.3K   54  
How to implement an owner-drawn ListBox with radio buttons instead of standard selection highlight
// CRadioListBoxTest.h : main header file for the CRADIOLISTBOXTEST application
//

#if !defined(AFX_CRADIOLISTBOXTEST_H__1CA61AC1_A401_4FF0_80D5_5A6A9B271C8C__INCLUDED_)
#define AFX_CRADIOLISTBOXTEST_H__1CA61AC1_A401_4FF0_80D5_5A6A9B271C8C__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols

/////////////////////////////////////////////////////////////////////////////
// CCRadioListBoxTestApp:
// See CRadioListBoxTest.cpp for the implementation of this class
//

class CCRadioListBoxTestApp : public CWinApp
{
public:
	CCRadioListBoxTestApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCRadioListBoxTestApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CCRadioListBoxTestApp)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


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

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

#endif // !defined(AFX_CRADIOLISTBOXTEST_H__1CA61AC1_A401_4FF0_80D5_5A6A9B271C8C__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.

License

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


Written By
Architect
Peru Peru


Computer Electronics professional, Software Architect and senior Windows C++ and C# developer with experience in many other programming languages, platforms and application areas including communications, simulation systems, PACS/DICOM (radiology), GIS, 3D graphics and HTML5-based web applications.
Currently intensively working with Visual Studio and TFS.

Comments and Discussions