Click here to Skip to main content
13,045,422 members (70,331 online)
Click here to Skip to main content


21 bookmarked
Posted 3 Mar 2000

CIconDialog - Icon Selection Dialog

, 3 Mar 2000
A Freeware MFC dialog class to select an icon.
Module : ICONDLG.H
Purpose: Interface for an MFC class for an Icon Picker dialog similar to 
         the version found in Internet Explorer 4 PP2
Created: PJN / ICONDLG/1 / 25-07-1997
History: None

Copyright (c) 1997 by PJ Naughter.  
All rights reserved.


////////////////////////////////// Macros ///////////////////////////
#ifndef __ICONDLG_H__
#define __ICONDLG_H__

/////////////////////////////////  Includes  //////////////////////////////////
#include "resource.h"

/////////////////////////////////  Classes ////////////////////////////////////
class CIconDialog : public CDialog
	CIconDialog(CWnd* pParent = NULL);

  BOOL SetIcon(const CString& sFilename, int nIndex);
  void GetIcon(CString& sFilename, int& nIconIndex);

	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	enum { IDD = IDD_CHOOSE_ICON };
	CListBox m_ctrlIconList;
	CString	m_sFilename;
	int		m_nIconIndex;

	afx_msg void OnBrowse();
	afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	afx_msg void OnDestroy();
	virtual void OnOK();
	afx_msg void OnDblclkIconlist();
	virtual BOOL OnInitDialog();

  void UpdateIconList();

#endif //__ICONDLG_H__

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

PJ Naughter
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 4 Mar 2000
Article Copyright 2000 by PJ Naughter
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid