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
Solved

StatusBar Pane lengths

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

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

Suggested Solutions

Title # Comments Views Activity
Method 'OpenReport' of the object Docmd failed 7 31
Windows 10 Scheduled Tasks 11 97
Why I am having this error installing Visual Basic Enterprise 11 63
SSRS troubles 4 68
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…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

789 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