Click here to Skip to main content
15,905,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 22:12
sitebuilderNish Nishant2-Jan-02 22:12 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 19:14
sitebuilderNish Nishant2-Jan-02 19:14 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 19:16
sitebuilderNish Nishant2-Jan-02 19:16 
GeneralRe: Reference & Pointer :: C++ Pin
valikac2-Jan-02 19:28
valikac2-Jan-02 19:28 
GeneralRe: Reference & Pointer :: C++ Pin
Vimal Earnest3-Jan-02 0:52
Vimal Earnest3-Jan-02 0:52 
GeneralRe: Reference & Pointer :: C++ Pin
valikac3-Jan-02 8:25
valikac3-Jan-02 8:25 
GeneralGDI+ and RoundRect Pin
Andreas Hallberg2-Jan-02 17:03
Andreas Hallberg2-Jan-02 17:03 
GeneralRe: GDI+ and RoundRect Pin
Christian Graus2-Jan-02 17:08
protectorChristian Graus2-Jan-02 17:08 
Nope - not there.

I did it like this:

GraphicsPath* CGPaintShape::MakeRoundRect(Point topLeft, Point bottomRight, INT percentageRounded)
{
	ASSERT (percentageRounded >= 0 && percentageRounded <= 100);

	// Like they said in the X Files - Trust No One.  Rather than crash and burn,
	// I just pull out the correct edges from the points given, regardless of if they were wrong.

	INT left  = MIN(topLeft.X, bottomRight.X);
	INT right = MAX(topLeft.X, bottomRight.X);

	INT top    = MIN(topLeft.Y, bottomRight.Y);
	INT bottom = MAX(topLeft.Y, bottomRight.Y);

	INT offsetX = (right-left)*percentageRounded/100;  
	INT offsetY = (bottom-top)*percentageRounded/100;

	GraphicsPath * path = new GraphicsPath;

	path->AddArc(right-offsetX, top, offsetX, offsetY, 270, 90);
	
	path->AddArc(right-offsetX, bottom-offsetY, offsetX, offsetY, 0, 90);

	path->AddArc(left, bottom - offsetY, offsetX, offsetY, 90, 90);

	path->AddArc(left, top, offsetX, offsetY, 180, 90);

	path->AddLine(left + offsetX, top, right - offsetX/2, top);

	return path;
}



Christian

I have come to clean zee pooollll. - Michael Martin Dec 30, 2001

Sonork ID 100.10002:MeanManOz
I live in Bob's HungOut now

GeneralRe: GDI+ and RoundRect Pin
Andreas Hallberg2-Jan-02 17:50
Andreas Hallberg2-Jan-02 17:50 
GeneralComplex Multiplication Pin
Roger Wright (new)2-Jan-02 16:09
Roger Wright (new)2-Jan-02 16:09 
GeneralRe: Complex Multiplication Pin
Michael Dunn2-Jan-02 20:34
sitebuilderMichael Dunn2-Jan-02 20:34 
GeneralRe: Complex Multiplication Pin
Roger Wright (new)3-Jan-02 5:45
Roger Wright (new)3-Jan-02 5:45 
GeneralMonitor messages Pin
2-Jan-02 15:51
suss2-Jan-02 15:51 
GeneralRe: Monitor messages Pin
Christian Graus2-Jan-02 15:59
protectorChristian Graus2-Jan-02 15:59 
GeneralRe: Monitor messages Pin
56789012342-Jan-02 20:57
56789012342-Jan-02 20:57 
GeneralObject serialization without using MFC Pin
Pieter Viljoen2-Jan-02 14:02
Pieter Viljoen2-Jan-02 14:02 
QuestionSTLPort anyone ??? Pin
Christian Graus2-Jan-02 13:09
protectorChristian Graus2-Jan-02 13:09 
AnswerRe: STLPort anyone ??? Pin
Philip Patrick2-Jan-02 23:44
professionalPhilip Patrick2-Jan-02 23:44 
GeneralRe: STLPort anyone ??? Pin
Christian Graus3-Jan-02 0:02
protectorChristian Graus3-Jan-02 0:02 
GeneralRe: STLPort anyone ??? Pin
Philip Patrick3-Jan-02 0:09
professionalPhilip Patrick3-Jan-02 0:09 
GeneralRe: STLPort anyone ??? Pin
Alexander Berthold3-Jan-02 0:10
Alexander Berthold3-Jan-02 0:10 
GeneralRe: STLPort anyone ??? Pin
Christian Graus3-Jan-02 1:29
protectorChristian Graus3-Jan-02 1:29 
GeneralGetting Monitor Name Pin
2-Jan-02 12:23
suss2-Jan-02 12:23 
GeneralRe: Getting Monitor Name Pin
Nish Nishant2-Jan-02 16:36
sitebuilderNish Nishant2-Jan-02 16:36 
GeneralRe: Getting Monitor Name Pin
3-Jan-02 6:13
suss3-Jan-02 6:13 

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.