• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆-59  評論-36  文章-0  trackbacks-0
            前提假定,對話框上有一個ID為IDC_TEST的控件。

            在OnInitDialog函數(shù)中插入一下代碼:
            m_font.CreatePointFont(909,_T("宋體"));
            GetDlgItem(IDC_TEST)
            ->SetFont(&m_font);
            編譯后便可看見效果

            說明:
            在我第一次嘗試更改控件變量的字體時,使用了如下的代碼:
            CFont font
            font.CreatePointFont(
            909,_T("宋體"));
            GetDlgItem(IDC_TEST)
            ->SetFont(&font);

            結(jié)果,控件的字體并沒有改變。后來得知SetFont函數(shù)有如下要求:
            The SetFont() member function of the CWnd class changes the font in a specified control. For this function to work correctly in a Windows- based application, you must ensure that the CFont object specified in the SetFont() call is not destroyed until after the specified control has been destroyed.

            其中的"...you must ensure that the CFont object specified in the SetFont() call is not destroyed until after the specified control has been destroyed. "便是關(guān)鍵。
            所以在更該控件的字體時,CFont對象必須是靜態(tài)或者成員變量。
            posted on 2009-12-30 22:05 zhaoyg 閱讀(521) 評論(0)  編輯 收藏 引用 所屬分類: MFC學(xué)習(xí)筆記
            午夜天堂av天堂久久久| 久久亚洲精品无码观看不卡| 亚洲AV无一区二区三区久久| 97久久国产综合精品女不卡| 久久精品一本到99热免费| 热99re久久国超精品首页| 欧美国产精品久久高清| 色综合久久久久综合体桃花网| 久久久久久国产精品无码超碰| 亚洲精品国产成人99久久| 久久人与动人物a级毛片| 91麻豆精品国产91久久久久久| 四虎影视久久久免费观看| 99国产欧美精品久久久蜜芽| 久久综合亚洲色HEZYO国产| 久久96国产精品久久久| 欧美日韩精品久久久久| 久久久国产一区二区三区| 久久精品国产网红主播| 香蕉久久夜色精品国产尤物| 国产一区二区精品久久凹凸| 久久99国产乱子伦精品免费| 中文字幕热久久久久久久| 久久99精品久久久久久齐齐 | 草草久久久无码国产专区| 欧美日韩久久中文字幕| 天堂无码久久综合东京热| 成人国内精品久久久久影院VR| 久久亚洲国产成人精品性色| 久久久国产打桩机| 性高湖久久久久久久久AAAAA| 国产精品嫩草影院久久| 亚洲国产精品久久66| 久久天堂电影网| 亚洲国产精品久久久久网站| 91久久香蕉国产熟女线看| 91久久精品国产成人久久| 国产精品免费久久久久影院| 精品久久久久久久久久中文字幕| 国产免费福利体检区久久| 很黄很污的网站久久mimi色|