ThallionDarkshine
Member
So, for my RGSS Addon, I decided they I should use the win32api to set pixels and that sort of stuff. So, I got the handle of device context, and I tried to set several pixels in the window, but the function keeps returning -1 (failure). There's probably something that I'm missing, but could someone help me figure this out.
My code:
My code:
Code:
def win32test
@find_window = Win32API.new("user32", "FindWindow", "LL", "L")
@set_pixel = Win32API.new("gdi32", "SetPixel", "PIIP", "I")
window = @find_window.call("RGSS Player", "Test")
color = 0x00FF0000
result = @set_pixel.call(window, 0, 0, color)
print result
end