📄 subject_63206.htm
字号:
<p>
序号:63206 发表者:徐相华 发表日期:2003-12-02 10:38:34
<br>主题:求CFontDialog的应用例子
<br>内容:求CFontDialog的应用例子<BR>最好把字体的内容都运用到。再加分!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:太平冰水 回复日期:2003-12-02 12:46:21
<br>内容:CFontDialog dlg;<BR>if (dlg.DoModal() == IDOK)<BR>{<BR> // Create the font using the selected font from CFontDialog.<BR> LOGFONT lf;<BR> memcpy(&lf, dlg.m_cf.lpLogFont, sizeof(LOGFONT));<BR><BR> CFont font;<BR> VERIFY(font.CreateFontIndirect(&lf));<BR><BR> // Do something with the font just created...<BR> CClientDC dc(this);<BR> CFont* def_font = dc.SelectObject(&font);<BR> dc.TextOut(5, 5, "Hello", 5);<BR> dc.SelectObject(def_font);<BR><BR> // Done with the font. Delete the font object.<BR> font.DeleteObject();<BR>}<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -