J ai quelques souci avec la commande pour afficher des pixel sur une Form
Alors j essaye de me tourner vers la "Gdi.dll"
J ai trouver cette fonction sur un forum allemand
mais ca coince avec la variable $hDC
Code : Tout sélectionner
Func _SetPixelV($hDC, $x, $y, $color, $DLL = "gdi32.dll")
$setpixel = DllCall($DLL, "long", "SetPixelV", "long", $hDC, "long", $x, "long", $y, "long", $color)
EndFunc ;==>_SetPixelV
mais dans la pratique . . . .
j ai tester un wingethandle($maform) et meme un $maform direct mais rien
je precise qu a l appel de cette fonction, $DLL est egal a = DllOpen("gdi32.dll")
Cette fonction est censé m afficher un point au coordoné x,y de couleur $color et biensure je pensais que $hDC etait le handle de ma fenetre . . .
voila si vous aviez des infos qui pourrais m aider je vous en serais reconnaissant
en exemple ca donnerais ca :
Code : Tout sélectionner
$interface = GUICreate("Ma forme",296,344,232,281,-1,$WS_EX_TOPMOST)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$DLL = DllOpen("gdi32.dll")
_SetPixelV($interface, 57, 29, 2555, $DLL); ne fonction pas , $hwnd=wingatehandle($interface) ne marche pas non plus ;(
DllClose($DLL)
WEnd
Func _SetPixelV($hDC, $x, $y, $color, $DLL = "gdi32.dll")
$setpixel = DllCall($DLL, "long", "SetPixelV", "long", $hDC, "long", $x, "long", $y, "long", $color)
EndFunc ;==>_SetPixelV

