<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CFontDialog, so schwer kanns doch net sein...]]></title><description><![CDATA[<p>Hi zusammen,</p>
<p>ich hab ein kleines proggie geschrieben, das die Common Dialogs benutzt, die waren alle kein Prob. bis ich auf CFontDialog traf.<br />
Ich kann die Attribute des ausgewählen Fonts sogar in eine TextBox auslesen mit CFontDialig fontDlg.Get...().<br />
Wenn ich aber in besagter TextBox eien Text stehen hab (ausgewählt und geladen mitm File Dialog) klappts einfach net.</p>
<p>Hier mal mein Code :</p>
<pre><code class="language-cpp">CFontDialog		fontDlg;
	if (fontDlg.DoModal() == IDOK)
	{
            CString name;
            name = fontDlg.GetFaceName ();

	    m_font.CreateFont(32, 
                               0, 
                               0, 
                               0, 
                       FW_NORMAL, 
                               0, 
                               0,
                               0,                  
                 DEFAULT_CHARSET,
            OUT_CHARACTER_PRECIS, 
           CLIP_CHARACTER_PRECIS, 
                 DEFAULT_QUALITY, 
			    NULL,
                            name);

       m_ctrEdit.SetFont(&amp;m_font);
       UpdateData (FALSE);
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/172698/cfontdialog-so-schwer-kanns-doch-net-sein</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 18:20:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/172698.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Feb 2007 16:02:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CFontDialog, so schwer kanns doch net sein... on Wed, 07 Feb 2007 16:02:06 GMT]]></title><description><![CDATA[<p>Hi zusammen,</p>
<p>ich hab ein kleines proggie geschrieben, das die Common Dialogs benutzt, die waren alle kein Prob. bis ich auf CFontDialog traf.<br />
Ich kann die Attribute des ausgewählen Fonts sogar in eine TextBox auslesen mit CFontDialig fontDlg.Get...().<br />
Wenn ich aber in besagter TextBox eien Text stehen hab (ausgewählt und geladen mitm File Dialog) klappts einfach net.</p>
<p>Hier mal mein Code :</p>
<pre><code class="language-cpp">CFontDialog		fontDlg;
	if (fontDlg.DoModal() == IDOK)
	{
            CString name;
            name = fontDlg.GetFaceName ();

	    m_font.CreateFont(32, 
                               0, 
                               0, 
                               0, 
                       FW_NORMAL, 
                               0, 
                               0,
                               0,                  
                 DEFAULT_CHARSET,
            OUT_CHARACTER_PRECIS, 
           CLIP_CHARACTER_PRECIS, 
                 DEFAULT_QUALITY, 
			    NULL,
                            name);

       m_ctrEdit.SetFont(&amp;m_font);
       UpdateData (FALSE);
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1224528</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224528</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Wed, 07 Feb 2007 16:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to CFontDialog, so schwer kanns doch net sein... on Wed, 07 Feb 2007 16:04:13 GMT]]></title><description><![CDATA[<p>UUUp, zu früh geklickt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>hoffe Ihr könnt mir helfen oder kennt ihr n gutes Tut bezüglich zpeziell CFontDialog ich hab da sehr wenig gefunden !</p>
<p>Vielen Dank Leute<br />
ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1224529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224529</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Wed, 07 Feb 2007 16:04:13 GMT</pubDate></item><item><title><![CDATA[Reply to CFontDialog, so schwer kanns doch net sein... on Thu, 08 Feb 2007 07:41:24 GMT]]></title><description><![CDATA[<p>So funzt das leider auch net:</p>
<pre><code class="language-cpp">void CThereader0001Dlg::OnFontClicked() 
{
	CFont			m_font; 
	CFontDialog		fontDlg;

	if (fontDlg.DoModal() == IDOK)
	{
		CString strMsg;
		CString txtMessage;

// 			strMsg.Format(&quot;Schriftart: %s\r\nStyleName: %s\r\nSchriftgrad: \t%d\r\nFarbe: \t\t%d\r\nGewicht: \t\t%d\r\nDurchgestrichen:\t%d\r\nUnterstrichen: \t%d\r\nFett: \t\t%d\r\nKursiv: \t\t%d\r\n&quot;,
// 				fontDlg.GetFaceName(),
// 				fontDlg.GetStyleName(),
// 				fontDlg.GetSize(),
// 				fontDlg.GetColor(),
// 				fontDlg.GetWeight(),
// 				fontDlg.IsStrikeOut(),
// 				fontDlg.IsUnderline(),
// 				fontDlg.IsBold(),
// 				fontDlg.IsItalic()
// 				);

			m_font.CreateFont (fontDlg.GetSize (),20,0,0,fontDlg.GetWeight (),fontDlg.IsItalic (),fontDlg.IsUnderline (),fontDlg.IsStrikeOut (),DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,0,DEFAULT_QUALITY,DEFAULT_PITCH,fontDlg.GetFaceName ());

			m_ctrEdit.SetFont(&amp;m_font);			

	}

}
</code></pre>
<p>Das anzeigen(klappt), sonst nix !</p>
<p>regards ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1224845</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224845</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Thu, 08 Feb 2007 07:41:24 GMT</pubDate></item><item><title><![CDATA[Reply to CFontDialog, so schwer kanns doch net sein... on Thu, 08 Feb 2007 11:46:45 GMT]]></title><description><![CDATA[<p>Hallo zusammen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ,</p>
<p>also falls es jemand interessiert so klappte es :</p>
<pre><code class="language-cpp">void CThereader0001Dlg::OnFontClicked() 
{

	CFontDialog		fontDlg;
	CFont          *m_font = new CFont; 

	if (fontDlg.DoModal() == IDOK)
	{
		m_font-&gt;CreateFont (fontDlg.GetSize() / 7.25
							,NULL
							,0
							,0
							,fontDlg.GetWeight ()
							,fontDlg.IsItalic ()
							,fontDlg.IsUnderline ()
							,fontDlg.IsStrikeOut ()
							,DEFAULT_CHARSET
							,OUT_DEFAULT_PRECIS
							,0
							,DEFAULT_QUALITY
							,DEFAULT_PITCH
							,fontDlg.GetFaceName ());

		m_ctrEdit.SetFont(m_font);
	}
	delete m_font;

}
</code></pre>
<p>Ich weiss aber nicht 100%-tig warum ich CFont auf den Heap schieben muss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Weiss jemand Rat ?</p>
<p>Danke für eure Mühe<br />
ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1224977</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224977</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Thu, 08 Feb 2007 11:46:45 GMT</pubDate></item></channel></rss>