Click here to Skip to main content
13,355,311 members (59,307 online)
Click here to Skip to main content
Add your own
alternative version


35 bookmarked
Posted 26 Apr 2000

MDI Windows Manager Dialog

, 29 Apr 2000
Rate this:
Please Sign up or sign in to vote.
Implementing "Windows..." dialog
<!-- Link to source file download -->
  • Download source files - 4.6 Kb
  • <!-- Link to demo file download -->
  • Download demo project - 36.5 Kb
  • <!-- Article image -->

    Sample Image - WindowsManager.gif

    What's this?

    This article describes how to implement a Windows Manager dialog. It manages currently open windows (Activate, Save, Close, Tile, Cascade, Minimize).

    How to use it?

    1. Add to your CMainFrame a class member variable of type CMDIClient. A good practice is to keep the variables protected (or private).

    2. Then, within the OnCreate() handler, add the following code:

    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
        if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
           return -1;
         // Subclass the MDI client window
         return 0;

    3. Copy to your project the provided IDD_WINDOW_MANAGE dialog resource (from WindowManager.rct).

    4. Add the following resource strings:

    ID Caption Description
    IDS_WINDOW_WINDOWS "&Windows..." Menu text
    ID_WINDOW_MANAGE "Manages the currently open windows.\nWindows List" Message prompt

    5. Add a handler to command ID_WINDOW_MANAGE and add the following code.

    void CMainFrame::OnWindowManage()

    6. Build and run your application.

    7. Go to Window menu and click on "Windows..."


    Unicode has not been tested, but it should work.



    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


    About the Author

    Ivan Zhakov
    Chief Technology Officer
    Russian Federation Russian Federation
    I started with programming more than ten years ago when I was teenager.
    Since that time I had experience varying from Windows desktop applications to embedded Linux development.
    For present time I'm developer of the Subversion Project and also co-founder of the VisualSVN company which develops integration between Subversion and Microsoft Visual Studio.

    You may also be interested in...


    Comments and Discussions

    GeneralUseful example for improving MFC knowledge Pin
    Raymond_Gimilio26-Feb-07 8:32
    memberRaymond_Gimilio26-Feb-07 8:32 
    GeneralRe: Useful example for improving MFC knowledge [modified] Pin
    Ivan Zhakov26-Feb-07 8:58
    memberIvan Zhakov26-Feb-07 8:58 
    GeneralWindow manager conflicts with tab control... Pin
    atali21-Oct-04 6:52
    memberatali21-Oct-04 6:52 
    QuestionHow to add list of Documents as Tree Items??? Pin
    mahatma_cis5-Aug-04 4:23
    membermahatma_cis5-Aug-04 4:23 
    Generalquestion Pin
    lehaiquang17-Sep-03 21:31
    susslehaiquang17-Sep-03 21:31 
    Generaltree Pin
    yaser30-Aug-02 11:42
    memberyaser30-Aug-02 11:42 
    GeneralFit a dialog in a View of a Window Pin
    Anonymous17-Apr-02 9:55
    memberAnonymous17-Apr-02 9:55 
    GeneralRe: Fit a dialog in a View of a Window Pin
    Jim Busse13-Nov-02 11:27
    memberJim Busse13-Nov-02 11:27 
    GeneralHorizontal Scroll Bar Pin
    George Poulose1-May-00 19:45
    sussGeorge Poulose1-May-00 19:45 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise | Privacy | Terms of Use | Mobile
    Web01 | 2.8.180111.1 | Last Updated 30 Apr 2000
    Article Copyright 2000 by Ivan Zhakov
    Everything else Copyright © CodeProject, 1999-2018
    Layout: fixed | fluid