<?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[Schriftart und Fenster erstellen in Thread von DLL]]></title><description><![CDATA[<p>Hi<br />
ich habe zwei Probleme.</p>
<p>1. Ich habe in meiner DLL einen Thread laufen, in diesem Thread wird ein Fenster erstellt (CreateWindow etc.), allerdings hab ich ja keine HINSTANCE Variable, die mir normalerweiße über die WinMain übergeben wird. wenn ich in dem Thread nun einfach HINSTANCE hInstance = 0 schreibe, funktioniert das zwar mit dem Fenster, aber ich kann z.B. keine selbst eingefügte Icons darstellen. Kann mir einer weiterhelfen?</p>
<p>2. In einem Programm habe ich per Winapi ein Fenster erstellt mit Buttons und einer Checkbox.<br />
Allerdings waren die eher hässlich, also hab ich geschaut wie man das ändern kann und habe CreateFont(..) eingebaut. Ich hätte aber gern die Standardschrift. Gibts da eine extra Funktion oder kann mir da jemand die Werte für CreateFont nennen?</p>
<p>So sehen die Buttons ohne eigene Schrift aus:<br />
<a href="http://home.arcor.de/masto/buttons_igitt.jpg" rel="nofollow">http://home.arcor.de/masto/buttons_igitt.jpg</a></p>
<p>und so sollten sie aussehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> :<br />
<a href="http://home.arcor.de/masto/buttons_fein.jpg" rel="nofollow">http://home.arcor.de/masto/buttons_fein.jpg</a></p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/162017/schriftart-und-fenster-erstellen-in-thread-von-dll</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 07:46:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/162017.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Oct 2006 14:54:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Schriftart und Fenster erstellen in Thread von DLL on Fri, 13 Oct 2006 14:54:49 GMT]]></title><description><![CDATA[<p>Hi<br />
ich habe zwei Probleme.</p>
<p>1. Ich habe in meiner DLL einen Thread laufen, in diesem Thread wird ein Fenster erstellt (CreateWindow etc.), allerdings hab ich ja keine HINSTANCE Variable, die mir normalerweiße über die WinMain übergeben wird. wenn ich in dem Thread nun einfach HINSTANCE hInstance = 0 schreibe, funktioniert das zwar mit dem Fenster, aber ich kann z.B. keine selbst eingefügte Icons darstellen. Kann mir einer weiterhelfen?</p>
<p>2. In einem Programm habe ich per Winapi ein Fenster erstellt mit Buttons und einer Checkbox.<br />
Allerdings waren die eher hässlich, also hab ich geschaut wie man das ändern kann und habe CreateFont(..) eingebaut. Ich hätte aber gern die Standardschrift. Gibts da eine extra Funktion oder kann mir da jemand die Werte für CreateFont nennen?</p>
<p>So sehen die Buttons ohne eigene Schrift aus:<br />
<a href="http://home.arcor.de/masto/buttons_igitt.jpg" rel="nofollow">http://home.arcor.de/masto/buttons_igitt.jpg</a></p>
<p>und so sollten sie aussehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> :<br />
<a href="http://home.arcor.de/masto/buttons_fein.jpg" rel="nofollow">http://home.arcor.de/masto/buttons_fein.jpg</a></p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1154187</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1154187</guid><dc:creator><![CDATA[Abrow]]></dc:creator><pubDate>Fri, 13 Oct 2006 14:54:49 GMT</pubDate></item><item><title><![CDATA[Reply to Schriftart und Fenster erstellen in Thread von DLL on Fri, 13 Oct 2006 15:10:41 GMT]]></title><description><![CDATA[<ol>
<li></li>
</ol>
<pre><code class="language-cpp">GetModuleHandle(NULL);
</code></pre>
<ol start="2">
<li></li>
</ol>
<pre><code class="language-cpp">reinterpret_cast&lt;HFONT&gt;(GetStockObject(DEFAULT_GUI_FONT));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1154207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1154207</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 13 Oct 2006 15:10:41 GMT</pubDate></item><item><title><![CDATA[Reply to Schriftart und Fenster erstellen in Thread von DLL on Fri, 13 Oct 2006 15:43:55 GMT]]></title><description><![CDATA[<p>juhuuu cool danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> :p <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
Noch eine Frage:<br />
bis jetzt hab ichs immer so gemacht</p>
<pre><code class="language-cpp">SendMessage(hButton, WM_SETFONT, (WPARAM)hFont, (LPARAM)1);
</code></pre>
<p>muss ich das für jedes Element einzeln aufrufen oder gibts da so ne Art globale Funktion?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1154254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1154254</guid><dc:creator><![CDATA[Abrow]]></dc:creator><pubDate>Fri, 13 Oct 2006 15:43:55 GMT</pubDate></item><item><title><![CDATA[Reply to Schriftart und Fenster erstellen in Thread von DLL on Fri, 13 Oct 2006 16:15:50 GMT]]></title><description><![CDATA[<p>Ne, keine Funktion, aber das man unter nem Message-Handler von WM_CTLCOLORBTN machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1154273</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1154273</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 13 Oct 2006 16:15:50 GMT</pubDate></item></channel></rss>