Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

StatusBar Pane lengths

Posted on 1998-10-29
2
Medium Priority
?
808 Views
Last Modified: 2013-12-03
I have a status bar with indicators as shown

static UINT indicators[] =
{
      ID_SEPARATOR,           // status line indicator
      ID_SEPARATOR,
      ID_SEPARATOR
};


My problem is that each Pane is way to long.
The 3rd pane cant even be seen unless I resize the window.

Is there anyway to cahgne the size of statusBar Panes?

I would like the pane layout to be like this
Pane 1 50% of satus bar length
Pane 2 25% of status bar length
Pane 3 25% of status bar length

+------------------------+------------+------------+
|Pane 1                  |  Pane 2    |  Pane 3    |
+------------------------+------------+------------+
0
Comment
Question by:vinny5
2 Comments
 

Accepted Solution

by:
ddeboskey earned 400 total points
ID: 1415682
CStatusBar has a member function SetPaneInfo
which takes the following arguments:

void SetPaneInfo( int nIndex, UINT nID, UINT nStyle, int cxWidth );

Parameters
nIndex   Index of the indicator pane whose style is to be set.
nID   New ID for the indicator pane.
nStyle   New style for the indicator pane.
cxWidth   New width for the indicator pane.

Since you can readily obtain the width of the status bar using the GetWindowRect function, obtaining the size fractions you need should be easy arithmetic.

I hope this helps.
0
 

Author Comment

by:vinny5
ID: 1415683
thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

783 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