| |
|
|
| KompilierenMarqueSéparationcls
declare h&
h&:=createdialog(%hwnd,"",300,300,400,200)
while 1
createmenu
appendmenu 100,"funzt :)"
trackmenu_byXY_byDialog 0,0,h&
waitkey
wend
proc trackmenu_byXY
parameters x&,y&
declare gmp#,dx&,dy&
dim gmp#,8
external("user32","ClientToScreen",%hwnd,gmp#)
dx&=long(gmp#,0)
dy&=long(gmp#,4)
trackmenu (x&-dx&),(y&-dy&)
dispose gmp#
endproc
proc trackmenu_byMousepos
declare gmp#,dx&,dy&
dim gmp#,8
external("user32","ClientToScreen",%hwnd,gmp#)
dx&=long(gmp#,0)
dy&=long(gmp#,4)
external("user32","GetCursorPos",gmp#)
trackmenu (long(gmp#,0)-dx&),(long(gmp#,4)-dy&)
dispose gmp#
endproc
proc trackmenu_byXY_byDialog
parameters x&,y&,h&
declare gmp#,dx&,dy&
dim gmp#,8
external("user32","ClientToScreen",h&,gmp#)
dx&=long(gmp#,0)
dy&=long(gmp#,4)
trackmenu_byXY x&+dx&,y&+dy&
dispose gmp#
endproc
Salve, iF. |
|
|
| |
|
|