×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Why StatusBar is painted in two locations?...

Why StatusBar is painted in two locations?...

Why StatusBar is painted in two locations?...

(OP)
Hello Everyone,

I can use your kind help with this problem --- I have
a StatusBar in my GUI window which gets painted at the
bottom of that window when the program runs. However,
when the window gets maximized, sized or re-sized, the
StatusBar would be painted in two or three locations,
the bottom of the window and in the middle as well. I am
using win32 API createwindowEx to paint the SatusBar.
can you please tell me what I am doing wrong.
thanks for the help.

RE: Why StatusBar is painted in two locations?...

  Without examining your code, I would guess that you are creating another status bar every time the window repaints;
try moving the call to CreateWindowEx for the status bar to your parent window's initialization function and call the repaint function for the status bar when the window repaints.
  Also, if you are creating the status bar as a child window, the parent's repaint function should repaint the Status bar automatically; however if you have overridden the parent's repaint, all bets are off and I would code in the call to the statusbar's repaint.

RE: Why StatusBar is painted in two locations?...

(OP)
Hi Prattaratt,

thanks for the feedback and the helpful tips. I have
discovered that I needed to use the win32 api function
"movewindow" to move the statusbar to the bottom of the
screen when the window procedure receives the wm_size
message.  Thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close