Thread: Beginner's Question: GDI CIRCLE

  1. #1
    Registered User
    Join Date
    May 2005
    Location
    Texas
    Posts
    103

    Beginner's Question: GDI CIRCLE

    How exactly can you make a circle?? I've seen that you do it with an elipse function. If it is an ellipse how can you reshape it to a circle?? Sorry...I am a bigginer to windows programming. I am into GDI...and want to understand it so I can make a simple pong game...with GDI before advancing into DirectX and COM stuff...
    THANK YOU IN ADVANCE!!!

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Are you using MFC or WIN32?

    Elipse() takes a rectangle. If you send in a square it will draw a circle.

    You can also draw a point with a very thick pen..

    for a pen with a dot (circle) 20 pixel in diameter
    HPEN hPen=CreatePen(PS_SOLID, 20, RGB(255, 255, 255) );

    RGB(255, 255, 255) is the colour. Red, Green, Blue from 0 - 255 where 0 = blackest (no colour) and 255 = white (max colour).
    Last edited by novacain; 09-09-2005 at 10:33 PM.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. scanf question
    By hockey1 in forum C Programming
    Replies: 1
    Last Post: 03-22-2009, 09:17 PM
  3. circle problem
    By gunghomiller in forum C++ Programming
    Replies: 10
    Last Post: 07-14-2007, 06:40 PM
  4. A GDI question that is perhaps deeper than I think...
    By conright in forum Windows Programming
    Replies: 2
    Last Post: 01-03-2003, 06:24 AM
  5. Stupid beginner's question
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 10-08-2001, 10:34 PM