How to Set Width of Control Bar/Toolbar in MFC?

Posted on 2004-11-29
Last Modified: 2013-11-20
Hi, I have a MDI app that has floating dockable control bars which contain dialogs as views.  The problem is that every time I start up the app the control bars (views) are set to a certain width not specified by me.  Are there any functions I can use to set the width of a toolbar/control bar (maybe SetBarStyle?) or start up the control bar (view) based on the last setting (last time the app exited)?

Thanks for any help.
Question by:yuen_wc
    1 Comment
    LVL 48

    Accepted Solution

    Check out MFC sample CTRLBARS. It keeps last control bars state in the Registry and restores it when the program starts.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Powershell based monitoring system 2 118
    Define unique primary key 9 77
    iSeries DB2 Query 2 68
    Thin secure Windows 10 5 17
    Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
    Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now