| |
|
|
|
Description:
GetWindowRect determined The Eckpunkte one Fensters related on the screen.
Deklaration:
Def @GetWindowRect(2) !USER32, GetWindowRect
Parameter:
1.Parameter: lever the Fensters, which Eckpunkte one herausbekommen wants. 2.Parameter: RECT Structure or 16 Bytes large Memory-Variable, The The Eckpunkte the Frensters aufnimmt.=> -byte 0-3 = X-Koordinate the left oberen corner the Fensters. -byte 4-7 = Y-Koordinate the left oberen corner the Fensters. -byte 8-11 = X-Koordinate the rechten downstairs corner the Fensters. -byte 12-15 = Y-Koordinate the rechten downstairs corner the Fensters.
Return Value:
1 with success, 0 with Error.
Examples:
Def @GetWindowRect(2) !"USER32", "GetWindowRect"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
Window Title "Koordinaten"
Windowstyle 31+512
Window 0,0-640,440
Decimals 0
Declare b#,dlg&
LET dlg&=@Create("Window",%hwnd,"Testdialog",150,150,300,300)
Whilenot %MENUITEM=-2
GetMessage
Locate 1,1
Dim b#,16
@GetWindowRect(dlg&,b#)
print "Eckpunkte of Testdialog related on screen:",Long(b #,0),Long(b #,4),Long(b #,8),Long(b #,12);" "
@ScreenToClient(%hwnd,b#)
@ScreenToClient(%hwnd,b#+8)
print "Eckpunkte of Testdialog related on %hwnd:",Long(b #,0),Long(b #,4),Long(b #,8),Long(b #,12);" "
@GetWindowRect(dlg&,b#)
@ScreenToClient(dlg&,b#)
@ScreenToClient(dlg&,b# + 8)
Print ""
PRINT "Breite the Rahmens of Testdialog: "+@STR$(@ABS(Long(b #,0))/2)+" "
PRINT "Höhe the Headline of Testdialog without welt: "+@STR$(@ABS(Long(b #,4))-@ABS(Long(b #,0)))+" "
PRINT "Breite the Clientbereiches of Testdialog: "+@STR$(Long(b #,8))+" "
PRINT "Höhe the Clientbereiches of Testdialog: "+@STR$(Long(b #,12))+" "
Dispose b#
Wend
[keywords:c4c482003a] Eckpunkte Coordinates Window X Y wide Höhe Headline Check experienced herausbekommen [/keywords:c4c482003a] |
|
|
| |
|
|