Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to draw a rounded bitmap?

How to draw a rounded bitmap?

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicstutorial
5 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    phped
    wrote on last edited by
    #1

    Hi there,How can I draw a rounded bitmap? Thanks a lot!

    C S P 3 Replies Last reply
    0
    • P phped

      Hi there,How can I draw a rounded bitmap? Thanks a lot!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You may be able to set a region. Otherwise you can use masking, just like any bitmap which is being drawn transparently with a colour key. I believe TransparentBlt works this way. You'll need W98 or later, and the Platform SDK. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

      1 Reply Last reply
      0
      • P phped

        Hi there,How can I draw a rounded bitmap? Thanks a lot!

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #3

        You might find these articles useful: http://www.codeproject.com/gdi/cliprgnguide.asp[^] http://www.codeproject.com/gdi/rgnguide.asp[^]

        ---

        Shog9 Life seems pretty easy when it's from my easy chair And you're burnin up inside and no one cares...

        P 1 Reply Last reply
        0
        • S Shog9 0

          You might find these articles useful: http://www.codeproject.com/gdi/cliprgnguide.asp[^] http://www.codeproject.com/gdi/rgnguide.asp[^]

          ---

          Shog9 Life seems pretty easy when it's from my easy chair And you're burnin up inside and no one cares...

          P Offline
          P Offline
          Paul M Watt
          wrote on last edited by
          #4

          Thanks for the plug :)


          Build a man a fire, and he will be warm for a day
          Light a man on fire, and he will be warm for the rest of his life!

          1 Reply Last reply
          0
          • P phped

            Hi there,How can I draw a rounded bitmap? Thanks a lot!

            P Offline
            P Offline
            Paul M Watt
            wrote on last edited by
            #5

            Use ::CreateRoundRectRgn to create a region with rounded corners. Then call ::SelectClipRgn with your DC that you are going to paint your bitmap onto. The clipping region will prevent your bitmap from painting outside of the rounded rectangle that you create. Shog9 has listed some articles here on CP that will help you. Good Luck


            Build a man a fire, and he will be warm for a day
            Light a man on fire, and he will be warm for the rest of his life!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups