很急,帮帮小女子吧

解决方案 »

  1.   

    你的mdi程序是采用的CEditView视类为基类吗?
    如果是的话,可以重载视类的OnActivateView函数,在其中添加代码:
    //m_font是视类的成员变量,是CFont类型的.
    LOGFONT lf;
    memset(&lf, 0, sizeof(LOGFONT));       // zero out structure
    lf.lfHeight=-36;
    lf.lfWeight=400;
    lf.lfOutPrecision=3;
    lf.lfClipPrecision=2;
    lf.lfQuality=1;
    lf.lfPitchAndFamily=18;
    strcpy(lf.lfFaceName, "Times New Roman");        // request a face name "Arial"
    m_font.DeleteObject(); 
    VERIFY(m_font.CreateFontIndirect(&lf));  // create the font m_font.DeleteObject(); 
    SetFont(&m_font);你可以从下面的地址下载一个设置Edti控件字体的例子程序:
    http://www.yangning.com/pages/SetFont.htm
      

  2.   

    http://www.yangning.com/ 是我的个人网站,有若干VC源码可下载.
      

  3.   

    我的文档是基于cview的,也可以这样吗?