Results 1 to 1 of 1

Thread: Region border?

  1. #1

    Thread Starter
    Addicted Member herpysz's Avatar
    Join Date
    Mar 2002
    Location
    Europe>Moldova>Kishinev
    Posts
    176

    Region border?

    I have 3 region that after that are created,they are combined!
    I need to make a border only to one region that is RoundRect and have a white background! So I need a black border rgb(0,0,0)!

    Where i have to put the code that draw border for region 1 ?
    And what code i have to use: FrameRgn?
    After creating the region or after combining???

    These is the code i'm using:

    Public Function CreateSpForm()
    Dim lngRegion1 As Long
    Dim lngRegion2 As Long
    Dim lngRegion3 As Long
    Dim lngStatus As Long
    lngRegion1 = CreateRoundRectRgn(5, 32, 280, 53, 20, 10)
    lngRegion2 = CreateRoundRectRgn(5, 65, 385, 205, 35, 20)
    lngRegion3 = CreateRoundRectRgn(385, 32, 325, 85, 20, 10)

    lngStatus = CombineRgn(lngRegion1, lngRegion1, lngRegion2, RGN_OR)
    lngStatus = CombineRgn(lngRegion1, lngRegion1, lngRegion3, RGN_OR)

    If lngStatus = SIMPLEREGION Or lngStatus = COMPLEXREGION Then
    lngStatus = SetWindowRgn(baza.hwnd, lngRegion1, True)
    End If

    DeleteObject lngRegion1
    DeleteObject lngRegion2
    DeleteObject lngRegion3
    End function

    So...these code is working, but i need a border because the programm is looking ugly on a white background!

    thanks!
    Last edited by herpysz; Feb 9th, 2003 at 04:24 PM.
    Next regards from Herpysz!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width