Calc height of title bar or client area top left?

BlitzMax Forums/BlitzMax Programming/Calc height of title bar or client area top left?

If the window just has a titlebar (and no status bar etc.) then you could use the following code:
Strict

Local gadWindow:TGadget = CreateWindow("Test Window",400,400,400,300,Null,WINDOW_TITLEBAR)

Local tmpGadHeight:Int = GadgetHeight(gadWindow)
Local tmpCliHeight:Int = ClientHeight(gadWindow)

Local tmpTitlebar:Int = tmpGadHeight - tmpCliHeight

Notify("Titlebar (+ bottom border): " + tmpTitlebar)

Repeat


	Select WaitEvent()
	
		Case EVENT_WINDOWCLOSE;End

	End Select

Forever


End
It should be multi-platform as it just uses native MaxGUI commands. The value given is the value of the titlebar and the bottom border.


Just a thought, though I'm not sure it is what you are looking for.



Seb