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

Bar Graph Control

, 5 Feb 2007
A useful bar graph control, derived from CStatic.
BarGraph_demo.zip
GraphTest_bin
GraphTest.exe
BarGraph_src.zip
GraphTest_src
GraphTest
GraphTest.clw
GraphTest.dsp
GraphTest.dsw
GraphTest.plg
res
GraphTest.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\\GraphTest.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\\GraphTest.ico"

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

IDD_ABOUTBOX DIALOG  0, 0, 235, 55
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About GraphTest"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20
    LTEXT           "GraphTest Version 1.0",IDC_STATIC,40,10,119,8,
                    SS_NOPREFIX
    LTEXT           "Copyright (C) 2003",IDC_STATIC,40,25,119,8
    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14,WS_GROUP
END

IDD_GRAPHTEST_DIALOG DIALOGEX 0, 0, 396, 212
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
    WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "GraphTest"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    PUSHBUTTON      "Cancel",IDCANCEL,339,191,50,14
    CONTROL         "",IDC_GRAPH,"Static",SS_GRAYRECT,7,7,272,169,
                    WS_EX_STATICEDGE
    COMBOBOX        IDC_SCALE_COMBO,307,21,66,42,CBS_DROPDOWNLIST | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    CONTROL         "Simulate",IDC_CHECK_SIMU,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,13,178,43,10
    DEFPUSHBUTTON   "OK",IDOK,275,191,50,14
    GROUPBOX        "Scale",IDC_STATIC,298,7,91,87
    LTEXT           "1 unit =",IDC_STATIC,303,73,24,8
    EDITTEXT        IDC_SCALE,328,71,17,12,ES_AUTOHSCROLL | ES_NUMBER
    PUSHBUTTON      "Set",IDC_SET_SCALE,359,71,20,13
    PUSHBUTTON      "^",IDC_MOVE_UP,281,7,11,13
    PUSHBUTTON      "v",IDC_MOVE_DOWN,281,162,11,13
    EDITTEXT        IDC_FROM,328,54,17,12,ES_AUTOHSCROLL | ES_NUMBER
    EDITTEXT        IDC_TO,361,54,17,12,ES_AUTOHSCROLL | ES_NUMBER
    LTEXT           "Display:",IDC_STATIC,304,41,26,8
    LTEXT           "From",IDC_STATIC,306,57,16,8
    LTEXT           "To",IDC_STATIC,347,57,10,8
    GROUPBOX        "Color",IDC_STATIC,298,98,91,76
    LTEXT           "Background:",IDC_STATIC,307,112,42,8
    PUSHBUTTON      "...",IDC_BGCOLOR,371,109,11,12
    CONTROL         "",IDC_STAT_BG,"Static",SS_BLACKRECT,353,111,12,9
    LTEXT           "Axis:",IDC_STATIC,307,127,16,8
    PUSHBUTTON      "...",IDC_AXCOLOR2,371,124,11,12
    CONTROL         "",IDC_STAT_AXS,"Static",SS_BLACKRECT,353,126,12,9
    LTEXT           "Text:",IDC_STATIC,307,142,17,8
    PUSHBUTTON      "...",IDC_TXTCOLOR3,371,140,11,12
    CONTROL         "",IDC_STAT_TXT,"Static",SS_BLACKRECT,353,142,12,9
    COMBOBOX        IDC_COMBO_BAR,324,156,27,96,CBS_DROPDOWNLIST | 
                    WS_VSCROLL | WS_TABSTOP
    PUSHBUTTON      "...",IDC_BARCOLOR,371,156,11,12
    CONTROL         "",IDC_STAT_BAR,"Static",SS_BLACKRECT,353,158,12,9
    LTEXT           "Bar:",IDC_STATIC,308,159,14,8
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", "GraphTest MFC Application"
            VALUE "FileVersion", "1, 0, 0, 1"
            VALUE "InternalName", "GraphTest"
            VALUE "LegalCopyright", "Copyright (C) 2003"
            VALUE "OriginalFilename", "GraphTest.EXE"
            VALUE "ProductName", "GraphTest 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, 48
    END

    IDD_GRAPHTEST_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 389
        TOPMARGIN, 7
        BOTTOMMARGIN, 205
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//

IDD_GRAPHTEST_DIALOG DLGINIT
BEGIN
    IDC_SCALE_COMBO, 0x403, 13, 0
0x6543, 0x746e, 0x2069, 0x656d, 0x6574, 0x7372, "\000" 
    IDC_SCALE_COMBO, 0x403, 7, 0
0x6e49, 0x6863, 0x7365, "\000" 
    0
END


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

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

#endif    // English (U.S.) 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\GraphTest.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

Shaibujan
Team Leader
India India
Mr. Shaibujan has got 9+ yrs of programming experience in C/C++, on various domains like Cryptography, Biometric Security, Network Security, Pattern Recognition, Image Processing, MPEG2, MPEG4, H.264, AAC etc.

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 6 Feb 2007
Article Copyright 2007 by Shaibujan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid