is there a way of getting rid of the windows X

BlitzMax Forums/BlitzMax Programming/is there a way of getting rid of the windows X

D4NM4N(Posted 2006) [#1]
I need to prevent users from clicking X to close a windowed prog.


CS_TBL(Posted 2006) [#2]
don't read out EVENT_WINDOWCLOSE

or: create a window with flags set to 0.. then you have nothing but a giant rect.. without any buttons :P


D4NM4N(Posted 2006) [#3]
im using basic graphics commands after a graphics statement. I cant find out how to do graphics in a window (im new to this and the help is really rubbish) i have however got the tools in a window. Problem is, if a user closes the default graphics window, the tools window locks up.


tonyg(Posted 2006) [#4]
MaxGUI Tutorials


D4NM4N(Posted 2006) [#5]
cool, missed them


Eikon(Posted 2006) [#6]
Here you go:
Extern "win32"
	Function FindWindow(lpClassName$z, lpWindowName$z) = "FindWindowA@8"
	Function GetSystemMenu(hwnd, bRevert)
	Function RemoveMenu(hMenu, nPosition, wFlags)
End Extern

AppTitle = "No Close"
SetGraphicsDriver D3D7Max2DDriver()
Graphics 640, 480, 0, 60
WindowMode

Repeat
Flip; Cls
Until KeyDown(KEY_ESCAPE)

Function WindowMode()

	Local hWnd% = FindWindow("BBDX7Device Window Class", "No Close")
	hMenu = GetSystemMenu(hWnd, 0)
	RemoveMenu hMenu, $F060, 0
	DrawMenuBar hWnd
	
End Function