2005-11-28 22:31:00 -05:00
|
|
|
USING: alien parser namespaces kernel syntax words math io prettyprint ;
|
2006-03-25 03:54:59 -05:00
|
|
|
IN: win32
|
|
|
|
|
|
|
|
: win32-error=0 0 = [ win32-error ] when ;
|
|
|
|
: win32-error>0 0 > [ win32-error ] when ;
|
|
|
|
: win32-error<0 0 < [ win32-error ] when ;
|
|
|
|
: win32-error<>0 0 = [ win32-error ] unless ;
|
|
|
|
|
|
|
|
: lo-word ( wparam -- lo ) HEX: ffff bitand ;
|
|
|
|
: hi-word ( wparam -- hi ) -16 shift ;
|
|
|
|
|
|
|
|
: hello-world
|
|
|
|
f "Hello, world!" "First Application" MB_OK MessageBox win32-error drop ;
|
2005-11-28 22:31:00 -05:00
|
|
|
|
2006-03-25 03:54:59 -05:00
|
|
|
: msgbox ( str -- )
|
|
|
|
f swap "DebugMsg" MB_OK MessageBox drop ;
|
2005-11-28 22:31:00 -05:00
|
|
|
|