News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

FrameRgn .. Problem..

Started by G`HOST, February 18, 2006, 02:59:34 PM

Previous topic - Next topic

G`HOST

RoundButtonWndProc proc hWnd,uMsg,wParam,lParam

LOCAL hRgn :HRGN
LOCAL ps :PAINTSTRUCT
LOCAL hdc :DWORD

.if uMsg==WM_CREATE
invoke CreateEllipticRgn,0,0,100,65
mov hRgn,eax
invoke SetWindowRgn,hWnd,hRgn,TRUE
.elseif uMsg==WM_PAINT
invoke BeginPaint,hWnd,addr ps
mov hdc,eax
invoke CreateSolidBrush,Red
invoke FrameRgn,hdc,hRgn,eax,4,4
invoke EndPaint,hWnd,addr ps
.else
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.endif
ret

RoundButtonWndProc endp


Can anybody tell why "FrameRgn" isnt working ???

zooba

Because LOCAL variables don't persist between invocations of RoundButtonWndProc :U They'll need to be in the .data/.data? section

G`HOST

 :U Oh I didnt know that........
Thanx