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

CTreePropSheet - A Netscape/Visual Studio .NET like Preferences Dialog

Rate me:
Please Sign up or sign in to vote.
4.94/5 (144 votes)
6 Mar 20038 min read 979.6K   12.4K   327  
This framework introduces a property sheet, based on the original Windows property sheet (derived from CPropertySheet) which uses a tree control to browse the pages instead of a tab control
//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

/////////////////////////////////////////////////////////////////////////////
// Neutral resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// 24
//

1                       24      MOVEABLE PURE   "res\\TreePropSheetDemo.exe.manifest"

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

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

#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040704b0"
        BEGIN
            VALUE "Comments", "\0"
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "MFC-Anwendung TreePropSheetDemo\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "TreePropSheetDemo\0"
            VALUE "LegalCopyright", "Copyright (C) 2002 Sven Wiegand\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "TreePropSheetDemo.EXE\0"
            VALUE "PrivateBuild", "\0"
            VALUE "ProductName", "Anwendung TreePropSheetDemo\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
            VALUE "SpecialBuild", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x407, 1200
    END
END

#endif    // !_MAC

#endif    // Neutral resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// Deutsch (Deutschland) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#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_DEU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 7, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif //_WIN32\r\n"
    "#include ""res\\TreePropSheetDemo.rc2""  // Nicht mit Microsoft Visual C++ bearbeitete Ressourcen\r\n"
    "#include ""l.deu\\afxres.rc""          // Standardkomponenten\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


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

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

/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//

IDB_DEFAULT             BITMAP  DISCARDABLE     "res\\bitmap1.bmp"
IDB_IMAGES              BITMAP  DISCARDABLE     "res\\images.bmp"
#endif    // Deutsch (Deutschland) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// Englisch (USA) resources

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

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

IDD_ABOUTBOX DIALOG DISCARDABLE  0, 0, 235, 54
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Info �ber TreePropSheetDemo"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,21,20
    LTEXT           "TreePropSheetDemo Version 1.0",IDC_STATIC,40,10,119,8,
                    SS_NOPREFIX
    LTEXT           "Copyright (C) 2002",IDC_STATIC,40,25,119,8
    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14,WS_GROUP
END

IDD_PROPPAGE_INCOMING DIALOG DISCARDABLE  0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Server::Incoming"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Server",IDC_STATIC,5,5,225,65,WS_GROUP
    LTEXT           "&Name:",IDC_STATIC,10,17,22,8
    EDITTEXT        IDC_EDIT3,40,15,185,12,ES_AUTOHSCROLL
    LTEXT           "Type:",IDC_STATIC,10,35,19,8
    CONTROL         "P&OP3",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | 
                    WS_TABSTOP,40,35,35,10
    CONTROL         "&IMAP",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,85,35,33,
                    10
    GROUPBOX        "User",IDC_STATIC,5,75,225,60,WS_GROUP
    LTEXT           "A&ccount:",IDC_STATIC,10,88,30,8
    EDITTEXT        IDC_EDIT4,50,85,175,12,ES_AUTOHSCROLL
    LTEXT           "&Password:",IDC_STATIC,10,103,34,8
    EDITTEXT        IDC_EDIT5,50,100,175,12,ES_UPPERCASE | ES_PASSWORD | 
                    ES_AUTOHSCROLL
    CONTROL         "&Remember Password",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,50,120,83,10
    LTEXT           "Por&t:",IDC_STATIC,40,53,16,8
    EDITTEXT        IDC_EDIT6,60,50,25,12,ES_RIGHT | ES_AUTOHSCROLL
END

IDD_PROPPAGE_OUTGOING DIALOG DISCARDABLE  0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Server::Outgoing"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Server (SMTP)",IDC_STATIC,5,5,225,70,BS_LEFT | WS_GROUP
    LTEXT           "&Name:",IDC_STATIC,10,17,22,8
    EDITTEXT        IDC_EDIT3,40,15,185,12,ES_AUTOHSCROLL
    LTEXT           "Por&t:",IDC_STATIC,10,31,16,8
    EDITTEXT        IDC_EDIT6,40,30,25,12,ES_RIGHT | ES_AUTOHSCROLL
    LTEXT           "Use &Secure Connection:",IDC_STATIC,10,44,78,8
    CONTROL         "Never",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | 
                    WS_TABSTOP,20,60,35,10
    CONTROL         "When available",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,
                    65,60,65,10
    CONTROL         "Always",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,140,60,
                    38,10
    GROUPBOX        "User",IDC_STATIC,5,80,225,70,WS_GROUP
    CONTROL         "&Use Name and Password",IDC_CHECK1,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,10,90,96,10
    LTEXT           "A&ccount:",IDC_STATIC,20,107,30,8
    EDITTEXT        IDC_EDIT4,55,105,170,12,ES_AUTOHSCROLL
    LTEXT           "&Password:",IDC_STATIC,20,122,34,8
    EDITTEXT        IDC_EDIT5,55,120,170,12,ES_UPPERCASE | ES_PASSWORD | 
                    ES_AUTOHSCROLL
    CONTROL         "&Remember Password",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,55,135,83,10
END

IDD_PROPPAGE_APPEARANCE DIALOGEX 0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
EXSTYLE WS_EX_TRANSPARENT
CAPTION "Appearance"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Toolbars",IDC_STATIC,5,5,225,55
    CONTROL         "Show &tool tips on toolbars",IDC_CHECK1,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,10,15,215,10
    CONTROL         "Show shortcut &keys in tool tip",IDC_CHECK2,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,30,205,10
    CONTROL         "&Large Icons",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,10,45,215,10
    GROUPBOX        "Personalized Menus and Toolbars",IDC_STATIC,5,65,225,65
    CONTROL         "Me&nus show recently used commands at first",IDC_CHECK4,
                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,75,215,10
    CONTROL         "Show f&ull menus after a short delay",IDC_CHECK5,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,90,205,10
    PUSHBUTTON      "&Reset my usage data",IDC_BUTTON1,10,110,75,14
END

IDD_PROPPAGE_FORMATVIEW DIALOG DISCARDABLE  0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Message Format::View"
FONT 8, "MS Sans Serif"
BEGIN
    LTEXT           "Use this font when displaying plain text messages:",
                    IDC_STATIC,5,5,158,8
    CONTROL         "&Fixed width font",IDC_RADIO1,"Button",
                    BS_AUTORADIOBUTTON | WS_TABSTOP,5,15,65,10
    CONTROL         "&Variable width font",IDC_RADIO2,"Button",
                    BS_AUTORADIOBUTTON,5,30,74,10
    CONTROL         "&Wrap text to fit window size",IDC_CHECK1,"Button",
                    BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,5,60,102,10
END

IDD_PROPPAGE_FORMATCOMPOSE DIALOG DISCARDABLE  0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Message Format::Composition"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "&Automatically quote the original message when replying",
                    IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,5,189,
                    10
    LTEXT           "Create Messages as",IDC_STATIC,5,30,65,8
    CONTROL         "&Plain text",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | 
                    WS_TABSTOP,5,40,45,10
    CONTROL         "&Formated text (HTML)",IDC_RADIO2,"Button",
                    BS_AUTORADIOBUTTON,5,55,85,10
    LTEXT           "&Wrap plain text messages at",IDC_STATIC,5,80,90,8
    EDITTEXT        IDC_EDIT1,100,78,15,12,ES_RIGHT | ES_AUTOHSCROLL | 
                    ES_NUMBER
    LTEXT           "characters",IDC_STATIC,120,80,34,8
END


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

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_ABOUTBOX, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 228
        TOPMARGIN, 7
        BOTTOMMARGIN, 47
    END
END
#endif    // APSTUDIO_INVOKED


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

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_ABOUTBOX            "Inf&o about TreePropSheetDemo..."
END

#endif    // Englisch (USA) 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_DEU)
#ifdef _WIN32
LANGUAGE 7, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\TreePropSheetDemo.rc2"  // Nicht mit Microsoft Visual C++ bearbeitete Ressourcen
#include "l.deu\afxres.rc"          // Standardkomponenten
#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


Written By
Web Developer
Germany Germany
Sven Wiegand (1976), IT professional living in Berlin (Germany), develops open source software in his free time. His most successfull project is the LaTeX IDE TeXnicCenter which is distributed under the terms of the GNU-GPL and has more than 100,000 users all about the world.

"The picture shows me with my racing bike on the top of the Roque de los Muchachos (2426m) - the highest point of the canarian island La Palma."

Comments and Discussions