Click here to Skip to main content
16,016,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiondebugger in visual c++ Pin
minkowski26-Sep-06 6:27
minkowski26-Sep-06 6:27 
AnswerRe: debugger in visual c++ Pin
Dimitris Vikeloudas26-Sep-06 6:41
Dimitris Vikeloudas26-Sep-06 6:41 
GeneralRe: debugger in visual c++ Pin
minkowski27-Sep-06 0:25
minkowski27-Sep-06 0:25 
GeneralRe: debugger in visual c++ Pin
Dimitris Vikeloudas27-Sep-06 1:42
Dimitris Vikeloudas27-Sep-06 1:42 
GeneralRe: debugger in visual c++ Pin
minkowski27-Sep-06 2:43
minkowski27-Sep-06 2:43 
GeneralRe: debugger in visual c++ Pin
Dimitris Vikeloudas27-Sep-06 4:10
Dimitris Vikeloudas27-Sep-06 4:10 
GeneralRe: debugger in visual c++ Pin
minkowski27-Sep-06 4:51
minkowski27-Sep-06 4:51 
QuestionZooming a text Pin
Dimitris Vikeloudas26-Sep-06 6:04
Dimitris Vikeloudas26-Sep-06 6:04 
I have a CEdit control and I would like to be able to zoom the text by a floating factor (i.e 0.75 or 1.25 for 80% or 100% zoom). I manage to resize the box to shrink or expand depending on the factor. However, I cannot get a scaled text. I tried the following code

<br />
      // Scale the window.<br />
  XFORM xForm;<br />
<br />
  xForm.eM11 = xForm.eM22 = (FLOAT)m_rZoomingFactor;<br />
  xForm.eM12 = xForm.eM21 = xForm.eDx = xForm.eDy = (FLOAT)0.0;<br />
<br />
  HDC hDC = this->GetWindowDC()->GetSafeHdc();<br />
<br />
  SetGraphicsMode(hDC, GM_ADVANCED);<br />
<br />
  ModifyWorldTransform( hDC, &xForm, MWT_LEFTMULTIPLY );<br />


either by calling it directly or by placing it inside the OnPaint message handler but I get no change.

I also thought that I may need to change the existing font. However, I looked to CFont class and to LOGFONT structure and I haven't seen a simple way to get a font which is a zoomed version of the current font.

How can I zoom a text in a CEdit control? Can I do it but somehow scaling the device context or should I change the font? How do I get a scaled version of the current font?

Note that this change may happen on fly. I 'd like to be able whilst the user is editing the text to zoom in and out. Resizing the box is not a problem but zooming the text is.
AnswerRe: Zooming a text Pin
Chris Meech26-Sep-06 9:54
Chris Meech26-Sep-06 9:54 
GeneralRe: Zooming a text Pin
Dimitris Vikeloudas26-Sep-06 22:14
Dimitris Vikeloudas26-Sep-06 22:14 
GeneralRe: Zooming a text Pin
Chris Meech27-Sep-06 4:49
Chris Meech27-Sep-06 4:49 
QuestionCString memory allocation question Pin
KellyR26-Sep-06 5:30
KellyR26-Sep-06 5:30 
AnswerRe: CString memory allocation question Pin
David Crow26-Sep-06 5:31
David Crow26-Sep-06 5:31 
GeneralRe: CString memory allocation question Pin
KellyR26-Sep-06 5:35
KellyR26-Sep-06 5:35 
QuestionConverting character to its ascii Pin
samita_friendly26-Sep-06 5:22
samita_friendly26-Sep-06 5:22 
AnswerRe: Converting character to its ascii Pin
toxcct26-Sep-06 5:25
toxcct26-Sep-06 5:25 
GeneralRe: Converting character to its ascii Pin
samita_friendly26-Sep-06 5:26
samita_friendly26-Sep-06 5:26 
QuestionRe: Converting character to its ascii Pin
David Crow26-Sep-06 5:32
David Crow26-Sep-06 5:32 
AnswerRe: Converting character to its ascii Pin
KellyR26-Sep-06 5:33
KellyR26-Sep-06 5:33 
GeneralRe: Converting character to its ascii Pin
samita_friendly26-Sep-06 5:35
samita_friendly26-Sep-06 5:35 
GeneralRe: Converting character to its ascii Pin
KellyR26-Sep-06 5:39
KellyR26-Sep-06 5:39 
GeneralRe: Converting character to its ascii Pin
toxcct26-Sep-06 5:40
toxcct26-Sep-06 5:40 
GeneralRe: Converting character to its ascii Pin
KellyR26-Sep-06 5:41
KellyR26-Sep-06 5:41 
GeneralRe: Converting character to its ascii Pin
toxcct26-Sep-06 5:51
toxcct26-Sep-06 5:51 
GeneralRe: Converting character to its ascii Pin
toxcct26-Sep-06 5:39
toxcct26-Sep-06 5:39 

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.