LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
paintstruct = "32u, 32u, 32, 32, 32, 32, 32u, 32u, char[32]"
FUNCDEF("BeginPaint", "32u, void, struct PAINTSTRUCT stor", "user32")
FUNCDEF("EndPaint", "32, void, struct PAINTSTRUCT", "user32")
guicreatewindow('NORMAL')
again:
DO FOREVER
guigetmsg()
CATCH SYNTAX
CONDITION('M')
SIGNAL again
CATCH HALT
FINALLY
guidestroywindow()
DROP picobject
END
RETURN
picture:
fn = ''
err = guifile('FN', , 'This is the title')
IF err == '' THEN DO
DROP picobject
guipicture("PicObject", fn)
guirefresh(, 1)
END
RETURN
wm_paint:
hdc = beginpaint(guiwindow, ps)
DO
IF EXISTS("PicObject") THEN guipicture("PicObject", hdc, 0, 0)
FINALLY
endpaint(guiwindow, ps)
END
RETURN ""
|