Click here to Skip to main content
12,625,686 members (36,887 online)
Click here to Skip to main content

Stats

211.8K views
5.3K downloads
82 bookmarked
Posted

Automatic Tab Bar for MDI Frameworks

, 3 Jan 2003 Public Domain
A dockable bar containing a tabbed list of open windows
#include "resource.h"
#include "afxres.h"

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

IDR_TABVIEW_MENU        BITMAP  DISCARDABLE     "res\\tabview.bmp"

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

IDR_TABVIEW_MENU TOOLBAR DISCARDABLE  16, 16
BEGIN
    BUTTON      ID_VIEW_FULLSCREEN
    BUTTON      ID_FILE_CLOSE
    BUTTON      ID_WINDOW_CLOSE_ALL
    BUTTON      ID_FILE_SAVE
    BUTTON      ID_WINDOW_SAVE_ALL
    BUTTON      ID_FILE_PRINT
    BUTTON      ID_WINDOW_NEW
    BUTTON      ID_WINDOW_NEXT
    BUTTON      ID_WINDOW_PREVIOUS
    BUTTON      ID_WINDOW_CASCADE
    BUTTON      ID_WINDOW_TILE_HORZ
    BUTTON      ID_WINDOW_TILE_VERT
    BUTTON      ID_WINDOW_MANAGE
END

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

IDD_WINDOW_MANAGE DIALOGEX 0, 0, 316, 169
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Windows"
FONT 8, "MS Sans Serif"
BEGIN
    LISTBOX         IDC_WINDOWLIST_LIST,7,18,230,144,LBS_SORT | 
                    LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_USETABSTOPS | 
                    LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | 
                    WS_TABSTOP
    DEFPUSHBUTTON   "&Actvate",IDC_WINDOWLIST_ACTIVATE,243,7,66,15
    PUSHBUTTON      "&OK",IDOK,243,27,66,15
    PUSHBUTTON      "&Save",IDC_WINDOWLIST_SAVE,243,47,66,15
    PUSHBUTTON      "&Close Window(s)",IDC_WINDOWLIST_CLOSE,243,67,66,15
    PUSHBUTTON      "Cascade",IDC_WINDOWLIST_CASCADE,243,87,66,14
    PUSHBUTTON      "Tile &Horizontaly",IDC_WINDOWLIST_TILEHORZ,243,106,66,
                    14
    PUSHBUTTON      "Tile &Verticaly",IDC_WINDOWLIST_TILEVERT,243,125,66,14
    PUSHBUTTON      "Minimize",IDC_WINDOWLIST_MINIMIZE,243,144,66,14
    LTEXT           "Select &window:",IDC_STATIC,7,7,49,8
END

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

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_WINDOW_MANAGE       "&Windows..."
    ID_VIEW_VIEWTAB         "Toggle open file tabs on and off\nOpen File Tabs"
    ID_VIEW_FULLSCREEN      "Toggle Full Screen mode on and off\nToggle Full Screen Mode"
    ID_WINDOW_NEXT          "Activate the next window\nNext Window"
    ID_WINDOW_PREVIOUS      "Activate the previous window\nPrevious Window"
    ID_WINDOW_CLOSE_ALL     "Close all opened windows\nClose All"
    ID_WINDOW_SAVE_ALL      "Save all modified open files\nSave All"
    ID_WINDOW_MANAGE        "Manages the currently open windows\nWindow List"
END

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 A Public Domain dedication

Share

About the Author

Paul Selormey
Engineer
Japan Japan
Systems Engineer

You may also be interested in...

Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161205.3 | Last Updated 4 Jan 2003
Article Copyright 2000 by Paul Selormey
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid