⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_63206.htm

📁 vc
💻 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>&nbsp;&nbsp; // Create the font using the selected font from CFontDialog.<BR>&nbsp;&nbsp; LOGFONT lf;<BR>&nbsp;&nbsp; memcpy(&amp;lf, dlg.m_cf.lpLogFont, sizeof(LOGFONT));<BR><BR>&nbsp;&nbsp; CFont font;<BR>&nbsp;&nbsp; VERIFY(font.CreateFontIndirect(&amp;lf));<BR><BR>&nbsp;&nbsp; // Do something with the font just created...<BR>&nbsp;&nbsp; CClientDC dc(this);<BR>&nbsp;&nbsp; CFont* def_font = dc.SelectObject(&amp;font);<BR>&nbsp;&nbsp; dc.TextOut(5, 5, &#34;Hello&#34;, 5);<BR>&nbsp;&nbsp; dc.SelectObject(def_font);<BR><BR>&nbsp;&nbsp; // Done with the font. Delete the font object.<BR>&nbsp;&nbsp; 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 + -