<?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[Themes und Tab-Controls]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich habe ein TabControl (benutze keine Resourcen!) und möchte diesem ein Theme zuweisen, also das Standard-XP-Theme für TabControls, welches man ja aus &quot;Bildschirmeigenschaften&quot; usw. kennt.</p>
<p>Dafür habe ich folgende Funktion hier im Board gefunden:</p>
<pre><code class="language-cpp">#include &lt;uxtheme.h&gt;
typedef HRESULT (WINAPI * ENABLETHEMEDIALOGTEXTURE)(HWND, DWORD);
HRESULT WINAPI MyEnableThemeDialogTexture(HWND hWnd, DWORD dwFlags)
{
    ENABLETHEMEDIALOGTEXTURE pfnETDT;
    HINSTANCE                hDll;
    HRESULT                  hr;

    hr = HRESULT_FROM_WIN32(ERROR_CALL_NOT_IMPLEMENTED);

    if(NULL != (hDll = LoadLibrary(TEXT(&quot;uxtheme.dll&quot;))))
    {
        if(NULL != (pfnETDT = (ENABLETHEMEDIALOGTEXTURE)GetProcAddress(hDll, &quot;EnableThemeDialogTexture&quot;)))
            hr = pfnETDT(hWnd, dwFlags);
        FreeLibrary(hDll);
    }

    return(hr);
}
</code></pre>
<p>Ich führe diesen Code auf dem Hauptfenster aus (mit den Flags ETDT_ENABLE | ETDT_USETABTEXTURE), doch da hat es irgendwie keinen Effekt. Führe ich es auf dem Handle des TabControls aus, hat dies auch keinen Effekt, obwohl ich beide mit ShowWindow und UpdateWindow aktuallisiere nach dem Vorgehen. Theme wird unterstützt und die Methode gibt S_OK wieder. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Jemand eine Idee woran es liegen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/233856/themes-und-tab-controls</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 13:07:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/233856.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Feb 2009 09:34:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Themes und Tab-Controls on Tue, 10 Feb 2009 09:34:45 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich habe ein TabControl (benutze keine Resourcen!) und möchte diesem ein Theme zuweisen, also das Standard-XP-Theme für TabControls, welches man ja aus &quot;Bildschirmeigenschaften&quot; usw. kennt.</p>
<p>Dafür habe ich folgende Funktion hier im Board gefunden:</p>
<pre><code class="language-cpp">#include &lt;uxtheme.h&gt;
typedef HRESULT (WINAPI * ENABLETHEMEDIALOGTEXTURE)(HWND, DWORD);
HRESULT WINAPI MyEnableThemeDialogTexture(HWND hWnd, DWORD dwFlags)
{
    ENABLETHEMEDIALOGTEXTURE pfnETDT;
    HINSTANCE                hDll;
    HRESULT                  hr;

    hr = HRESULT_FROM_WIN32(ERROR_CALL_NOT_IMPLEMENTED);

    if(NULL != (hDll = LoadLibrary(TEXT(&quot;uxtheme.dll&quot;))))
    {
        if(NULL != (pfnETDT = (ENABLETHEMEDIALOGTEXTURE)GetProcAddress(hDll, &quot;EnableThemeDialogTexture&quot;)))
            hr = pfnETDT(hWnd, dwFlags);
        FreeLibrary(hDll);
    }

    return(hr);
}
</code></pre>
<p>Ich führe diesen Code auf dem Hauptfenster aus (mit den Flags ETDT_ENABLE | ETDT_USETABTEXTURE), doch da hat es irgendwie keinen Effekt. Führe ich es auf dem Handle des TabControls aus, hat dies auch keinen Effekt, obwohl ich beide mit ShowWindow und UpdateWindow aktuallisiere nach dem Vorgehen. Theme wird unterstützt und die Methode gibt S_OK wieder. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Jemand eine Idee woran es liegen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1660948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1660948</guid><dc:creator><![CDATA[C++&#x27;ler]]></dc:creator><pubDate>Tue, 10 Feb 2009 09:34:45 GMT</pubDate></item><item><title><![CDATA[Reply to Themes und Tab-Controls on Sat, 14 Feb 2009 06:06:21 GMT]]></title><description><![CDATA[<p>siehe in der fortgeschrittenen Gruppe win32<br />
news://nntp.aioe.org/comp.os.ms-windows.programmer.win32</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1663599</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1663599</guid><dc:creator><![CDATA[fred100]]></dc:creator><pubDate>Sat, 14 Feb 2009 06:06:21 GMT</pubDate></item><item><title><![CDATA[Reply to Themes und Tab-Controls on Sun, 22 Feb 2009 19:44:57 GMT]]></title><description><![CDATA[<p>da gibt es kein thema zu.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668326</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668326</guid><dc:creator><![CDATA[C++&#x27;ler]]></dc:creator><pubDate>Sun, 22 Feb 2009 19:44:57 GMT</pubDate></item><item><title><![CDATA[Reply to Themes und Tab-Controls on Sun, 22 Feb 2009 21:24:08 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>dann solltest du das Manifest einbinden. Entweder als Resource - oder eine Manifestdatei in der Nachbarschaft deiner Exe mitführen.</p>
<p>Ist schlampiges Design, aber dafür ist MS ja bekannt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668388</guid><dc:creator><![CDATA[CStern]]></dc:creator><pubDate>Sun, 22 Feb 2009 21:24:08 GMT</pubDate></item></channel></rss>