Solved

StatusBar Pane lengths

Posted on 1998-10-29
2
771 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 100 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

10 Experts available now in Live!

Get 1:1 Help Now