<?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[Titelleiste permanent ändern trotz fsStayOnTop?]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich würde gerne die Titelleiste meines Hauptfensters einfärben und ohne &quot;FormStyle = fsStayOnTop&quot; klappt das auch alles ganz prima (in OnPaint implementiert). Nur mit besagter Änderung wird die OnPaint-Routine halt nur beim Start aufgerufen, und die Titelleiste bekommt je nach Aktion wieder die Standardfarbe für aktive bzw. inaktive Fenster.</p>
<p>Gibt's irgendwie ne ordentliche Lösung für das Problem?</p>
<p>Schonmal Danke im voraus,<br />
Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/85979/titelleiste-permanent-ändern-trotz-fsstayontop</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 18:29:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/85979.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Sep 2004 15:22:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Tue, 14 Sep 2004 15:22:21 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich würde gerne die Titelleiste meines Hauptfensters einfärben und ohne &quot;FormStyle = fsStayOnTop&quot; klappt das auch alles ganz prima (in OnPaint implementiert). Nur mit besagter Änderung wird die OnPaint-Routine halt nur beim Start aufgerufen, und die Titelleiste bekommt je nach Aktion wieder die Standardfarbe für aktive bzw. inaktive Fenster.</p>
<p>Gibt's irgendwie ne ordentliche Lösung für das Problem?</p>
<p>Schonmal Danke im voraus,<br />
Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607088</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607088</guid><dc:creator><![CDATA[spackos]]></dc:creator><pubDate>Tue, 14 Sep 2004 15:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Tue, 14 Sep 2004 16:55:29 GMT]]></title><description><![CDATA[<p>ja, die Benutereinstellungen respektieren und die Captionfarbe nicht ändern...</p>
<p>Mach es zumindest so, dass der User wählen kann, ob die Captionfarbe geändert werden darf oder nicht.</p>
<p>Ansonsten: Was passiert wenn Du nach den Aktionen, die eine Änderung der Farbe bewirken ein Form-&gt;Invalidate() ausführst? Hilft das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607167</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 14 Sep 2004 16:55:29 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Wed, 15 Sep 2004 07:59:47 GMT]]></title><description><![CDATA[<p>Ich will ja nicht nur die Caption-Farbe sondern auch den Hintergrund ändern (im Endeffekt ist es natürlich ein Übermalen der Titelleiste) und es soll ja auch nur für einen einmaligen Warnhinweis sein, da brauch man eigentlich keine Wahloption einbauen denke ich.</p>
<p>Was das Neuzeichnen angeht ist es halt das Problem die Aktionen abzufangen. Wenn ich außerhalb des Fensters klicke wird die Titelleiste grau (=Fenster inaktiv) und wenn ich danach wieder im Fenster klicke blau (=Fenster aktiv).<br />
Muss man da extra Windows-Messages abfangen oder ist das alles unnötig kompliziert?</p>
<p>Hab auch schon überlegt ein Formular ohne Titelleiste zu nehmen da ich sie ja eh &quot;zukleister&quot; aber irgendwie sieht der Fenster-Stil da gleich ganz anders aus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607562</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607562</guid><dc:creator><![CDATA[spackos]]></dc:creator><pubDate>Wed, 15 Sep 2004 07:59:47 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Wed, 15 Sep 2004 08:39:42 GMT]]></title><description><![CDATA[<p>Hab's jetzt doch ohne vorgegebene Titelleiste gelöst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607600</guid><dc:creator><![CDATA[spackos]]></dc:creator><pubDate>Wed, 15 Sep 2004 08:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Wed, 15 Sep 2004 10:33:29 GMT]]></title><description><![CDATA[<p>Zum Abfangen der Botschaften hätte sich TApplication::OnDeactivate ::OnActivate angeboten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607681</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 15 Sep 2004 10:33:29 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Wed, 15 Sep 2004 14:54:05 GMT]]></title><description><![CDATA[<p>Hoppla, doch so einfach, manchmal sieht man den Wald vor lauter Bäumen nicht. Mir viel nur spontan OnDeactivate des Fensters auf und damit klappts natürlich nicht.</p>
<p>Vielen Dank, habs direkt nochmal umgeändert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607933</guid><dc:creator><![CDATA[spackos]]></dc:creator><pubDate>Wed, 15 Sep 2004 14:54:05 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Wed, 15 Sep 2004 15:27:33 GMT]]></title><description><![CDATA[<p>hm...jetzt habe ich leider noch das Problem, das der Bereiche der Titelleiste als aktiv (blau) neu gezeichnet wird wenn er außerhalb der oberen oder unteren Bildkante verschwindet und dann wieder vorgeholt wird.</p>
<p>Jemand ne Idee welche Message beim Verlassen des Bildbereichs ausgelöst wird?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/607965</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/607965</guid><dc:creator><![CDATA[spackos]]></dc:creator><pubDate>Wed, 15 Sep 2004 15:27:33 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Thu, 16 Sep 2004 05:10:28 GMT]]></title><description><![CDATA[<p>Poste doch mal die Paint Methode.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/608229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/608229</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 16 Sep 2004 05:10:28 GMT</pubDate></item><item><title><![CDATA[Reply to Titelleiste permanent ändern trotz fsStayOnTop? on Thu, 16 Sep 2004 13:52:07 GMT]]></title><description><![CDATA[<p>Die orientiert sich mehr oder weniger an einem Beispiel von Bytes&amp;More:</p>
<pre><code class="language-cpp">void __fastcall TErrorMsgMain::FormPaint(TObject *Sender)
{
   TCanvas * FCanvas = new TCanvas();
   if(FCanvas)
   {
      FCanvas-&gt;Handle = GetWindowDC(Handle);

      TRect rect;
      rect.Left   = 3;
      rect.Top    = 3;
      rect.Right  = Width - 4;
      rect.Bottom = 21;

      FCanvas-&gt;Brush-&gt;Color = clRed;
      FCanvas-&gt;FillRect(rect);

      FCanvas-&gt;Font-&gt;Style = TFontStyles()&lt;&lt; fsBold;
      FCanvas-&gt;Font-&gt;Color = clWhite;

      FCanvas-&gt;TextOut(4, 5, &quot;Technischer Fehler &quot;+par);
      delete FCanvas;
   }
}
</code></pre>
<p>Zusätzlich hab ich dann noch die 2 Funktionen umgeleitet:</p>
<pre><code>Application-&gt;OnDeactivate = RepaintMain;
Application-&gt;OnActivate   = RepaintMain;
</code></pre>
<pre><code class="language-cpp">void __fastcall TErrorMsgMain::RepaintMain(TObject * Sender)
{
   Invalidate();
}
</code></pre>
<p>Löst man das eigentlich so, oder ist das ein schlechter Stil?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/608373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/608373</guid><dc:creator><![CDATA[spackos]]></dc:creator><pubDate>Thu, 16 Sep 2004 13:52:07 GMT</pubDate></item></channel></rss>