| |
|
|
|
Description:
ClientToScreen rechnet a point from the Clientbereich one Fensters in its Coordinates on-screen circa.
Deklaration:
Def @ClientToScreen(2) !USER32,ClientToScreen
Parameter:
1.Parameter: lever the Fensters, from the one point dee Clientbereichs on the screen umgerechnet go should. 2.Parameter: POINT Structure or 8 byte Memory-Variable, The The Coordinates the Punktes in the Clientbereich contains.=> -byte 0-3 = X-Koordinate the Punktes. -byte 4-7 = Y-Koordinate the Punktes.
Return Value:
0 with Error, 1 with success.
Examples:
CompileMarkSeparationdeclare w1&,w2&
declare c2sstrc#
def @ClientToScreen(2) !USER32,ClientToScreen
def @g2lx(0) @long(c2sstrc#,0)
def @g2ly(0) @long(c2sstrc#,4)
proc g2l
parameters hdl&
clear c2sstrc#
@ClientToScreen(hdl&,c2sstrc#)
endproc
dim c2sstrc#,8
windowstyle 31+512
Windowtitle Fensterkoordinaten ermitteln
Window 0,0-640,440
w1&=@createdialog(%hwnd,Dialog 1,100,100,200,200)
w2&=@createdialog(%hwnd,Dialog 2,(%maxx-300),200,200,200)
whilenot %MENUITEM=-2
Sleep 100
g2l w1&
Textcolor @RGB(31,0,0),@RGB(32,32,32)
Drawtext 0,0,Koordinaten von Dialog 1: +@STR$(@g2lx())+ +@STR$(@g2ly())+@Space$(255)
g2l w2&
Drawtext 0,30,Koordinaten von Dialog 2: +@STR$(@g2lx())+ +@STR$(@g2ly())+@Space$(255)
wend
@Destroywindow(W1&)
@Destroywindow(W2&)
CLS
Usefont Times New Roman,30,15,1,0,0
Drawtext 0,0,Besten Dank an IF für diese Idee!
dispose c2sstrc#
Usecursor 2
sleep 2000
end
CompileMarkSeparation
Clientbereich screen Coordinates Bildschirmkoordinaten point X Y converting Umrechnung to determine
|
|
|
| |
|
|