如题,最近使用MS Chart控件,里面的字太大,想自己定制字体.不过,不会用COleFont,查了CSDN和MSDN,都没有.晕大了.100分求助,呵呵,已经没有多少分了~~~~
解决方案 »
- SendInput模拟鼠标右键点击时,屏幕老闪
- hook拦截send()
- 用过sqlite,懂得CppSQLite3Table 的请进,200分给你!
- 如何用WINSOCK实现FTP服务器端程序
- 如何使用VC多cell拷贝,如何修改单个cell中内容的字体,如何合并excel中的几个单元格
- 关于SDI的一个问题
- 单文档ondraw的问题
- 救命啊!!出错!standard mode: Invalid DPMI return from 037F:37F8
- 哪里可以找到微软的MPEG4文件格式的资料?
- 怎样动态加载OCX!ActiveXForm怎样加Param
- [还是要自己问哦]COleFont的用法,如何设置字体大小等参数.
- 求些关于Vc++界面设计实例方面的电子书
{
public:
COleFont() {} // Calls COleDispatchDriver default constructor
COleFont(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
COleFont(const COleFont& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}// Attributes
public:
CString GetName();
void SetName(LPCTSTR);
CY GetSize();
void SetSize(const CY&);
BOOL GetBold();
void SetBold(BOOL);
BOOL GetItalic();
void SetItalic(BOOL);
BOOL GetUnderline();
void SetUnderline(BOOL);
BOOL GetStrikethrough();
void SetStrikethrough(BOOL);
short GetWeight();
void SetWeight(short);
short GetCharset();
void SetCharset(short);// Operations
public:
};
它的函数都很简单,例如://Setup Local Variables in your code
COleFont MyFont;
CY FontSize;//Get a copy of the font from the component
MyFont = m_chart.GetFont();//Set the Font Size
FontSize.int64 = 240000; //Point Size 24 (24 * 10000 = 240000)
MyFont.SetSize(FontSize);//Set the Font Name
MyFont.SetName("Times New Roman"); //"Arial"等等//Set Various Font Styles
MyFont.SetBold(TRUE);
MyFont.SetItalic(FALSE);
MyFont.SetUnderline(FALSE);
MyFont.SetStrikethrough(FALSE);//Set the font back on the component
m_chart.SetFont(MyFont);