Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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
AnswerRe: Rotated text using Drawtext Pin
Chris Losinger11-Aug-10 8:19
professionalChris Losinger11-Aug-10 8:19 
GeneralRe: Rotated text using Drawtext Pin
Mary Chennai11-Aug-10 8:38
Mary Chennai11-Aug-10 8:38 
GeneralRe: Rotated text using Drawtext Pin
Luc Pattyn11-Aug-10 8:48
sitebuilderLuc Pattyn11-Aug-10 8:48 
GeneralRe: Rotated text using Drawtext Pin
Maximilien11-Aug-10 9:00
Maximilien11-Aug-10 9:00 
GeneralRe: Rotated text using Drawtext Pin
CPallini11-Aug-10 22:20
mveCPallini11-Aug-10 22:20 
QuestionReading chunks of Data Pin
AbhiHcl11-Aug-10 3:05
AbhiHcl11-Aug-10 3:05 
AnswerRe: Reading chunks of Data Pin
CPallini11-Aug-10 3:27
mveCPallini11-Aug-10 3:27 
AnswerRe: Reading chunks of Data Pin
elchupathingy11-Aug-10 3:34
elchupathingy11-Aug-10 3:34 
GeneralRe: Reading chunks of Data Pin
AbhiHcl11-Aug-10 3:42
AbhiHcl11-Aug-10 3:42 
GeneralRe: Reading chunks of Data Pin
Cool_Dev11-Aug-10 4:47
Cool_Dev11-Aug-10 4:47 
AnswerRe: Reading chunks of Data Pin
bleedingfingers11-Aug-10 7:59
bleedingfingers11-Aug-10 7:59 
Questionwrong output ,error in my program Pin
0x808511-Aug-10 3:03
0x808511-Aug-10 3:03 
AnswerRe: wrong output ,error in my program Pin
mk1488211-Aug-10 3:19
mk1488211-Aug-10 3:19 
GeneralRe: wrong output ,error in my program Pin
0x808511-Aug-10 3:30
0x808511-Aug-10 3:30 
AnswerRe: wrong output ,error in my program Pin
Maximilien11-Aug-10 3:26
Maximilien11-Aug-10 3:26 
GeneralRe: wrong output ,error in my program Pin
0x808511-Aug-10 3:41
0x808511-Aug-10 3:41 
GeneralRe: wrong output ,error in my program Pin
mk1488211-Aug-10 4:24
mk1488211-Aug-10 4:24 

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.