Click here to Skip to main content
16,008,942 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to use rebar Chevrons in WTL? Pin
JohnnyG20-Jul-02 18:43
JohnnyG20-Jul-02 18:43 
GeneralProblems deserializing an object Pin
Mike Puddephat19-Jul-02 3:23
Mike Puddephat19-Jul-02 3:23 
GeneralC++ syntax question Pin
pankajdaga19-Jul-02 3:17
pankajdaga19-Jul-02 3:17 
GeneralRe: C++ syntax question Pin
Mike Upton19-Jul-02 3:32
Mike Upton19-Jul-02 3:32 
GeneralRe: C++ syntax question Pin
Christian Graus19-Jul-02 3:33
protectorChristian Graus19-Jul-02 3:33 
GeneralRe: C++ syntax question Pin
Mike Puddephat19-Jul-02 3:35
Mike Puddephat19-Jul-02 3:35 
GeneralDrawing strings on GDI+ that are vertical bottom to top aligned! Pin
Williams19-Jul-02 3:04
Williams19-Jul-02 3:04 
GeneralRotate the text, yourself Pin
Jonathan de Halleux19-Jul-02 5:16
Jonathan de Halleux19-Jul-02 5:16 
Yep, that's a serious limitation of GDI+ but it can be easily overpassed by rotating yourself the text:
// defined somewhere
Graphics* m_pGraphics;			


What you have to do is :
1. translate text to origin,
2. rotate,
3. translate back to position,

Let's go:
We create a graphic container to apply transformations
graphicsContainer = m_pGraphics->BeginContainer();

Doing steps 1,2,3 the order of matrix multiplication is important !
m_pGraphics->TranslateTransform(pointF.X,pointF.Y);
// angle is the angle you want to rotate your text in CCW turn with 0 = horizontal. Of course, in GDI+, Microsoft uses
// CW angle so it is not compatible with trigonometric functions :(
m_pGraphics->RotateTransform(-angle);
m_pGraphics->TranslateTransform(-pointF.X,-pointF.Y);

Draw the string
m_pGraphics->DrawString(str, -1, &font, pointF, &sf,&solidBrush);

Fold back transformations by getting out of the container
m_pGraphics->EndContainer(graphicsContainer);


Jonathan de Halleux, Belgium.
GeneralRe: Rotate the text, yourself Pin
Williams19-Jul-02 5:33
Williams19-Jul-02 5:33 
Generalsingle instance Pin
slah19-Jul-02 2:43
slah19-Jul-02 2:43 
GeneralRe: single instance Pin
Mike Upton19-Jul-02 3:09
Mike Upton19-Jul-02 3:09 
GeneralRe: single instance Pin
Raphael Kindt19-Jul-02 3:12
Raphael Kindt19-Jul-02 3:12 
GeneralRe: single instance Pin
Mike Upton19-Jul-02 3:46
Mike Upton19-Jul-02 3:46 
GeneralRe: single instance Pin
Raphael Kindt19-Jul-02 5:18
Raphael Kindt19-Jul-02 5:18 
GeneralPIC C interrupt using #int_global Pin
Lucky the code machine19-Jul-02 2:14
Lucky the code machine19-Jul-02 2:14 
GeneralRe: PIC C interrupt using #int_global Pin
Rage19-Jul-02 2:43
professionalRage19-Jul-02 2:43 
GeneralSkins Pin
Rage19-Jul-02 1:42
professionalRage19-Jul-02 1:42 
GeneralRe: Skins Pin
James Spibey19-Jul-02 2:00
James Spibey19-Jul-02 2:00 
GeneralRe: Skins Pin
Rage19-Jul-02 2:02
professionalRage19-Jul-02 2:02 
GeneralMatrix memory allocation Pin
Rage19-Jul-02 1:25
professionalRage19-Jul-02 1:25 
GeneralRe: Matrix memory allocation Pin
Raphael Kindt19-Jul-02 1:34
Raphael Kindt19-Jul-02 1:34 
QuestionDisplay an image from a buffer ??? Pin
Raphael Kindt19-Jul-02 1:03
Raphael Kindt19-Jul-02 1:03 
AnswerRe: Display an image from a buffer ??? Pin
Chris Losinger19-Jul-02 3:37
professionalChris Losinger19-Jul-02 3:37 
GeneralRe: Display an image from a buffer ??? Pin
Raphael Kindt19-Jul-02 3:59
Raphael Kindt19-Jul-02 3:59 
GeneralRe: Display an image from a buffer ??? Pin
Chris Losinger19-Jul-02 4:00
professionalChris Losinger19-Jul-02 4:00 

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.