Page 1 of 1

StatusBarHeight() parameter as option

Posted: Sat Sep 17, 2016 6:17 am
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

Re: StatusBarHeight() parameter as option

Posted: Sun Sep 18, 2016 8:57 am
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)

Re: StatusBarHeight() parameter as option

Posted: Sun Sep 18, 2016 12:59 pm
by Dude
#SM_CYCAPTION is the title bar height, not the status bar height.