Solved

Rebar @ Bottom of SDI application.

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

Accepted Solution

by:
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) ||
            !m_wndReBar.AddBar(&m_wndDlgBar))
      {
            TRACE0("Failed to create rebar\n");
            return -1;      // fail to create
      }

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

      const DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_BOTTOM;

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

and that's that!

B ekiM
0
 

Author Comment

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 96
no14 challenge 14 70
EvenOdd challenge 10 126
Increment column based of a FK 8 31
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. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

861 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