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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Draw in MFC

Draw in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
5 Posts 4 Posters 0 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.
  • H Offline
    H Offline
    HoldMe
    wrote on last edited by
    #1

    I draw an ellipse but it fill by CBrush, help me how to not fill it. Thanks!!!

    C M 2 Replies Last reply
    0
    • H HoldMe

      I draw an ellipse but it fill by CBrush, help me how to not fill it. Thanks!!!

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

      DrawEllipse instead of FillEllipse, or set the brush to be a null brush ( which is not the same as NULL ) so that it is transparent. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002

      E 1 Reply Last reply
      0
      • H HoldMe

        I draw an ellipse but it fill by CBrush, help me how to not fill it. Thanks!!!

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        Use CPen instead of using CBrush. Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

        1 Reply Last reply
        0
        • C Christian Graus

          DrawEllipse instead of FillEllipse, or set the brush to be a null brush ( which is not the same as NULL ) so that it is transparent. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002

          E Offline
          E Offline
          Eugene Pustovoyt
          wrote on last edited by
          #4

          ...
          pDC->SelectStockObject(NULL_BRUSH);
          pDC->Ellipse(...);
          ...

          Best regards, Eugene Pustovoyt

          C 1 Reply Last reply
          0
          • E Eugene Pustovoyt

            ...
            pDC->SelectStockObject(NULL_BRUSH);
            pDC->Ellipse(...);
            ...

            Best regards, Eugene Pustovoyt

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

            That's almost right, except does SelectStockOBject manage GDI resources better than SelectObject, or will it leak ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002

            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