?
Solved

Rebar @ Bottom of SDI application.

Posted on 1998-11-07
2
Medium Priority
?
286 Views
Last Modified: 2013-11-20
How do I dock permanently a rebar to the bottom of a window?
0
Comment
Question by:juanrodz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 800 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 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