Click here to Skip to main content
15,916,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Conversion Hex string to ASCII value Pin
Naveen2-Feb-07 0:59
Naveen2-Feb-07 0:59 
GeneralRe: Conversion Hex string to ASCII value Pin
Roger Stoltz2-Feb-07 1:00
Roger Stoltz2-Feb-07 1:00 
GeneralRe: Conversion Hex string to ASCII value Pin
Ram Murali4-Feb-07 14:28
Ram Murali4-Feb-07 14:28 
AnswerRe: Conversion Hex string to ASCII value Pin
David Crow2-Feb-07 3:01
David Crow2-Feb-07 3:01 
GeneralRe: Conversion Hex string to ASCII value Pin
Ram Murali4-Feb-07 14:27
Ram Murali4-Feb-07 14:27 
QuestionDrawing a slanting Rectangle or ellipse Pin
Tony Kurishunkal1-Feb-07 21:53
Tony Kurishunkal1-Feb-07 21:53 
AnswerRe: Drawing a slanting Rectangle or ellipse Pin
Mark Salsbery2-Feb-07 7:15
Mark Salsbery2-Feb-07 7:15 
AnswerRe: Drawing a slanting Rectangle or ellipse Pin
Stephen Hewitt4-Feb-07 16:31
Stephen Hewitt4-Feb-07 16:31 
Try code like this:
CPaintDC dc(this); // device context for painting
 
// Some constants we'll be needing.
static const double pi = 4.0*atan(1.0);
static const double degToRad = pi/180.0;
 
// The angle to rotate by.
static const double angle = 45.0*degToRad; // Set angle here.
 
// The center of rotation.
static const int cx = 200;
static const int cy = 200;
 
// Build the transformation matrix.
static const float cosAngle = static_cast<float>(cos(angle));
static const float sinAngle = static_cast<float>(sin(angle));
static const XFORM xf =
	{
		cosAngle, sinAngle,
		-sinAngle, cosAngle,
		-cx*cosAngle+cy*sinAngle+cx, -cx*sinAngle-cy*cosAngle+cy
	};
 
// Apply the transform to the DC.
int oldMode = ::SetGraphicsMode(dc.GetSafeHdc(), GM_ADVANCED);
::SetWorldTransform(dc.GetSafeHdc(), &xf);
 
// Draw the ellipse.
dc.Ellipse(cx-100, cy-50, cx+100, cy+50);
 
// Restore the initial state of the DC.
::SetGraphicsMode(dc.GetSafeHdc(), oldMode);



Steve

QuestionNT Service [modified] Pin
david bagaturia1-Feb-07 21:52
david bagaturia1-Feb-07 21:52 
AnswerRe: NT Service Pin
Hamid_RT2-Feb-07 6:01
Hamid_RT2-Feb-07 6:01 
GeneralRe: NT Service Pin
david bagaturia5-Feb-07 23:24
david bagaturia5-Feb-07 23:24 
QuestionXerces and VS 2003 Pin
Sitaram Sukumar1-Feb-07 21:49
Sitaram Sukumar1-Feb-07 21:49 
QuestionVirtual memory Problem [modified] Pin
voorugonda prashanth1-Feb-07 20:18
voorugonda prashanth1-Feb-07 20:18 
AnswerRe: Virtual memory Problem Pin
jhwurmbach1-Feb-07 21:36
jhwurmbach1-Feb-07 21:36 
GeneralRe: Virtual memory Problem Pin
Waldermort1-Feb-07 21:45
Waldermort1-Feb-07 21:45 
GeneralRe: Virtual memory Problem Pin
jhwurmbach1-Feb-07 21:48
jhwurmbach1-Feb-07 21:48 
GeneralRe: Virtual memory Problem Pin
voorugonda prashanth1-Feb-07 22:09
voorugonda prashanth1-Feb-07 22:09 
GeneralRe: Virtual memory Problem [modified] Pin
jhwurmbach1-Feb-07 22:43
jhwurmbach1-Feb-07 22:43 
GeneralRe: Virtual memory Problem Pin
Roger Stoltz1-Feb-07 22:07
Roger Stoltz1-Feb-07 22:07 
GeneralRe: Virtual memory Problem Pin
Waldermort2-Feb-07 4:17
Waldermort2-Feb-07 4:17 
GeneralRe: Virtual memory Problem Pin
Roger Stoltz2-Feb-07 4:57
Roger Stoltz2-Feb-07 4:57 
AnswerRe: Virtual memory Problem Pin
ThatsAlok1-Feb-07 21:41
ThatsAlok1-Feb-07 21:41 
QuestionRTC problem Pin
minihotto1-Feb-07 19:52
minihotto1-Feb-07 19:52 
QuestionCRecordset Pin
Bravoone_20061-Feb-07 19:41
Bravoone_20061-Feb-07 19:41 
QuestionRe: CR Pin
prasad_som1-Feb-07 19:49
prasad_som1-Feb-07 19:49 

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.