• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 817
  • Last Modified:

StatusBar Pane lengths

I have a status bar with indicators as shown

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

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    |
1 Solution
CStatusBar has a member function SetPaneInfo
which takes the following arguments:

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

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.
vinny5Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now