新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     >>计算机科学论坛<<     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论高级C/C++编程、代码重构(Refactoring)、极限编程(XP)、泛型编程等话题
    [返回] 计算机科学论坛计算机技术与应用『 C/C++编程思想 』 → 如何在VC++中建立字体通用的类? 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 3806 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 如何在VC++中建立字体通用的类? 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     葛靖青001 美女呀,离线,快来找我吧!水瓶座1984-2-14
      
      
      等级:大三(研究MFC有点眉目了!)
      文章:168
      积分:595
      门派:XML.ORG.CN
      注册:2010/11/2

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给葛靖青001发送一个短消息 把葛靖青001加入好友 查看葛靖青001的个人资料 搜索葛靖青001在『 C/C++编程思想 』的所有贴子 点击这里发送电邮给葛靖青001 引用回复这个贴子 回复这个贴子 查看葛靖青001的博客楼主
    发贴心情 如何在VC++中建立字体通用的类?

    【转自互联网】

    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);
    }


       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    ---人之所以能,是相信能!!

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2010/11/29 11:07:00
     
     GoogleAdSense水瓶座1984-2-14
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 C/C++编程思想 』的所有贴子 点击这里发送电邮给Google AdSense 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/5/6 13:12:35

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    35.156ms