Click here to Skip to main content
15,908,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Templates Pin
Mark Salsbery28-Aug-07 7:18
Mark Salsbery28-Aug-07 7:18 
QuestionC++/MFC GDI Fonts. Pin
Bhavesh Bagadiya28-Aug-07 0:03
Bhavesh Bagadiya28-Aug-07 0:03 
AnswerRe: C++/MFC GDI Fonts. Pin
chandu00428-Aug-07 0:08
chandu00428-Aug-07 0:08 
GeneralRe: C++/MFC GDI Fonts. Pin
Bhavesh Bagadiya28-Aug-07 0:12
Bhavesh Bagadiya28-Aug-07 0:12 
NewsRe: C++/MFC GDI Fonts. Pin
chandu00428-Aug-07 0:41
chandu00428-Aug-07 0:41 
GeneralRe: C++/MFC GDI Fonts. Pin
Bhavesh Bagadiya28-Aug-07 0:55
Bhavesh Bagadiya28-Aug-07 0:55 
AnswerRe: C++/MFC GDI Fonts. Pin
David Crow28-Aug-07 2:42
David Crow28-Aug-07 2:42 
AnswerRe: C++/MFC GDI Fonts. Pin
Iain Clarke, Warrior Programmer28-Aug-07 3:51
Iain Clarke, Warrior Programmer28-Aug-07 3:51 
I just did a small test, and lfOrientation does barely anything.
lfOrientation changes the angle of the whole string.

lfEscapement 
Specifies the angle, in tenths of degrees, between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text. 
Windows NT/2000/XP: When the graphics mode is set to GM_ADVANCED, you can specify the escapement angle of the string independently of the orientation angle of the string's characters. 

When the graphics mode is set to GM_COMPATIBLE, lfEscapement specifies both the escapement and orientation. You should set lfEscapement and lfOrientation to the same value. 

Windows 95/98/Me: The lfEscapement member specifies both the escapement and orientation. You should set lfEscapement and lfOrientation to the same value


So, set both values to the same thing, Unless you want some very wacky effects under GM_ADVANCED.

I just had a play in my OnDraw method...

::SetGraphicsMode (*pDC, GM_ADVANCED);

NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof (NONCLIENTMETRICS);
CString s;

s = "Hello";

ncm.lfStatusFont.lfOrientation = 450.0;
ncm.lfStatusFont.lfEscapement = -450.0;

pDC->TextOut (0,0, s);


and see the results!

One rotates the string, the other rotates individual characters.

If in doubt, do little test programs - it's the only way to learn.

Iain.

ncm.lfStatusFont.lfOrientation = 450.0;
ncm.lfStatusFont.lfEscapement = -450.0;






GeneralRe: C++/MFC GDI Fonts. Pin
Bhavesh Bagadiya28-Aug-07 21:00
Bhavesh Bagadiya28-Aug-07 21:00 
QuestionFile order in VS Pin
Russell'28-Aug-07 0:03
Russell'28-Aug-07 0:03 
AnswerRe: File order in VS Pin
KarstenK28-Aug-07 1:01
mveKarstenK28-Aug-07 1:01 
AnswerRe: File order in VS Pin
Cedric Moonen28-Aug-07 1:05
Cedric Moonen28-Aug-07 1:05 
GeneralRe: File order in VS Pin
Russell'28-Aug-07 1:17
Russell'28-Aug-07 1:17 
GeneralRe: File order in VS Pin
toxcct28-Aug-07 2:51
toxcct28-Aug-07 2:51 
GeneralRe: File order in VS Pin
Russell'28-Aug-07 2:56
Russell'28-Aug-07 2:56 
GeneralRe: File order in VS Pin
toxcct28-Aug-07 3:04
toxcct28-Aug-07 3:04 
GeneralRe: File order in VS Pin
Russell'28-Aug-07 3:17
Russell'28-Aug-07 3:17 
QuestionHow to Create a toolbar with Bitmap and text Pin
sudheee27-Aug-07 23:51
sudheee27-Aug-07 23:51 
AnswerRe: How to Create a toolbar with Bitmap and text Pin
Nishad S28-Aug-07 0:47
Nishad S28-Aug-07 0:47 
QuestionODBC Reconnect Pin
sanjutvm27-Aug-07 23:44
sanjutvm27-Aug-07 23:44 
AnswerRe: ODBC Reconnect Pin
KarstenK28-Aug-07 1:06
mveKarstenK28-Aug-07 1:06 
GeneralRe: ODBC Reconnect Pin
sanjutvm28-Aug-07 3:45
sanjutvm28-Aug-07 3:45 
GeneralRe: ODBC Reconnect Pin
KarstenK28-Aug-07 4:09
mveKarstenK28-Aug-07 4:09 
GeneralRe: ODBC Reconnect Pin
sanjutvm28-Aug-07 23:13
sanjutvm28-Aug-07 23:13 
GeneralRe: ODBC Reconnect Pin
David Crow28-Aug-07 4:20
David Crow28-Aug-07 4:20 

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.