开发学院软件开发VC 程序:VC++字体通用的类 阅读

程序:VC++字体通用的类

 2008-12-19 19:40:08 来源:WEB开发网   
核心提示:include "stdafx.h"#include "font.h"// COleFont propertiesCString COleFont::GetName(){CString result;GetProperty(0x0, VT_BSTR, (void*)&result

include "stdafx.h"
#include "font.h"
// COleFont properties
CString COleFont::GetName()
{
CString result;
GetProperty(0x0, VT_BSTR, (void*)&result);
return result;
}
void COleFont::SetName(LPCTSTR propVal)
{
SetProperty(0x0, VT_BSTR, propVal);
}
CY COleFont::GetSize()
{
CY result;
GetProperty(0x2, VT_CY, (void*)&result);
return result;
}
void COleFont::SetSize(const CY& propVal)
{
SetProperty(0x2, VT_CY, &propVal);
}
BOOL COleFont::GetBold()
{
BOOL result;
GetProperty(0x3, VT_BOOL, (void*)&result);
return result;
}
void COleFont::SetBold(BOOL propVal)
{
SetProperty(0x3, VT_BOOL, propVal);
}
BOOL COleFont::GetItalic()
{
BOOL result;
GetProperty(0x4, VT_BOOL, (void*)&result);
return result;
}
void COleFont::SetItalic(BOOL propVal)
{
SetProperty(0x4, VT_BOOL, propVal);
}
BOOL COleFont::GetUnderline()
{
BOOL result;
GetProperty(0x5, VT_BOOL, (void*)&result);
return result;
}
void COleFont::SetUnderline(BOOL propVal)
{
SetProperty(0x5, VT_BOOL, propVal);
}
BOOL COleFont::GetStrikethrough()
{
BOOL result;
GetProperty(0x6, VT_BOOL, (void*)&result);
return result;
}
void COleFont::SetStrikethrough(BOOL propVal)
{
SetProperty(0x6, VT_BOOL, propVal);
}
short COleFont::GetWeight()
{
short result;
GetProperty(0x7, VT_I2, (void*)&result);
return result;
}
void COleFont::SetWeight(short propVal)
{
SetProperty(0x7, VT_I2, propVal);
}
short COleFont::GetCharset()
{
short result;
GetProperty(0x8, VT_I2, (void*)&result);
return result;
}
void COleFont::SetCharset(short propVal)
{
SetProperty(0x8, VT_I2, propVal);
}

Tags:程序 VC 字体

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接