invoke CreateRectRgnIndirect, addr CaptionRect
mov hRgnCaption, eax
mov hRgnNew, eax
...
invoke DeleteObject, hRgnCaption
PrintDec eax
invoke DefWindowProc, hWnd, WM_NCPAINT, hRgnNew, lParam
invoke DeleteObject, hRgnNew
PrintDec eax
The 1st DeleteObject() is success as the eax is non-zero. However the 2nd DeleteObject fails.
Anyone knows what problem?
you already deleted the object hRgnNew points to because it's the same one hRgnCaption points to
you created 2 pointers to the same object, not a copy of the object
you created 2 pointers to the same object, not a copy of the object
Thanks for your fastest response.
Could you suggest how to copy the handler?
Could you suggest how to copy the handler?
well if you need to keep using it, then skip the first DeleteObject :)
else create 2 different ones.
else create 2 different ones.
i see.
Thanks
Thanks
what you're doing is
mov firstvar, handletoobject
mov secondvar, handletothesameobjectasfirstvarpointsto
so that's a bit redundant. :)
mov firstvar, handletoobject
mov secondvar, handletothesameobjectasfirstvarpointsto
so that's a bit redundant. :)