Solved

How to determine StatusBar height?

Posted on 2002-03-28
12
694 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
12 Comments
 
LVL 37

Expert Comment

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

zzynx.
0
 
LVL 4

Expert Comment

by:mblat
Comment Utility
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 40 total points
Comment Utility
As I said before:
I think CStatusBar::GetItemRect(int nIndex, LPRECT lpRect)
is what you're looking for.

zzynx.
0
 
LVL 37

Expert Comment

by:zzynx
Comment Utility
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
Comment Utility
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
Comment Utility
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
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!

 
LVL 37

Expert Comment

by:zzynx
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
you get them, zzynx. Unless you object, of course ;)
0
 
LVL 37

Expert Comment

by:zzynx
Comment Utility
Not really, not really. ;o)
0
 
LVL 6

Expert Comment

by:Mindphaser
Comment Utility
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Running shell command from Access 3 63
post4 challenge 28 81
Thin secure Windows 10 5 46
Making an alias 7 51
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

763 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

6 Experts available now in Live!

Get 1:1 Help Now