Rectangle=\DEF(xmin%,ymin%,xmax%,ymax%)
Vector=\DEF(x%,y%)
Icon1=\DEF(window%,icon%,bounds{Rectangle},icon#(31),text$[11])
Icon2=\DEF(window%,icon%,bounds{Rectangle},icon#(31),text!,valid!,len%)
icon=\NEW(Icon1)
\icon.window%=window_handle%
\icon.icon%=icon_number%
SYS "Wimp_GetIconState",icon+4
PRINT \icon.text$
Window=\DEF(handle%,visible{Rectangle},scroll{Vector},behind%,window#(31),
colours?(7),workarea{Rectangle},title#(31),button%,sprites%,minimum%,
title$[11],icons%,icon(20){Icon1})
window=\NEW(Window)
\window.handle%=window_handle%
SYS "Wimp_GetWindowInfo",,window+4
PRINT \window.icon(3).text$