News:

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

How to make an unsquare window?

Started by xandaz, March 14, 2010, 11:04:28 AM

Previous topic - Next topic

xandaz

   Hey guys. i was trying to create an unsquare window but it didn't work out. i did sometihng like this :

        .elseif uMsg==WM_CREATE
               
                mov     edi,lParam
                assume  edi:PTR CREATESTRUCT

                .if     [edi].hWndParent==NULL
                        invoke  GetWindowRect,hWnd,addr rect
                        invoke  CreateEllipticRgnIndirect,addr rect
                        mov     hRgn1,eax
                        invoke  CreateRectRgnIndirect,addr rect
                        mov     hRgn2,eax
                        invoke  CombineRgn,hRgn1,hRgn2,hRgn1,RGN_DIFF
                       
                .endif
       
        .elseif uMsg==WM_PAINT
               
                invoke  BeginPaint,hWnd,addr ps
                invoke  SelectClipRgn,ps.hdc,hRgn1
                invoke  CreateSolidBrush,0ff0000h
                invoke  SelectObject,ps.hdc,eax
                invoke  PaintRgn,ps.hdc,eax
                invoke  EndPaint,hWnd,addr ps
       
Can someone explain this for me?
thanks once more and laterz

Vortex

Custom windows shape by mob :

\masm32\examples\exampl06\mob\cws

xandaz

   Thanks a lot Vortex. I'm checking it out.
   Ty and bye

Bill Cravener

Custom window with rounded corners example using a bitmap.

Custom Window Example
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

xandaz

   Thanks a lot Bill. It's easier than i thought. I just used SetWindowRgn, and it seems to work dor any region or combined regions.
   Ty guys you're the best. Hopefully someday i'll know enough to be able to retribute the kindness you've shown me.
   Best regards from X :)

xandaz

   Nice looking window btw Bill. :)
   Bye :)

Bill Cravener

Thanks xandaz,

Really its not that difficult at all to achieve what you what to do in Windows. Get the Windows SDK. Determine what is is you wish to accomplish. Search the SDK and read, read, read. You'll soon find its right there in front of you.

To me reading the Windows SDK is like reading a good sex novel only it ain't fiction buddy, and like a good sex novel you get great gratification out of it. :bg
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat