| |
|
|
ToM | hi!
I would have time again ne question ...
The Mausposition inside the own window find out is easy, only how can I the make, if I not even one own Window Have, I The actually Mausposition herausfinde ?!
hope me kannwer help
mfg ToM |
|
|
| AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0 | 09/21/05 ▲ |
|
|
|
|
| so? CompileMarkSeparationDEF @GetCursorPos(1) !"USER32","GetCursorPos"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
Windowstyle 31
Windowtitle "Globale Mauskoordinaten in Fensterposition umrechnen"
Window 50,75-600,350
Declare pos#
While 0=0
Sleep 10
DIM POS#,8
GetCursorPos(pos#)
Drawtext 0,0,"Global X="+@STR$(@Long(Pos#,0))+@Space$(100)
Drawtext 0,20,"Global Y="+@STR$(@Long(Pos#,4))+@Space$(100)
@ScreenToClient(%HWND,Pos#)
Drawtext 0,40,"Lokal X="+@STR$(@Long(Pos#,0))+@Space$(100)
Drawtext 0,60,"Lokal Y="+@STR$(@Long(Pos#,4))+@Space$(100)
Dispose Pos#
Wend
|
|
|
| |
|
|
|
ToM | thanks
very the meant I |
|
|
| AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0 | 09/21/05 ▲ |
|
|
|
|
ToM | hmm had another trouble
Gibts it a umgekehrte function of SetWindowPos
means that one The position one others Fensters and the Size of a others Fensters herausfindet hm ?!
mfg tom |
|
|
| AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0 | 09/21/05 ▲ |
|
|
|
|
| so? CompileMarkSeparationDef @GetWindowRect(2) !"USER32", "GetWindowRect"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
WindowTitle "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 von Testdialog bezogen auf Bildschirm:",Long(b#,0),Long(b#,4),Long(b#,8),Long(b#,12);" "
@ScreenToClient(%hwnd,b#)
@ScreenToClient(%hwnd,b#+8)
print "Eckpunkte von Testdialog bezogen auf %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 des Rahmens von Testdialog: "+@STR$(@ABS(Long(b#,0))/2)+" "
PRINT "Höhe der Titelzeile von Testdialog ohne Rahmen: "+@STR$(@ABS(Long(b#,4))-@ABS(Long(b#,0)))+" "
PRINT "Breite des Clientbereiches von Testdialog: "+@STR$(Long(b#,8))+" "
PRINT "Höhe des Clientbereiches von Testdialog: "+@STR$(Long(b#,12))+" "
Dispose b#
Wend
|
|
|
| |
|
|
|
ToM | hmmm meant the so z.B.:
Window: windows Media Player Höhe 300 / wide 400 PosX 200 / PosY 200
means that one these things herausfindet.
mfg tom |
|
|
| AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0 | 09/21/05 ▲ |
|
|
|
|
| |
|
| |
|
|
|
ToM | ok habn bissl incorrect virtual, sorry
and thx fürn code and sorry I eurer forum so filling *g*
mfg tom |
|
|
| AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0 | 09/21/05 ▲ |
|
|
|
|
| never mind, is Yes plenty Space here . |
|
|
| |
|
|
|
ToM | hmmm with whom oberen quellcode go now and than 1000it to put hunugefügt, means instead of z.B. 512 .. 512000
wieso hm ?!
mfg tom |
|
|
| AMD Athlon 64 4500+ / 1500 MB Ram / Windows Server 2003 Enterprise / Profan 7.0 | 09/21/05 ▲ |
|
|
|
|
| so too yet??? CompileMarkSeparationDef @GetWindowRect(2) !"USER32", "GetWindowRect"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
WindowTitle "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 von Testdialog bezogen auf Bildschirm:"+@STR$(Long(b#,0))+" "+@Str$(Long(b#,4))+" "+@Str$(Long(b#,8))+" "+@str$(Long(b#,12))+" "
@ScreenToClient(%hwnd,b#)
@ScreenToClient(%hwnd,b#+8)
print "Eckpunkte von Testdialog bezogen auf %hwnd:"+@str$(Long(b#,0))+" "+@Str$(Long(b#,4))+" "+@Str$(Long(b#,8))+" "+@Str$(Long(b#,12))+" "
@GetWindowRect(dlg&,b#)
@ScreenToClient(dlg&,b#)
@ScreenToClient(dlg&,b# + 8)
Print ""
PRINT "Breite des Rahmens von Testdialog: "+@STR$(@ABS(Long(b#,0))/2)+" "
PRINT "Höhe der Titelzeile von Testdialog ohne Rahmen: "+@STR$(@ABS(Long(b#,4))-@ABS(Long(b#,0)))+" "
PRINT "Breite des Clientbereiches von Testdialog: "+@STR$(Long(b#,8))+" "
PRINT "Höhe des Clientbereiches von Testdialog: "+@STR$(Long(b#,12))+" "
Dispose b#
Wend
|
|
|
| |
|
|
|
| so too yet? which Profanversion??? CompileMarkSeparationDEF @GetCursorPos(1) !"USER32","GetCursorPos"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
Windowstyle 31
Windowtitle "Globale Mauskoordinaten in Fensterposition umrechnen"
Window 50,75-600,350
Declare pos#
While 0=0
Sleep 10
DIM POS#,8
GetCursorPos(pos#)
Drawtext 0,0,"Global X="+@STR$(@Long(Pos#,0))+" "
Drawtext 0,20,"Global Y="+@STR$(@Long(Pos#,4))+" "
@ScreenToClient(%HWND,Pos#)
Drawtext 0,40,"Lokal X="+@STR$(@Long(Pos#,0))+" "
Drawtext 0,60,"Lokal Y="+@STR$(@Long(Pos#,4))+" "
Dispose Pos#
Wend
|
|
|
| |
|
|