No AppTitle in Bmax?

BlitzMax Forums/BlitzMax Programming/No AppTitle in Bmax?

AntonyWells(Posted 2005) [#1]
Just tried to change my application's window title only to find appTitle is actually a global in bmax. I searched the index but could find no equivilent?

Anyone know of a way to change it?


WendellM(Posted 2005) [#2]
AppTitle="Whatever You Want"


AntonyWells(Posted 2005) [#3]
Ah. I should have guessed that.

Thanks.


netmaestro(Posted 2005) [#4]
I've found that you have to place the statement before your graphics statement for it to work. Once the graphics statement has created the window it's too late.
Issuing the Apptitle statement won't change it.


AntonyWells(Posted 2005) [#5]
Yeah I assumed as much, but thanks for the heads up.


nawi(Posted 2005) [#6]
Extern "win32"
 Function SetWindowText(hwnd, lpString:Byte Ptr) = "SetWindowTextA@8"
 Function GetActiveWindow:Byte Ptr()
End Extern

Function WindowCaption(title:string)
	SetWindowText(Int(GetActiveWindow()),title.ToCString())
End Function

Graphics 800,600,0
WindowCaption "test"


While Not KeyHit(KEY_ESCAPE)
Wend


This can change the AppTitle after Graphics command.


Perturbatio(Posted 2005) [#7]
or for multiplatform goodness, get my appfuncs module.