declare w1&,w2&
declare c2sstrc#
def c2s(2) !"USER32","ClientToScreen"
def g2lx(0) long(c2sstrc#,0)
def g2ly(0) long(c2sstrc#,4)
proc g2l
parameters hdl&
clear c2sstrc#
c2s (hdl&,c2sstrc#)
endproc
dim c2sstrc#,8
windowstyle ( 512 | 8 )
cls
w1&=createdialog(%hwnd,"w1",100,100,200,200)
w2&=createdialog(%hwnd,"w2",(%maxx-300),200,200,200)
settimer 300
whilenot (%key=2)
waitinput
cls
g2l w1&
print g2lx(),g2ly()
g2l w2&
print g2lx(),g2ly()
wend
killtimer
destroywindow (w1&)
destroywindow (w2&)
dispose c2sstrc#
end