Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Setting font size (Read 2470 times)
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Setting font size
Jul 11th, 2007 at 7:23am
Print Post  
Hi

I would like to set the font size for the text in my applilcation. I try to use the "SetFont" method in the FlowChartX class. This method expects a OleFont object as a parameter. How can I set the size for this OleFont object? I do not know how to use the "SetSize" method for this object. If I would like to set the size to 10, what parameter should I pass to the "SetSize" method of the OleFont object?


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Setting font size
Reply #1 - Jul 11th, 2007 at 8:49am
Print Post  
Hi,

From the MSDN library: "The upper 32-bits of this value contains the integer point size and the lower 32-bits contains the fractional point size". So for font size of 10 points, you should probably assign 10 << 32.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Re: Setting font size
Reply #2 - Jul 11th, 2007 at 9:27am
Print Post  
Hi Stoyan

The CY object (which describes the size of the OleFont object) has three attributes: Lo, Hi and int64. I tried setting Lo=10 and Hi=32 but this caused an error.
Any ideas how to set these attributes?

P.s I tried seaching my MSDN library but I did not find anything regarding CY.


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Setting font size
Reply #3 - Jul 11th, 2007 at 10:34am
Print Post  
Hi Magnus,

You either assign "10 << 32" to the int64 field, or assign 10 to Hi and 0 to Lo. That quote was from the IFont::get_Size help topic in the MSDN.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint