this is the part of the code thats causing the problem:

.ELSEIF ms==WM_PAINT
invoke BeginPaint,hnd,addr ps
mov hdc,eax
invoke GetClientRect,hnd,addr rt ;rt==RECT structure
shr rt.right,1 ;divide client area width by 2
shr rt.bottom,1 ;divide client area height by 2
invoke SetMapMode,hdc,MM_TEXT
invoke SetViewportOrgEx,hdc,rt.right,rt.bottom,NULL
invoke CreateEllipticRgn,-50,-50,50,50
mov hr1,eax
invoke SelectClipRgn,hdc,hr1
invoke Rectangle,hdc,-10,-10,100,100
invoke DeleteObject,hr1
invoke SelectClipRgn,hdc,NULL


invoke EndPaint,hnd,addr ps
xor eax,eax
ret

xxxxxxxxxxxxxxxxx

im trying to create a elliptical clip region at the center of the client area, and then draw a rectangle so that only part of it gets seen...but its not working...i know that the ellipse is getting created at the center, and also that part of the rectangle is indeed within the clip region...because i check both individually...but when i use SelectClipRgn...the client area is totally blank!!

whats going on...any ideas?

full source code here;

http://members.aol.com/anotherway83/win32.txt

thanks
Posted on 2003-04-29 01:41:04 by AnotherWay83
nm figured it out....selectcliprgn works in device coordinates only
Posted on 2003-04-30 13:44:25 by AnotherWay83
this was what i was trying to do...finally managed to pull it off :D

http://members.aol.com/anotherway83/win32.txt

drag the mouse all over the client area...the mask moves over as well...and all objects and also the mask automatically size themselves when the window is resized :D (thanks MM_ANISOTROPIC!!)

EDIT: the code's been fixed so that the mask stays in place when u resize the window
Posted on 2003-05-02 18:14:53 by AnotherWay83