Click here to Skip to main content
12,352,294 members (53,716 online)
Click here to Skip to main content

Stats

83.4K views
1.2K downloads
21 bookmarked
Posted

CIconDialog - Icon Selection Dialog

, 3 Mar 2000
A Freeware MFC dialog class to select an icon.
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (Ireland) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENI)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_EIRE
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif\r\n"
    "#include ""res\\IconDlgTest.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\IconDlgTest.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_ICONDLGTEST DIALOGEX 0, 0, 150, 73
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Test app for CIconDialog class"
FONT 8, "Arial", 0, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,36,52,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,93,52,50,14
    PUSHBUTTON      "Modify",IDC_SHOW,40,14,51,20
    ICON            IDR_MAINFRAME,IDC_SELECTED_ICON,16,15,21,20
END

IDD_CHOOSE_ICON DIALOG DISCARDABLE  0, 0, 211, 199
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Choose Icon"
FONT 8, "MS Sans Serif"
BEGIN
    LTEXT           "&File name:",IDC_STATIC,7,2,33,8
    EDITTEXT        IDC_FILENAME,7,13,197,14,ES_AUTOHSCROLL
    LTEXT           "&Current icon:",IDC_STATIC,7,34,41,8
    DEFPUSHBUTTON   "OK",IDOK,46,178,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,100,178,50,14
    PUSHBUTTON      "&Browse...",IDBROWSE,154,178,50,14
    LISTBOX         IDC_ICONLIST,7,46,197,125,LBS_OWNERDRAWFIXED | 
                    LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | 
                    LBS_DISABLENOSCROLL | WS_HSCROLL | WS_TABSTOP
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_ICONDLGTEST, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 143
        TOPMARGIN, 7
        BOTTOMMARGIN, 66
    END

    IDD_CHOOSE_ICON, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 204
        TOPMARGIN, 2
        BOTTOMMARGIN, 192
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDR_POPUP_ICON MENU DISCARDABLE 
BEGIN
    POPUP "_POPUP_"
    BEGIN
        MENUITEM "&Copy to clipboard",          ID_EDIT_COPY
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_ICO_FILTER          "Icon FiIes | *.ico;*.exe;*.dll|Programs |*.exe|Libraries |*.dll;*.ocx|Icons|*.ico|All Files|*.*||"
    IDS_ICO_CAPTION         "Choose Icon"
    IDS_NO_ICONS            "The file '%1' contains no icons"
    IDS_PLEASE_SELECT_ICON  "Please select an icon"
    IDS_NOT_A_FILE          "Cannot find the file '%1', Please select another file"
END

#endif    // English (Ireland) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "res\IconDlgTest.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

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 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

Share

About the Author

PJ Naughter
United States United States
No Biography provided

You may also be interested in...

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