Solved

Rebar @ Bottom of SDI application.

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

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