Solved

Rebar @ Bottom of SDI application.

Posted on 1998-11-07
2
236 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 62
sameEnds challenge 3 133
has77  challenge 9 71
JQuery serialize and unserialize 8 48
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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 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

9 Experts available now in Live!

Get 1:1 Help Now