RosettaCodeData/Task/Window-creation/FreeBASIC/window-creation.basic

17 lines
421 B
Plaintext

#Include "windows.bi"
Dim As HWND Window_Main
Dim As MSG msg
'Create the window:
Window_Main = CreateWindow("#32770", "I am a window - close me!", WS_OVERLAPPEDWINDOW Or WS_VISIBLE, 100, 100, 350, 200, 0, 0, 0, 0)
'Windows message loop:
While GetMessage(@msg, Window_Main, 0, 0)
TranslateMessage(@msg)
DispatchMessage(@msg)
If msg.hwnd = Window_Main And msg.message = WM_COMMAND Then End
Wend
End