wrong size ellipse

This is a discussion on wrong size ellipse within the Windows Programming forums, part of the Platform Specific Boards category; nothing to see here, moved to c++ forum...

  1. #1
    cereal killer dP munky's Avatar
    Join Date
    Nov 2002
    Posts
    655

    wrong size ellipse

    nothing to see here, moved to c++ forum
    Attached Files Attached Files
    Last edited by dP munky; 04-10-2003 at 08:16 PM.
    guns dont kill people, abortion clinics kill people.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Your passing the whole client area (client rect) to the DrawNextFrame() section then creating an elipse that size.

    Try creating the elipse a smaller size ie multiply the width/height of the rect by a set amount eg 0.10 for 1 bal 10% the size of teh client area.

    PS If you create a GDI object (brushes in this case) then you MUST delete them.

    You can not delete them while selected into a DC. (some can be deleted while selected int a DC ie regions but best bet is to follow this rule and not get into trouble)

    //create GDI memory
    hbrFill = CreateSolidBrush(0);// null == 0 == BLACK
    //select in
    hOldGDI=(HBRUSH)SelectObject(hdc,hbrFill);
    //draw
    Elipse(Bla...................);
    //select out
    SelectObject(hdc,hOldGDI);
    //clean up GDI memory
    DeleteObject(hbrFill);

    PS
    pen = CreatePen(50,50,RGB(25,0,255));

    why do you not use the hash defined values as per the help ?

    Like
    PS_SOLID

    in case MS decides to change the number in winGDI.h

    50 is WIDE for a brush, to draw a line I use 1-6 or so.

    and for ease
    #define BLUE RGB(0,0,255)
    "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. Fixing my program
    By Mcwaffle in forum C Programming
    Replies: 5
    Last Post: 11-05-2008, 02:55 AM
  2. Error with a vector
    By Tropicalia in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2006, 07:45 PM
  3. Obtaining the system font in custom size
    By @nthony in forum Windows Programming
    Replies: 6
    Last Post: 08-01-2006, 12:05 AM
  4. Confused about Memory
    By gL_nEwB in forum C++ Programming
    Replies: 22
    Last Post: 06-20-2006, 07:32 PM
  5. What's wrong ?
    By Nutshell in forum C Programming
    Replies: 1
    Last Post: 01-13-2002, 11:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21