\ \ win.f \ ----- \ - register window classes \ - poll messages \ - exit on 'esc' \ imp forth.f \ \ === UTILS ========================================================= \ : loword ( u32 -- u16 ) \ clamp to loword 0xFFFF and ; \ \ === EXIT ========================================================== \ lib kernel32 sym ExitProcess : exit ( -- ) 0 ExitProcess vcall ; \ === WINDOW ========================================================= lib user32 sym RegisterClassA sym CreateWindowExA sym PeekMessageA sym DispatchMessageA sym DefWindowProcA sym SetCursor \ \ --- regClass -------------------------------------------------------------- \ 40 con WNDCLASS 4 con WNDCLASS.lpfnWndProc 36 con WNDCLASS.lpszClassName : regClass ( -- atom ) WNDCLASS align here zeromem WNDCLASS.lpfnWndProc DefWindowProcA