Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

madfisher

Status Bar Help

This topic is 5759 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

    
#define STATUSBAR 0x100

HWND StatusBarHandle = CreateStatusWindow ( WS_CHILD | WS_VISIBLE, "", MainWindowHandle, STATUSBAR );


the STATUSBAR is the id that will be used e.g. in your messageloop to identify messages from the statusbar




Runicsoft -- home of my open source Function Parser and more

[edited by - Burning_Ice on September 12, 2002 3:51:22 PM]

Share this post


Link to post
Share on other sites
Google on "CreateStatusWindow". This function basically wraps CreateWindowEx. Set the handle to the main window as the parent of the status bar window. Also look up SB_SETPARTS for info on setting the number of panels on the status bar.

Share this post


Link to post
Share on other sites
Thanks that worked. However I have another issue. I am using scroll bars and the status bar now appears above the horizontal scroll bar. Does anybody know how I can fix this?

Thanks

Share this post


Link to post
Share on other sites
madfisher: i believe you cant have standard scrollbars and statusbar. You have to create your own scrollbar with CreateWindowEx like this (taken from my help files):


        
hwndScroll = CreateWindowEx(
0L, // no extended styles

"SCROLLBAR", // scroll bar control class

(LPSTR) NULL, // text for window title bar

WS_CHILD | SBS_HORZ, // scroll bar styles

0, // horizontal position

0, // vertical position

200, // width of the scroll bar

CW_USEDEFAULT, // default height

hwnd, // handle of main window

(HMENU) NULL, // no menu for a scroll bar

hinst, // instance owning this window

(LPVOID) NULL // pointer not needed

);


but instead of a 0, 0 for the position you place it so that it shows above the status bar

Hippokrates:


          
SendMessage ( StatusBarHandle, SB_SETTEXT, 0, (LPARAM)(LPSTR) str );


where str is the text you want it to have




Runicsoft -- home of my open source Function Parser and more



[edited by - Burning_Ice on September 13, 2002 9:52:13 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!