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

Tagged as

Cool Owner Drawn Menus with Bitmaps - Version 3.03

, 28 Apr 2002 CPOL
This class implements an owner drawn menu class that mimics the menu style used in XP, Office and Visual C++
bcdialogmenu301.zip
BCDialogMenu301
BCDialogMenu.clw
BCDialogMenu.dsp
BCDialogMenu.dsw
BCDialogMenu.plg
BCDialogMenu.positions
BCMenu.startup
Release
BCDialogMenu.exe
res
BCDialogMenu.ico
Toolbar.bmp
toolbar1.bmp
bcdialogmenu303.zip
BCDialogMenu303
BCDialogMenu.clw
BCDialogMenu.dsp
BCDialogMenu.dsw
BCDialogMenu.opt
BCDialogMenu.plg
BCDialogMenu.positions
BCMenu.startup
Release
BCDialogMenu.exe
res
BCDialogMenu.ico
Toolbar.bmp
toolbar1.bmp
bcmenu25.zip
mymenu.aps
MYMENU.CLW
mymenu.dsp
MYMENU.DSW
MYMENU.opt
mymenu.plg
Release
mymenu.exe
RES
BMP00003.BMP
BMP00006.BMP
EDIT_COP.BMP
FILENEW.BMP
MYMENU.ICO
mymenuDoc.ico
NET.BMP
Toolbar.bmp
toolbar1.bmp
ZOOM.BMP
bcmenu261.zip
MYMENU.CLW
mymenu.dsp
MYMENU.DSW
Mymenu.opt
BMP00003.BMP
BMP00006.BMP
EDIT_COP.BMP
FILENEW.BMP
MYMENU.ICO
mymenuDoc.ico
NET.BMP
Toolbar.bmp
toolbar1.bmp
ZOOM.BMP
bcmenu300.zip
BCMenu
mymenu.aps
MYMENU.CLW
mymenu.dsp
MYMENU.DSW
MYMENU.OPT
mymenu.plg
MYMENU.positions
Mymenu2
Release
mymenu.exe
RES
Backup Archive.ico
BMP00003.BMP
BMP00006.BMP
EDIT_COP.BMP
FILENEW.BMP
MYMENU.ICO
mymenuDoc.ico
NET.BMP
test16.bmp
Toolbar.bmp
toolbar1.bmp
zoom.bmp
bcmenu301.zip
BCMenu301
MYMENU.CLW
mymenu.dsp
MYMENU.DSW
mymenu.plg
MYMENU.positions
Mymenu2
Release
mymenu.exe
RES
Backup Archive.ico
BMP00003.BMP
BMP00006.BMP
Copy of Toolbar.bmp
EDIT_COP.BMP
FILENEW.BMP
MYMENU.ICO
mymenuDoc.ico
NET.BMP
test16.bmp
Toolbar.bmp
toolbar1.bmp
zoom.bmp
bcmenu303.zip
BCMenu303
BCMenu.startup
mymenu.aps
MYMENU.CLW
mymenu.dsp
MYMENU.DSW
MYMENU.opt
mymenu.plg
MYMENU.positions
Mymenu2
Release
mymenu.exe
RES
Backup Archive.ico
BMP00003.BMP
BMP00006.BMP
Copy of Toolbar.bmp
EDIT_COP.BMP
FILENEW.BMP
MYMENU.ICO
mymenuDoc.ico
net.bmp
New.bmp
test16.bmp
Title.bmp
Toolbar.bmp
toolbar1.bmp
zoom.bmp
//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 (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

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

IDD_ABOUTBOX DIALOG DISCARDABLE  0, 0, 235, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About BCDialogMenu"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20
    LTEXT           "BCDialogMenu 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_BCDIALOGMENU_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "BCDialogMenu"
MENU IDR_MYTYPE
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,89,179,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,176,179,50,14
END


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

#endif    // !_MAC


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

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

    IDD_BCDIALOGMENU_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 313
        TOPMARGIN, 7
        BOTTOMMARGIN, 193
    END
END
#endif    // APSTUDIO_INVOKED


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

IDR_MYTYPE MENU PRELOAD DISCARDABLE 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&New\tCtrl+N",                ID_FILE_NEW
        MENUITEM "&Open...\tCtrl+O",            ID_FILE_OPEN
        MENUITEM "&Close",                      ID_FILE_CLOSE
        MENUITEM "&Save\tCtrl+S",               ID_FILE_SAVE
        MENUITEM "Save &As...\tCtrl+A",         57604
        MENUITEM SEPARATOR
        MENUITEM "&Print...\tCtrl+P",           ID_FILE_PRINT
        MENUITEM "P&rint Setup...",             ID_FILE_PRINT_SETUP
        MENUITEM "Print Pre&view\tCtrl+X",      ID_FILE_PRINT_PREVIEW
        MENUITEM SEPARATOR
        MENUITEM "Recent File",                 ID_FILE_MRU_FILE1, GRAYED
        MENUITEM SEPARATOR
        MENUITEM "E&xit",                       ID_APP_EXIT
    END
    POPUP "&Edit"
    BEGIN
        MENUITEM "&XP Menu Drawing Mode",       ID_ZOOM
        MENUITEM "Cu&t\tCtrl+X",                ID_EDIT_CUT
        MENUITEM "&Copy\tCtrl+C",               ID_EDIT_COPY
        MENUITEM "&Paste\tCtrl+V",              ID_EDIT_PASTE
    END
    POPUP "&Window"
    BEGIN
        MENUITEM "&New Window",                 ID_WINDOW_NEW
        MENUITEM "&Cascade",                    ID_WINDOW_CASCADE
        MENUITEM "&Tile",                       ID_WINDOW_TILE_HORZ
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "&About mymenu...",            ID_APP_ABOUT
        POPUP "&Rocscience on the Web"
        BEGIN
            MENUITEM "&Home Page",                  ID_HOMEPAGE
        END
    END
END


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

IDR_MAINFRAME TOOLBAR DISCARDABLE  16, 15
BEGIN
    BUTTON      ID_FILE_NEW
    BUTTON      ID_FILE_OPEN
    BUTTON      ID_FILE_SAVE
    SEPARATOR
    BUTTON      ID_EDIT_CUT
    BUTTON      ID_EDIT_COPY
    BUTTON      ID_EDIT_PASTE
    SEPARATOR
    BUTTON      ID_FILE_PRINT
    BUTTON      ID_APP_ABOUT
    BUTTON      ID_ENABLE
    BUTTON      ID_DISABLE
END

IDR_TOOLBAR TOOLBAR DISCARDABLE  16, 15
BEGIN
    BUTTON      ID_HOMEPAGE
    BUTTON      ID_WINDOW_NEW
    BUTTON      ID_ZOOM
    BUTTON      ID_NEW
    BUTTON      ID_TILE
    BUTTON      ID_JUNK
END


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

IDR_MAINFRAME           BITMAP  MOVEABLE PURE   "res\\Toolbar.bmp"
IDR_TOOLBAR             BITMAP  DISCARDABLE     "res\\toolbar1.bmp"

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

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_ABOUTBOX            "&About BCDialogMenu..."
END

STRINGTABLE DISCARDABLE 
BEGIN
    ID_EDIT_COPY            "Copy the selection and put it on the Clipboard\nCopy"
    ID_EDIT_CUT             "Cut the selection and put it on the Clipboard\nCut"
    ID_EDIT_PASTE           "Insert Clipboard contents\nPaste"
END

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


/////////////////////////////////////////////////////////////////////////////
// English (Canada) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
#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 //_WIN32\r\n"
    "#include ""res\\BCDialogMenu.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    DISCARDABLE     "res\\BCDialogMenu.ico"
#endif    // English (Canada) 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\BCDialogMenu.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

Brent Corkum
Web Developer
Canada Canada
I'm the senior software development manager for Rocscience Inc., a company specializing in geomechanics software. I have a PH.D in Civil Engineering, and have been programming since 1978. I've used more computers and languages then 2000 characters lets me list. Besides programming, I enjoy golfing, watching my 3 kids play sports, spending time with my wife, and watching plenty of hockey and football.

| Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 28 Apr 2002
Article Copyright 1999 by Brent Corkum
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid