PolledInput with a blank user created window

BlitzMax Forums/BlitzMax Programming/PolledInput with a blank user created window

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The following shows a basic example, not sure why the window is not drawing but it is definitely passing on events back to blitz:

Strict

Function ClassWndProc(hwnd,msg,wp,lp) "win32"
	bbSystemEmitOSEvent hwnd,msg,wp,lp,Null
	Return DefWindowProcW( hwnd,msg,wp,lp )
End Function
			
Global _wc:WNDCLASSW
Global ClassAtom
		
_wc=New WNDCLASSW
_wc.style=CS_OWNDC|CS_HREDRAW|CS_VREDRAW
_wc.lpfnWndProc=ClassWndProc
_wc.hInstance=GetModuleHandleW(Null)
_wc.lpszClassName="MyClass".ToWString()
_wc.cbWndExtra=DLGWINDOWEXTRA

ClassAtom=RegisterClassW(_wc)

Local style=WS_VISIBLE|WS_POPUP

Local hwnd=CreateWindowExW(0,"MyClass","My Window",style,0,0,200,200,0,0,GetModuleHandleW(Null),Null)

While WaitEvent()
	DebugLog CurrentEvent.ToString()
Wend