Rebar @ Bottom of SDI application.

Posted on 1998-11-07
Last Modified: 2013-11-20
How do I dock permanently a rebar to the bottom of a window?
Question by:juanrodz
LVL 11

Accepted Solution

mikeblas earned 200 total points
ID: 1324348
Just supply the CBRS_BOTTOM style when to enable docking to the bottom when you create the control.  AppWizard gives you something like this in CFrameWnd::OnCreate() when you ask for a rebar:

      if (!m_wndReBar.Create(this) ||
            !m_wndReBar.AddBar(&m_wndToolBar) ||
            TRACE0("Failed to create rebar\n");
            return -1;      // fail to create

instead, just use this extra code to specify the bottom-docking:


      if (!m_wndReBar.Create(this, RBS_BANDBORDERS, dwStyle) ||
            !m_wndReBar.AddBar(&m_wndToolBar) ||
            TRACE0("Failed to create rebar\n");
            return -1;      // fail to create

and that's that!

B ekiM

Author Comment

ID: 1324349
Beautiful… exactly what I wanted.  Thank you Mike!

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
centeredAverage challenge 8 124
has77  challenge 9 68
wait notify demo infinite loop 3 81
abstract class with all non abstract mentods 6 72
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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