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

CButtonST v3.9 (MFC Flat buttons)

, 28 Mar 2003
A fully featured owner-draw button class - it's got the lot!
cbuttonst-beta.zip
cbuttonst26_demo.zip
CButtonST_demo.clw
CButtonST_demo.dsp
CButtonST_demo.dsw
FILE_ID.DIZ
res
32x32x16_About.ico
32x32x16_Cancel.ico
32x32x16_CancelBor.ico
32x32x16_Exit.ico
32x32x16_Explore.ico
32x32x16_Info.ico
32x32x16_Left.ico
32x32x16_Ok.ico
32x32x16_OkBor.ico
32x32x16_Question.ico
32x32x16_Right.ico
32x32x16_Screw.ico
32x32x16_Text.ico
32x32x16_View.ico
32x32x256_Baloon.ico
32x32x256_Cancel.ico
32x32x256_CDGold.ico
32x32x256_Hand.ico
32x32x256_Lamp.ico
32x32x256_Ok.ico
32x32x256_Zip.ico
32x32x256_ZipSmall.ico
32x32x2_CancelBor.ico
32x32x2_Lamp.ico
32x32x2_OkBor.ico
CButtonST_demo.ico
hand.cur
Release
TransparentCButtonST_demo.exe
CButtonST_demo.exe
cbuttonst26_src.zip
cbuttonst31_demo.zip
CButtonST_Demo.aps
CButtonST_Demo.clw
CButtonST_Demo.dsp
CButtonST_Demo.dsw
CButtonST_Demo.ncb
CButtonST_Demo.opt
CButtonST_Demo.exe
About.ico
Baloon.ico
BmpBack.bmp
Cancel1_32x32x16.ico
Cancel4_32x32x2.ico
Cannibal.bmp
CButtonST_Demo.ico
CDRom.ico
Eagle.bmp
EOapp.ico
Explorer.ico
Face.bmp
Halloween1.ico
Halloween2.ico
Hand.cur
Help.ico
JPEG Image.ico
Key manager.ico
Lamp1.ico
Lamp2.ico
LedOff.ico
LedOn.ico
Left2_32x32x16.ico
LogOff.ico
Ok1_32x32x16.ico
Ok4_32x32x2.ico
Open.ico
Palette.bmp
Right2_32x32x16.ico
Run.ico
Search1.ico
Search2.ico
Sky.bmp
Sound.ico
STLogo_Small.bmp
Tools4.ico
Web2.ico
Winzip1.ico
Winzip2.ico
Workgroup.ico
cbuttonst31_src.zip
CButtonST31_src
cbuttonst32_demo.zip
CButtonST_Demo.aps
CButtonST_Demo.clw
CButtonST_Demo.dsp
CButtonST_Demo.dsw
CButtonST_Demo.opt
CButtonST_Demo.exe
About.ico
Baloon.ico
BmpBack.bmp
Cancel1_32x32x16.ico
Cancel3_32x32x256.ico
Cancel4_32x32x2.ico
Cannibal.bmp
CButtonST_Demo.ico
CDRom.ico
Eagle.bmp
EOapp.ico
Explorer.ico
Face.bmp
Halloween1.ico
Halloween2.ico
Hand.cur
Help.ico
Help2_32x32x256.ico
IEDocument_48x48x256.ico
JPEG Image.ico
Key manager.ico
Lamp1.ico
Lamp2.ico
LedOff.ico
LedOn.ico
Left2_32x32x16.ico
LogOff.ico
Ok1_32x32x16.ico
Ok3_32x32x256.ico
Ok4_32x32x2.ico
Open.ico
Palette.bmp
Razor_32x32x256.ico
Right2_32x32x16.ico
Run.ico
Search1.ico
Search2.ico
Sky.bmp
Sound.ico
STLogo_Small.bmp
Tools4.ico
Web2.ico
Winzip1.ico
Winzip2.ico
Workgroup.ico
cbuttonst32_src.zip
cbuttonst_demo.zip
CButtonST_Demo.clw
CButtonST_Demo.dsp
CButtonST_Demo.dsw
CButtonST_Demo.opt
CButtonST_Demo.exe
About.ico
Baloon.ico
BmpBack.bmp
Butterfly.ico
Button.bmp
Cancel1_32x32x16.ico
Cancel3_32x32x256.ico
Cancel4_32x32x2.ico
Cannibal.bmp
CButtonST_Demo.ico
CDRom.ico
Classes1_32x32x16.ico
EOapp.ico
Explorer.ico
Face.bmp
Halloween1.ico
Halloween2.ico
Hand.cur
Help.ico
Help2_32x32x256.ico
Hover.wav
IEDocument_48x48x256.ico
JPEG Image.ico
Key manager.ico
Lamp1.ico
LedOff.ico
LedOn.ico
Left6_32x32x256.ico
LogOff.ico
No3_32x32x256.ico
Ok3_32x32x256.ico
Open.ico
Razor_32x32x256.ico
Right6_32x32x256.ico
Run.ico
Search1.ico
Sky.bmp
Sound.ico
Start.wav
STLogo_Small.bmp
toolbar.bmp
Tools4.ico
Web2.ico
Winzip1.ico
Workgroup.ico
cbuttonst_src.zip
//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

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

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_CANCEL1             ICON    DISCARDABLE     "res\\Cancel1_32x32x16.ico"
IDI_CANCEL4             ICON    DISCARDABLE     "res\\Cancel4_32x32x2.ico"
IDI_EOAPP               ICON    DISCARDABLE     "res\\EOapp.ico"
IDI_HALLOWEEN1          ICON    DISCARDABLE     "res\\Halloween1.ico"
IDI_HALLOWEEN2          ICON    DISCARDABLE     "res\\Halloween2.ico"
IDI_KEYMANAGER          ICON    DISCARDABLE     "res\\Key manager.ico"
IDI_SOUND               ICON    DISCARDABLE     "res\\Sound.ico"
IDI_LAMP1               ICON    DISCARDABLE     "res\\Lamp1.ico"
IDI_ZIP1                ICON    DISCARDABLE     "res\\Winzip1.ico"
IDI_JPEG                ICON    DISCARDABLE     "res\\JPEG Image.ico"
IDI_BALOON              ICON    DISCARDABLE     "res\\Baloon.ico"
IDI_CDROM               ICON    DISCARDABLE     "res\\CDRom.ico"
IDI_SEARCH1             ICON    DISCARDABLE     "res\\Search1.ico"
IDI_WORKGROUP           ICON    DISCARDABLE     "res\\Workgroup.ico"
IDI_LOGOFF              ICON    DISCARDABLE     "res\\LogOff.ico"
IDI_OPEN                ICON    DISCARDABLE     "res\\Open.ico"
IDI_HELP                ICON    DISCARDABLE     "res\\Help.ico"
IDI_EXPLORER            ICON    DISCARDABLE     "res\\Explorer.ico"
IDI_ABOUT               ICON    DISCARDABLE     "res\\About.ico"
IDI_LEDON               ICON    DISCARDABLE     "res\\LedOn.ico"
IDI_LEDOFF              ICON    DISCARDABLE     "res\\LedOff.ico"
IDI_WEB2                ICON    DISCARDABLE     "res\\Web2.ico"
IDI_TOOLS4              ICON    DISCARDABLE     "res\\Tools4.ico"
IDI_RUN                 ICON    DISCARDABLE     "res\\Run.ico"
IDI_OK3                 ICON    DISCARDABLE     "res\\Ok3_32x32x256.ico"
IDI_CANCEL3             ICON    DISCARDABLE     "res\\Cancel3_32x32x256.ico"
IDI_IEDOCUMENT          ICON    DISCARDABLE     "res\\IEDocument_48x48x256.ico"
IDI_HELP2               ICON    DISCARDABLE     "res\\Help2_32x32x256.ico"
IDI_RAZOR               ICON    DISCARDABLE     "res\\Razor_32x32x256.ico"
IDI_CLASSES1            ICON    DISCARDABLE     "res\\Classes1_32x32x16.ico"
IDI_NO3                 ICON    DISCARDABLE     "res\\No3_32x32x256.ico"
IDI_RIGHT6              ICON    DISCARDABLE     "res\\Right6_32x32x256.ico"
IDI_LEFT6               ICON    DISCARDABLE     "res\\Left6_32x32x256.ico"
IDI_BUTTERFLY           ICON    DISCARDABLE     "res\\Butterfly.ico"

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

IDD_CBUTTONST_DEMO_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "CButtonST"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    PUSHBUTTON      "Close",IDCANCEL,237,173,80,24
    CONTROL         "Tab1",IDC_TAB,"SysTabControl32",0x0,6,9,306,155
    LTEXT           "SoftechSoftware Email",IDC_EMAILLINK,6,186,100,8
    LTEXT           "SoftechSoftware homepage",IDC_HOMEPAGELINK,6,175,100,8
END

IDD_BASIC DIALOG DISCARDABLE  0, 0, 300, 140
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    PUSHBUTTON      "Standard",IDC_BTNSTANDARD,5,11,76,24
    PUSHBUTTON      "Halloween",IDC_BTNHALLOWEEN,92,11,76,24
    PUSHBUTTON      "Click to\r\ndisable",IDC_BTNDISABLED,175,11,76,24
    PUSHBUTTON      "",IDC_BTNLAMP,263,11,24,24
    PUSHBUTTON      "48x48 icon",IDC_BTNKEYMANAGER,5,43,76,35
    PUSHBUTTON      "Zip",IDC_BTNZIP,92,43,76,24
    PUSHBUTTON      "Search",IDC_BTNSEARCH,175,43,47,40
    PUSHBUTTON      "",IDC_BTNCDROM,263,41,24,24
    PUSHBUTTON      "72x72 icon\r\nAlmost a bitmap!",IDC_BTNJPEG,5,82,110,56
    PUSHBUTTON      "Back",IDC_BTNBACK,123,113,59,24
    PUSHBUTTON      "Next",IDC_BTNNEXT,185,113,59,24
    PUSHBUTTON      "",IDC_BTNTOOLTIP,263,72,24,24
    GROUPBOX        " Standard button ",IDC_STATIC,0,0,86,40
END

IDD_ADVANCED DIALOG DISCARDABLE  0, 0, 300, 140
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        " CWinXPButtonST ",IDC_STATIC,0,0,96,40
    PUSHBUTTON      "Example of\r\nderived class",IDC_BTNDERIVED,5,11,86,24
    GROUPBOX        " Hyperlink ",IDC_STATIC,102,0,96,40
    PUSHBUTTON      "SoftechSoftware",IDC_BTNHYPERLINK,107,11,86,24
    GROUPBOX        " Menu ",IDC_STATIC,203,0,96,40
    PUSHBUTTON      "Open menu",IDC_BTNCURSOR,208,11,86,24
    CONTROL         "Traces enabled",IDC_CHECK,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,208,107,86,12
    PUSHBUTTON      "Click!",IDC_BTNFOCUSRECT,208,54,86,28
    GROUPBOX        " Focus rectangle ",IDC_STATIC,203,44,96,42
    GROUPBOX        " Checkbox support ",IDC_STATIC,203,90,96,40
    GROUPBOX        " Bitmap support ",IDC_STATIC,0,44,198,85
    PUSHBUTTON      "Bitmap",IDC_BTNBITMAP,10,62,59,18
END

IDD_TRANSPARENT DIALOG DISCARDABLE  0, 0, 300, 140
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    PUSHBUTTON      "48x48 icon",IDC_BTNLOGOFF,13,16,76,35
    PUSHBUTTON      "",IDC_BTNOPEN,158,20,24,24
    PUSHBUTTON      "",IDC_BTNSEARCH,184,20,24,24
    PUSHBUTTON      "",IDC_BTNEXPLORER,210,20,24,24
    PUSHBUTTON      "",IDC_BTNHELP,236,20,24,24
    PUSHBUTTON      "",IDC_BTNABOUT,262,20,24,24
    PUSHBUTTON      "72x72 icon",IDC_BTNWORKGROUP,13,55,110,56
    PUSHBUTTON      "This is a bitmap\r\nOut for lunch?",IDC_BTNCANNIBAL,149,
                    55,145,78
    CONTROL         "A CButtonST checkbox",IDC_CHECK,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,13,119,110,12
    GROUPBOX        "",IDC_STATIC,3,0,296,138
    GROUPBOX        "",IDC_STATIC,148,10,147,40
END

IDD_ABOUT DIALOG DISCARDABLE  0, 0, 300, 140
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    PUSHBUTTON      "",IDC_BTNSTLOGO,0,0,299,32,WS_DISABLED
    CTEXT           "CButtonST vx.x",IDC_VERSION,60,34,180,8,SS_NOPREFIX
    CTEXT           "Copyright (C) 1998-2003 by SoftechSoftware",IDC_STATIC,
                    40,44,220,8
    PUSHBUTTON      "",IDC_BTNFACE,0,80,57,60,WS_DISABLED
    LTEXT           "I would like to thank the following people for their classes used in this application.",
                    IDC_STATIC,77,80,186,19
    ICON            IDR_MAINFRAME,IDC_STATIC,17,44,20,20
    LTEXT           "Chris Maunder\t\tchris@codeproject.com\r\nben@shido.fsnet.co.uk\t(www.shido.fsnet.co.uk)\r\nDavide Pizzolato\t\ting.davide.pizzolato@libero.it",
                    IDC_STATIC,77,103,213,32
END

IDD_SHADED DIALOG DISCARDABLE  0, 0, 300, 140
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
    PUSHBUTTON      "&Metal",IDC_BTNSHADE1,27,14,76,35
    PUSHBUTTON      "&Noise",IDC_BTNSHADE4,112,14,76,35
    PUSHBUTTON      "V Shade",IDC_BTNSHADE7,196,14,76,35
    PUSHBUTTON      "&HardBump",IDC_BTNSHADE2,27,52,76,35
    PUSHBUTTON      "V Bump",IDC_BTNSHADE5,112,52,76,35
    PUSHBUTTON      "H Shade",IDC_BTNSHADE8,196,52,76,35
    PUSHBUTTON      "&SoftBump",IDC_BTNSHADE3,27,91,76,35
    PUSHBUTTON      "H Bump",IDC_BTNSHADE6,112,91,76,35
    PUSHBUTTON      "&Diagonal",IDC_BTNSHADE9,196,91,76,35
END


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

IDB_BMPBACK             BITMAP  DISCARDABLE     "res\\BmpBack.bmp"
IDB_SKY                 BITMAP  DISCARDABLE     "res\\Sky.bmp"
IDB_CANNIBAL            BITMAP  DISCARDABLE     "res\\Cannibal.bmp"
IDB_STLOGO              BITMAP  DISCARDABLE     "res\\STLogo_Small.bmp"
IDB_FACE                BITMAP  DISCARDABLE     "res\\Face.bmp"
IDR_TOOLBAR             BITMAP  DISCARDABLE     "res\\toolbar.bmp"
IDB_BUTTON              BITMAP  DISCARDABLE     "res\\Button.bmp"

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

IDC_HAND2               CURSOR  DISCARDABLE     "res\\Hand.cur"

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

IDR_MENU MENU DISCARDABLE 
BEGIN
    POPUP "Menu"
    BEGIN
        MENUITEM "Option &1",                   IDM_ITEM1
        MENUITEM "Option &2",                   IDM_ITEM2
        MENUITEM "(Disabled)",                  IDM_ITEM3
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// Toolbar
//

IDR_TOOLBAR TOOLBAR DISCARDABLE  16, 16
BEGIN
    BUTTON      IDM_ITEM1
    BUTTON      IDM_ITEM2
END


/////////////////////////////////////////////////////////////////////////////
//
// WAVE
//

IDR_WAVHOVER            WAVE    DISCARDABLE     "res\\Hover.wav"
IDR_WAVSTART            WAVE    DISCARDABLE     "res\\Start.wav"
#endif    // Neutral resources
/////////////////////////////////////////////////////////////////////////////


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

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

#endif    // !_MAC

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


/////////////////////////////////////////////////////////////////////////////
// Italian (Italy) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
#ifdef _WIN32
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
#pragma code_page(1252)
#endif //_WIN32

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

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

#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 //_WIN32\r\n"
    "#include ""res\\CButtonST_Demo.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED

#endif    // Italian (Italy) 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\CButtonST_Demo.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

Davide Calabro
Web Developer
Italy Italy
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 29 Mar 2003
Article Copyright 1999 by Davide Calabro
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid