layer Posted June 28, 2005 Share Posted June 28, 2005 (edited) Hey guys and gals,I've come into a problem... I'm making an _InvertRect() functions, and the code is as followed:Func _InvertRect($title, $x1, $y1, $x2, $y2) Local $hwnd, $DC, $RECT, $ret $hwnd = WinGetHandle($title) $DC = DLLCall ("gdi32.dll", "hwnd", "GetDC", "hWnd", $hwnd) $RECT = DllStructCreate("long;long;long;long") DllStructSetData($RECT, 1, $x1) DllStructSetData($RECT, 1, $x2) DllStructSetData($RECT, 1, $y1) DllStructSetData($RECT, 1, $y2) $ret = DlLCall("user32.dll", "int", "InvertRect", "hwnd", $DC, "ptr", $RECT) Return $ret[0] EndFunc ;Testing... MsgBox(0, "_InverRect", _InvertRect("", 0, 0, 10, 10))When I run this, I get the windows error message that AutoIt3 has errored out or something, not an AutoIt error... With the "Send and Do Not Send" buttons... Is there a reason for this?Thanks! EDIT: Requires latest BETA.EDIT2: Fixed the GetDC call, but same error from windows... Edited June 28, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
layer Posted June 28, 2005 Author Share Posted June 28, 2005 ARGH!! I don't get it, I just coded up like 1,000,000 DllStruct, DllCall's and I looked at them now and they all look like they should be (how you coded them)... I think it's because I'm thinking about someone ... BTW, Those DllStruct DllCall's I was coding were for your challenge I'm up to the BitBlt parts... I know there is a little of it is wrong too, I'll look at it again tomorrow. Thanks! FootbaG Link to comment Share on other sites More sharing options...
layer Posted June 28, 2005 Author Share Posted June 28, 2005 Umm, lol, maybe it's my moniter but it doesn't invert the colors, but it returns 1! I know on MSDN it said it depends on your color software or whatever... Thanks. FootbaG Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now