?
Solved

How to determine StatusBar height?

Posted on 2002-03-28
12
Medium Priority
?
744 Views
Last Modified: 2013-11-20
I created standard single socument MFC application by MFC Wizard. Window has StatusBar below. StatusBar uses window client area to paint itself into . How can I determine StatusBar height? Is there any method in CStatusBar class?
As I tested CStatusBar::GetWindowRect(&WinRec) doesn not work. :(  Thank you.
0
Comment
Question by:VadimY
[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
12 Comments
 
LVL 37

Expert Comment

by:zzynx
ID: 6904570
I think CStatusBar::GetItemRect(int nIndex, LPRECT lpRect)
is what you're looking for.

zzynx.
0
 
LVL 4

Expert Comment

by:mblat
ID: 6907807
I don't now - I just went and created fresh SDI app. using VC++ on Win2000 machine.

Added menu item.  In that item handler after calling

CRect rc;
m_wndStatusBar.GetWindowRect(&rc);

result appear to be correct....

m_wndStatusBar is status bar created by wizard....

So I probably don't understand your question fully...
0
 
LVL 37

Accepted Solution

by:
zzynx earned 160 total points
ID: 6912186
As I said before:
I think CStatusBar::GetItemRect(int nIndex, LPRECT lpRect)
is what you're looking for.

zzynx.
0
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!

 
LVL 37

Expert Comment

by:zzynx
ID: 7055540
Hey VadimY,

why aren't you giving points? We're waiting!

I see this is your first (and only) question.
I hope you are not exploiting this site to easily get an answer on your question without following the rules.

There are masses of other sites you can use for that.

zzynx.
*irritated*
0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 7100128
Vadim: please provide the following information:

1) do you need the height of the entire status bar, including it's "border", or do you need the size of the area where you can paint in?

For the first use GetWindowRect, for the second, GetItemRect.

Where and how do you use GetWindowRect, and what does "does not work" mean specifically? Do you get error messages when compiling, wrong results?

0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 7100140
Vadim: Until the problem is solved, I would recommend you reject zzynx' answer. There is no drawback involved, you can later award the points to any expert you like.

zzynx: welcome to experts-exchange.
First, VadimY isn't oblieged to provide points until he is satisfied with the solution, or there is no more input to expect.
Second, please provide an "Answer" (instead of a Comment) only if you're 100% sure your reply is exactly what the asker needs, there are no open issues, and there is no other comment already which might also help answering the question.

Many long-time experts prefer to post only comments, as experience has shown EE works smoother this way.

Please read about Comments and Answers about
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#5
0
 
LVL 37

Expert Comment

by:zzynx
ID: 7102873
Hi peterchen,

I know 'VadimY isn't oblieged to provide points until he is satisfied with the solution'. And I know that it's common use on EE not to provide answers but comments.

But since I saw VadimY isn't quite 'active' anymore on this subject (and VadimY is member since 28 march and his only question is dated 28 march)
I thought proposing my comment as an answer could trigger him to some action.
0
 
LVL 11

Expert Comment

by:griessh
ID: 7203953
Dear VadimY

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "zzynx"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 37

Expert Comment

by:zzynx
ID: 7224540
Hi griessh,

Looks like we shouldn't expect any futher activity from VadimY.

Any idea what happens with the points in case Support closes it?

zzynx.
0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 7224615
you get them, zzynx. Unless you object, of course ;)
0
 
LVL 37

Expert Comment

by:zzynx
ID: 7224645
Not really, not really. ;o)
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7234003
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

765 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