Re: Buttons

new topic     » goto parent     » topic index » view thread      » older message » newer message

------=_NextPart_000_0040_01BFF297.8E153040
        charset="iso-8859-2"

> Make non-rectangular buttons (for ex.: Round buttons)

i came accross this on the web. i didnt test it, but should work. its vb
code. you can easily transalte it to euphoria code using win32lib. let me
know if you do it, becuase i am interested in this too. send code to see it
when done.

i got it on this site:
http://www.vbcode.com/asp/showsn.asp?theID=220

attached is the whole file, down here is the most important code:


Private Function GetTextRgn() As Long
    Dim hRgn1 As Long, hRgn2 As Long
    Dim rct As RECT

    BeginPath hdc

    TextOut hdc, 10, 10, Chr$(255), 1     'Windows Flag

    'Circle (2000, 2000), 1000            'Circle window

'Create any path you want in this section to create your irregular window.

    EndPath hdc

    hRgn1 = PathToRegion(hdc)
    GetRgnBox hRgn1, rct
    hRgn2 = CreateRectRgnIndirect(rct)
    CombineRgn hRgn2, hRgn2, hRgn1, 1
    DeleteObject hRgn1
    GetTextRgn = hRgn2
End Function

----when you create window, use this function after created:

hRgn = GetTextRgn()
SetWindowRgn (hwnd, hRgn, 1)






------=_NextPart_000_0040_01BFF297.8E153040
        name="irregular shaped windows.txt"
Content-Transfer-Encoding: quoted-printable

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu