Ver Mensaje Individual
  #28 (permalink)  
Antiguo 07/05/2005, 03:38
MaxExtreme
 
Fecha de Ingreso: abril-2005
Mensajes: 3.083
Antigüedad: 20 años, 1 mes
Puntos: 17
Cita:
Iniciado por MaxExtreme
Código:
Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long

Const CLR_INVALID = &HFFFF
· hdc
Identifies the device context.
El hDC que estás usando para pintar.

· nXPos
Specifies the logical x-coordinate of the pixel to be examined.
Posición X del pixel.

· nYPos
Specifies the logical y-coordinate of the pixel to be examined.
Posición Y del pixel.

Return Value
If the function succeeds, the return value is an RGB value. If the pixel is outside of the current clipping region, the return value is CLR_INVALID.

Valor de Retorno
Si la función termina satisfactoriamente, devolverá el valor RGB (el color). Si el pixel está fuera de la región de pintado, el valor será CLR_INVALID (constante).



Otra cosa: Los colores son en el formato hexadecimal RRGGBB, RR el byte rojo, GG el byte verde y BB el byte azul. Por ejemplo, FFFF00 será el color amarillo: 255 rojo, 255 verde, 0 azul. Pero eso supongo que lo sabes.

Eso debería funcionar. ¿Has conseguido pintar bien? ¿Sabes a qué se refiere cada parámetro: handles, colores, etc...?