Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: merge mpeg --> COPY. NOOOOOO Pin
grv57523-May-03 8:18
grv57523-May-03 8:18 
GeneralRe: merge mpeg --> COPY Pin
Phil Hamer23-May-03 12:27
Phil Hamer23-May-03 12:27 
GeneralC1189: #error : MFC requires C++ compilation (use a .cpp suffix) Pin
zakarias23-May-03 6:05
zakarias23-May-03 6:05 
GeneralRe: C1189: #error : MFC requires C++ compilation (use a .cpp suffix) Pin
valikac23-May-03 9:15
valikac23-May-03 9:15 
GeneralRe: C1189: #error : MFC requires C++ compilation (use a .cpp suffix) Pin
peterchen23-May-03 20:03
peterchen23-May-03 20:03 
GeneralRe: C1189: #error : MFC requires C++ compilation (use a .cpp suffix) Pin
zakarias24-May-03 21:51
zakarias24-May-03 21:51 
GeneralDrawing in Visual C++ Pin
ewhite23-May-03 5:45
ewhite23-May-03 5:45 
GeneralRe: Drawing in Visual C++ Pin
73Zeppelin23-May-03 5:58
73Zeppelin23-May-03 5:58 
I think VC++ has functionality for drawing a portion of
an ellipse (arc). Of course a circle is just an ellipse
with eccentricity 1.
Below are two ways to draw something like what you are after.
The first draws an ellipse in a box, the 2nd draws the
(sort of) bottom half of an arc.

You could put something like this in your OnDraw() and play
around with it abit:
pDC->SetMapMode( m_nMapMode );
// Draw an ellipse based on the current map-mode and
// user supplied values
CRect   rcClient;
GetClientRect( rcClient );
pDC->DPtoLP( rcClient );    // Covert device units to logical units
CPoint  ptCenter( rcClient.Width()/2, rcClient.Height()/2 );
CRect   rcEllipse( ptCenter.x - ( m_cxEllipse/2 ),
                   ptCenter.y - ( m_cyEllipse/2 ),
                   ptCenter.x + ( m_cxEllipse/2 ),
                   ptCenter.y + ( m_cyEllipse/2 ) );
CPen    penRed( PS_SOLID, m_nPenWidth, RGB(255,0,0) );
CPen*   pOldPen = pDC->SelectObject( &penRed );
pDC->Ellipse( rcEllipse );
// Draw a black box around the ellipse, using one of the stock
// pens.
pDC->SelectStockObject( BLACK_PEN );
pDC->MoveTo( rcEllipse.TopLeft() );
pDC->LineTo( rcEllipse.right, rcEllipse.top );
pDC->LineTo( rcEllipse.BottomRight() );
pDC->LineTo( rcEllipse.left, rcEllipse.bottom );
pDC->LineTo( rcEllipse.left, rcEllipse.top );

// Draw an arc using the client area as a bounding rectangle.
// Cut the arc so that only the lower-half is displayed.
CPen    penDottedAndGreen( PS_DOT, 1, RGB(0,255,0) );
pDC->SelectObject( &penDottedAndGreen );
pDC->Arc(rcClient, rcClient.TopLeft(),rcClient.TopRight());
pDC->SelectObject( &pOldPen );

GeneralRe: Drawing in Visual C++ Pin
Iain Clarke, Warrior Programmer23-May-03 6:10
Iain Clarke, Warrior Programmer23-May-03 6:10 
GeneralRe: Drawing in Visual C++ Pin
ewhite23-May-03 6:58
ewhite23-May-03 6:58 
GeneralRe: Drawing in Visual C++ Pin
73Zeppelin23-May-03 7:52
73Zeppelin23-May-03 7:52 
GeneralSQL Command Pin
roshanak23-May-03 5:07
roshanak23-May-03 5:07 
GeneralRe: SQL Command Pin
Brian D23-May-03 5:44
Brian D23-May-03 5:44 
GeneralGetting version of MDB file Pin
Dean Michaud23-May-03 5:07
Dean Michaud23-May-03 5:07 
QuestionInclude Looping? Pin
Ricky_TheBard23-May-03 4:01
Ricky_TheBard23-May-03 4:01 
AnswerRe: Include Looping? Pin
73Zeppelin23-May-03 4:09
73Zeppelin23-May-03 4:09 
GeneralRe: Include Looping? Pin
Ricky_TheBard23-May-03 4:22
Ricky_TheBard23-May-03 4:22 
GeneralRe: Include Looping? Pin
73Zeppelin23-May-03 4:25
73Zeppelin23-May-03 4:25 
GeneralRe: Include Looping? Pin
Ricky_TheBard23-May-03 4:35
Ricky_TheBard23-May-03 4:35 
GeneralRe: Include Looping? Pin
73Zeppelin23-May-03 4:36
73Zeppelin23-May-03 4:36 
GeneralRe: Include Looping? Pin
Ricky_TheBard23-May-03 4:43
Ricky_TheBard23-May-03 4:43 
GeneralRe: Include Looping? Pin
73Zeppelin23-May-03 4:53
73Zeppelin23-May-03 4:53 
GeneralRe: Include Looping? Pin
Ricky_TheBard23-May-03 7:00
Ricky_TheBard23-May-03 7:00 
GeneralRe: Include Looping? Pin
Ranjan Banerji23-May-03 5:13
Ranjan Banerji23-May-03 5:13 
AnswerRe: Include Looping? Pin
Rage23-May-03 4:32
professionalRage23-May-03 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.