Can't remove Titlebar

Blitz3D Forums/Blitz3D Programming/Can't remove Titlebar

John Blackledge(Posted 2005) [#1]
I can't create a windowed but titlebar-less Blitz window.

I've done a search on the forums but still can't find what I need.

This works fine to create a standard window: \/
hWnd = DLLFindBlitzRuntimeHwnd(ProgName$)
WindowStyle = WS_VISIBLE + WS_BORDER + WS_MINIMIZEBOX + WS_MAXIMIZEBOX + WS_SIZEBOX + WS_SYSMENU
User32_SetWindowLong(hWnd,GWL_STYLE,WindowStyle)

To get rid of the Titlebar, if this was C, all I would have to do is change to:
WindowStyle = WS_VISIBLE

But all I get is a dead, blank window.
In fact any combination of flags other than the top WidowStyle def causes a blank window.

Please don't suggest that I use SetWindowRgn - that just clips the region and I lose the bottom 20 pixels.

Any ideas, please?


jfk EO-11110(Posted 2005) [#2]
Probably it has something to do that (AFAIK) blitz is using some kind of canvas for Graphics and Graphics3D, and the runtimeHWND is not the same as the canvas handle?

I remember it was possible to remove the titlebar with the Blitzsys.dll.


John Blackledge(Posted 2005) [#3]
Thanks jfk, but... ah, no.
I've been through every example that comes with BlitzSys.

As I said, the only method shown is SetWindowRgn (for skinning etc) but unfortunately that method removes the bottom 20 pixels (caption height?) from the window - which happens to be where my controls are displayed.

Surely someone has done this - by another method?


Rook Zimbabwe(Posted 2005) [#4]
I can do it in BlitzUI...
Graphics 199, 199, 16, 2
SetBuffer BackBuffer(  )
HidePointer

Include "blitzui.bb"

;Load fonts and mouse cursors
;and collect information
Initialise(  )

;Window
win001 = Window( 152, 47, 256, 213, "", "0", 0, 0, 0, 0 )

Repeat

	;Draw the GUI and update the mouse
	UpdateGUI(  )
	
	;Event Handling
	Select app\Event
		Case EVENT_WINDOW
			Select app\WindowEvent
			End Select
		Case EVENT_MENU
			Select app\MenuEvent
			End Select
		Case EVENT_GADGET
			Select app\GadgetEvent
			End Select
	End Select
	
	;Draw the mouse
	DrawMouse(  )
	
	;Reset all GUI events
	ResetEvents(  )

	Flip
	Cls

Until KeyHit( 1 ) Or app\Quit = True
;Free all images and controls created by BlitzUI
Destroy(  )
End

But I don't think thats what you want UNLESS you incorperate the GUI functions in your program...


nadia(Posted 2005) [#5]
Here is a some testing code I wrote a while back which uses API calls to create windows without title bar. It also uses ‘CreateRoundRectRgn’ to show the window with rounded corners…

Download code sample


Rook Zimbabwe(Posted 2005) [#6]
very cool nadia!!!


John Blackledge(Posted 2005) [#7]
Nah, that's just BlitzUI stuff.
I use that anyway (nice).

But I needed to really get rid of the titlebar.

Any way, sorry, I've been away - I should have said before I went that the solution can be found in another thread: "black out background at any rez".