Click here to Skip to main content
12,952,778 members (37,940 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.
Welcome to CIconDialog, A freeware MFC dialog class to select an icon. This is
based on the dialog that appears when you choose to change the icon for a 
shortcut in the Windows 95 / NT 4 shell. The actual appearance of the dialog is 
based on the new look dialog in IE4 PP2 which uses a larger list box to display
the icons. Have a look on my web site or run the supplied sample to see what it 
looks like.

Included is a simple dialog based application which shows how to use it. The 
class would be used in your application as follows:

  CIconDialog dlg(this);
  dlg.SetIcon(m_sFilename, m_nIconIndex);
  if (dlg.DoModal() == IDOK)
    dlg.GetIcon(m_sFilename, m_nIconIndex);

The variables m_sFilename and m_nIconIndex would be managed by your application.							   

To use CIconDialog in your project simply include icondlg.cpp, the 5 string 
resources and the dialog resource IDD_CHOOSE_ICON from the test application in 
your application. Then just #include "icondlg.h" in which ever class needs to 
use it.

Happy coding.


PJ Naughter
25th July 1997

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
Web01 | 2.8.170525.1 | Last Updated 4 Mar 2000
Article Copyright 2000 by PJ Naughter
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid