Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Versatile Tree Control

, 18 Feb 2013 CPOL
Tree control with custom checkbox with several other features.
CustomTreeCtrl.zip
CustomTreeCtrl.exe
CustomTreeCtrlCode.zip
CustomTreeCtrl
1.bmp
2.bmp
CustomTreeCtrl.aps
CustomTreeCtrl.clw
CustomTreeCtrl.dsp
CustomTreeCtrl.dsw
CustomTreeCtrl.opt
CustomTreeCtrl.plg
CustomTreeCtrl.suo
CustomTreeCtrl.vcproj.DEPIND01.nuvsoft31.user
nodrop.cur
res
bitmap1.bmp
bitmap_c.bmp
bitmap_d.bmp
bitmap_e.bmp
bitmap_f.bmp
bitmap_h.bmp
bitmap_m.bmp
bitmap_u.bmp
bmp00003.bmp
bmp00004.bmp
bmp00005.bmp
bmp00006.bmp
bmp00007.bmp
bmp00008.bmp
bmp00009.bmp
bmp00010.bmp
CustomTreeCtrl.ico
icon1.ico
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

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

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

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

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

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

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

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

3 TEXTINCLUDE 
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 //_WIN32\r\n"
    "#include ""res\\CustomTreeCtrl.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\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.
IDR_MAINFRAME           ICON                    "res\\CustomTreeCtrl.ico"

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

IDD_ABOUTBOX DIALOGEX 0, 0, 235, 54
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About CustomTreeCtrl"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,21,20
    LTEXT           "CustomTreeCtrl Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
    LTEXT           "Copyright (C) 2008",IDC_STATIC,40,25,119,8
    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14,WS_GROUP
    EDITTEXT        IDC_EDIT1,143,24,63,14,ES_AUTOHSCROLL | NOT WS_BORDER
END

IDD_CUSTOMTREECTRL_DIALOG DIALOGEX 0, 0, 309, 281
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "CustomTreeCtrl"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,201,254,37,14
    PUSHBUTTON      "Cancel",IDCANCEL,242,254,50,14
    CONTROL         "Tree1",IDC_TREE_PROJECT,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,19,20,176,228
    LISTBOX         IDC_LIST_SELECTED,199,29,92,112,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
    LISTBOX         IDC_LIST_CHECKED,199,154,91,95,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
    LTEXT           "Selected Items",IDC_STATIC,200,19,48,8
    LTEXT           "Checked Items",IDC_STATIC,199,143,48,8
    CONTROL         "Expand Tree",IDC_EXPAND_TREE,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,140,256,57,11
END

IDD_DIALOG_ITEMNAME DIALOG  0, 0, 146, 57
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Item Name"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,15,36,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,74,36,50,14
    LTEXT           "Name:",IDC_STATIC,15,17,25,12,WS_DISABLED
    EDITTEXT        IDC_EDIT_NAME,41,15,78,15,ES_AUTOHSCROLL
END


/////////////////////////////////////////////////////////////////////////////
//
// 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 "040904B0"
        BEGIN
            VALUE "FileDescription", "CustomTreeCtrl MFC Application"
            VALUE "FileVersion", "1, 0, 0, 1"
            VALUE "InternalName", "CustomTreeCtrl"
            VALUE "LegalCopyright", "Copyright (C) 2008"
            VALUE "OriginalFilename", "CustomTreeCtrl.EXE"
            VALUE "ProductName", "CustomTreeCtrl Application"
            VALUE "ProductVersion", "1, 0, 0, 1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END


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

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

    IDD_CUSTOMTREECTRL_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 302
        TOPMARGIN, 7
        BOTTOMMARGIN, 274
    END

    IDD_DIALOG_ITEMNAME, DIALOG
    BEGIN
        LEFTMARGIN, 6
        RIGHTMARGIN, 139
        TOPMARGIN, 7
        BOTTOMMARGIN, 50
    END
END
#endif    // APSTUDIO_INVOKED


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

IDB_BITMAP_CHECK_16     BITMAP                  "res\\bitmap_c.bmp"
IDB_BITMAP_EMPTY        BITMAP                  "res\\bitmap_e.bmp"
IDB_BITMAP_FOLDER_16    BITMAP                  "res\\bitmap_f.bmp"
IDB_BITMAP_FOLDER_OPEN_16 BITMAP                  "res\\bmp00004.bmp"
IDB_BITMAP_HEAD_16      BITMAP                  "res\\bitmap_h.bmp"
IDB_BITMAP_MANAGER_16   BITMAP                  "res\\bitmap_m.bmp"
IDB_BITMAP_UNCHECK      BITMAP                  "res\\bitmap_u.bmp"
IDB_BITMAP_UNCHECK_MASK BITMAP                  "res\\bmp00008.bmp"
IDB_BITMAP_CHECK_32     BITMAP                  "res\\bmp00009.bmp"
IDB_BITMAP_FOLDER_32    BITMAP                  "res\\bmp00003.bmp"
IDB_BITMAP_FOLDER_OPEN_32 BITMAP                  "res\\bmp00005.bmp"
IDB_BITMAP_HEAD_32      BITMAP                  "res\\bmp00006.bmp"
IDB_BITMAP_MANAGER_32   BITMAP                  "res\\bmp00007.bmp"

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

IDR_CONTEXT_MENU MENU 
BEGIN
    POPUP "POPUP"
    BEGIN
        MENUITEM "Bold",                        IDM_BOLDITEM
        MENUITEM "Insert After",                IDM_INSERT_AFTER
        MENUITEM "Insert Before",               IDM_INSERT_BEFORE
        MENUITEM "Set Color",                   IDM_COLOR
        MENUITEM "Delete",                      IDM_DELETE
        MENUITEM "Add Chkbox",                  IDM_ADDCHECKBOX
        MENUITEM "Disable",                     IDM_DISABLE
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// Cursor
//

IDC_NODROP              CURSOR                  "nodrop.cur"

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

STRINGTABLE 
BEGIN
    IDS_ABOUTBOX            "&About CustomTreeCtrl..."
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// English (U.S.) (unknown sub-lang: 0x10) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENN)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, 0x10
#pragma code_page(1252)
#endif //_WIN32

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

IDB_BITMAP_NVIDIA       BITMAP                  "res\\bitmap1.bmp"
#endif    // English (U.S.) (unknown sub-lang: 0x10) 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 //_WIN32
#include "res\CustomTreeCtrl.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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Babu_Abdulsalam
Software Developer
India India
I'm working as Senior software Engineer since 7 years and interested in MFC and COM programming.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150123.1 | Last Updated 19 Feb 2013
Article Copyright 2013 by Babu_Abdulsalam
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid