ÇØ°á |
The first function returns the color of a specific pixel. The SetPixel function changes the targeted pixel to the
color sent. There is no Powerbuilder equivalent.
Global External Function:
FUNCTION ulong GetPixel(ulong hwnd, long xpos, long ypos) LIBRARY "Gdi32.dll"
FUNCTION ulong SetPixel(ulong hwnd, long xpos, long ypos, ulong pcol) LIBRARY "Gdi32.dll"
Script:
long lx, ly
ulong rtn
ulong l_handle, l_device
lx = 100
ly = 100
l_handle = handle(w_main)
l_device = GetDC(l_handle)
rtn = GetPixel(l_device, 100, 100)
MessageBox("Position " + string(lx) + "," + string(ly), "Color = "+ string(rtn) )
SetPixel(l_device, lx, ly, 0) // This call will set the pixel at lx, ly to black.
|