Click here to Skip to main content
15,903,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Duplicate String Pin
Aescleal12-Aug-10 2:17
Aescleal12-Aug-10 2:17 
GeneralRe: Duplicate String Pin
Nuri Ismail12-Aug-10 0:44
Nuri Ismail12-Aug-10 0:44 
GeneralRe: Duplicate String Pin
Niklas L12-Aug-10 1:17
Niklas L12-Aug-10 1:17 
GeneralRe: Duplicate String Pin
Aescleal12-Aug-10 1:19
Aescleal12-Aug-10 1:19 
GeneralRe: Duplicate String Pin
Niklas L12-Aug-10 1:30
Niklas L12-Aug-10 1:30 
GeneralRe: Duplicate String Pin
CPallini12-Aug-10 1:38
mveCPallini12-Aug-10 1:38 
GeneralRe: Duplicate String Pin
Niklas L12-Aug-10 1:42
Niklas L12-Aug-10 1:42 
GeneralRe: Duplicate String Pin
CPallini12-Aug-10 1:59
mveCPallini12-Aug-10 1:59 
GeneralRe: Duplicate String Pin
Niklas L12-Aug-10 5:34
Niklas L12-Aug-10 5:34 
QuestionC++ Pin
tushar.shinde00711-Aug-10 21:29
tushar.shinde00711-Aug-10 21:29 
AnswerRe: C++ PinPopular
Rick York11-Aug-10 21:39
mveRick York11-Aug-10 21:39 
QuestionLNK2001 - Help needed Pin
Hari_1611-Aug-10 20:07
Hari_1611-Aug-10 20:07 
AnswerRe: LNK2001 - Help needed Pin
«_Superman_»11-Aug-10 20:09
professional«_Superman_»11-Aug-10 20:09 
GeneralRe: LNK2001 - Help needed Pin
Hari_1611-Aug-10 20:50
Hari_1611-Aug-10 20:50 
GeneralRe: LNK2001 - Help needed Pin
Hari_1611-Aug-10 21:22
Hari_1611-Aug-10 21:22 
AnswerRe: LNK2001 - Help needed Pin
Rick York11-Aug-10 21:40
mveRick York11-Aug-10 21:40 
GeneralRe: LNK2001 - Help needed Pin
Hari_1611-Aug-10 23:01
Hari_1611-Aug-10 23:01 
Questionhow to avoid window swing when it zoom out from center point Pin
onlywjh11-Aug-10 16:31
onlywjh11-Aug-10 16:31 
AnswerRe: how to avoid window swing when it zoom out from center point Pin
«_Superman_»11-Aug-10 18:59
professional«_Superman_»11-Aug-10 18:59 
GeneralRe: how to avoid window swing when it zoom out from center point Pin
onlywjh13-Aug-10 0:36
onlywjh13-Aug-10 0:36 
GeneralRe: how to avoid window swing when it zoom out from center point Pin
onlywjh13-Aug-10 0:38
onlywjh13-Aug-10 0:38 
AnswerRe: how to avoid window swing when it zoom out from center point Pin
Rozis13-Aug-10 11:09
Rozis13-Aug-10 11:09 
AnswerRe: how to avoid window swing when it zoom out from center point Pin
onlywjh17-Aug-10 20:58
onlywjh17-Aug-10 20:58 
AnswerRe: how to avoid window swing when it zoom out from center point Pin
onlywjh17-Aug-10 21:08
onlywjh17-Aug-10 21:08 
QuestionRotated text using Drawtext Pin
Mary Chennai11-Aug-10 8:15
Mary Chennai11-Aug-10 8:15 
Hi,

I have used the code below to draw rotated text using DrawText.

//Draw rotated text
double Escapement = -401;
CString str = "Hello World";

CFont newFont;
newFont.CreateFont(24, 0, Escapement, Escapement, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Arial");
CFont* pFont = pDC->SelectObject(&newFont);


// draw the text
CSize TextSize = pDC->GetTextExtent(str);
CRect rect(0,0,TextSize.cx, TextSize.cy);
pDC->DrawText(str, str.GetLength(), rect, DT_CENTER);

Text is diplayed fine for non-rotated text. But for rotated text(ie, with Escapemnt != 0), the text appears to be clipped or sometimes not displayed at all. This is because the rect value is too restrictive for rotated text.

Please can someone help me to deduce the rect value correctly for rotated texts?

Regards
Mary

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.