StatusBarHeight() parameter as option

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
infratec
Always Here
Always Here
Posts: 7588
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

StatusBarHeight() parameter as option

Post by infratec »

Hi,

When you open a window you can use MenuHeight() to correct the inner size if you want a menu.
But you can not use StatusBarHeight() for this too, because it requires already a number of status bar,
which is not possible, because the window which is needed to define it is not there :wink:
I have to ResizeWindow() after CreateStatusBar().

Code: Select all

OpenWindow(0, 0, 0, 400, 300 + MenuHeight() + StatusBarHeight(), "Would be nice")
So I would know that I have 300 pixels for my gadgets.

Bernd
User avatar
Mijikai
Addict
Addict
Posts: 1517
Joined: Sun Sep 11, 2016 2:17 pm

Re: StatusBarHeight() parameter as option

Post by Mijikai »

Im not an GUI guy but have u tried the GetSystemMetrics_() API ?

https://msdn.microsoft.com/en-us/librar ... s.85).aspx

Mby:

Code: Select all

GetSystemMetrics_(#SM_CYCAPTION)
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: StatusBarHeight() parameter as option

Post by Dude »

#SM_CYCAPTION is the title bar height, not the status bar height.
Post Reply