Results 1 to 6 of 6

Thread: Changing fill color

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169

    Changing fill color

    Hello all,

    I have a program which uses memory dc's to store some images, now I want to draw circle on it using the eppilipse api. But, i don't know any way to change the dc's fillcolor! There probably is some api that does it, but I don't know which one :/
    So if anyone knows, can you please tell me?

    Thanks in advance,

    Shell

  2. #2
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    It's the FillRgn API:
    Code:
    Declare Function FillRgn Lib "gdi32.dll" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
    Information could be found at vbapi.com, but that site doesn't exist anymore, and has become part of developer.com.

  3. #3
    Member anjulpa's Avatar
    Join Date
    Aug 2001
    Location
    india
    Posts
    43
    use createsolidbrush api to create a brush for a color.
    then use selectobject to select a particular brush
    finally at the end you must use deleteobject for deleting the brush

    ppl saw this
    Die, ***** Die !

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    anjulpa, i guest you need to restore the origianl brush which you get from the SelectObject as you assign the new brush to the memory dc.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    Ah! Why didn't I think of that lol.
    I'll give it a try.

    Thanks,

    Shell

  6. #6
    Member anjulpa's Avatar
    Join Date
    Aug 2001
    Location
    india
    Posts
    43
    anjulpa, i guest you need to restore the origianl brush which you get from the SelectObject as you assign the new brush to the memory dc
    Hey, wouldn't he know that if he were making a program ???

    ppl saw this
    Die, ***** Die !

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