<?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[XP Style als Komponente !]]></title><description><![CDATA[<p>Hi !</p>
<p>ich habe eine .res datei angefertigt, die , wenn man sie zum Projekt hinzufügt, die Anwendung im XP Style erscheinen lässt.</p>
<p>Wie kann ich das nun als VCL Komponente erstellen ? also es soll wie ein button mit einem Klick auf der Form sein und natürlich funtkionieren <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="😃"
    /></p>
<p>Gruß Assun</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/102189/xp-style-als-komponente</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 12:19:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/102189.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Feb 2005 13:42:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to XP Style als Komponente ! on Wed, 23 Feb 2005 13:42:25 GMT]]></title><description><![CDATA[<p>Hi !</p>
<p>ich habe eine .res datei angefertigt, die , wenn man sie zum Projekt hinzufügt, die Anwendung im XP Style erscheinen lässt.</p>
<p>Wie kann ich das nun als VCL Komponente erstellen ? also es soll wie ein button mit einem Klick auf der Form sein und natürlich funtkionieren <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="😃"
    /></p>
<p>Gruß Assun</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730548</guid><dc:creator><![CDATA[Assun]]></dc:creator><pubDate>Wed, 23 Feb 2005 13:42:25 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Wed, 23 Feb 2005 15:14:57 GMT]]></title><description><![CDATA[<p>weiß denn keine eine Antwort ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730646</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730646</guid><dc:creator><![CDATA[Assun]]></dc:creator><pubDate>Wed, 23 Feb 2005 15:14:57 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Wed, 23 Feb 2005 16:35:10 GMT]]></title><description><![CDATA[<p>Bekomm ich jetzt keine Antworten, weil ich nicht registriert bin oder was ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730749</guid><dc:creator><![CDATA[Assun]]></dc:creator><pubDate>Wed, 23 Feb 2005 16:35:10 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Wed, 23 Feb 2005 16:43:23 GMT]]></title><description><![CDATA[<p>Du bekommst keine Antworten weil das hier niemand weiß.</p>
<p>Denke aber das das nicht möglich ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730755</guid><dc:creator><![CDATA[~~~~~~~]]></dc:creator><pubDate>Wed, 23 Feb 2005 16:43:23 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Wed, 23 Feb 2005 17:07:39 GMT]]></title><description><![CDATA[<p>aber es müsste doch möglich sein, eine komponente zu erstellen, die einfach nur diese .res datei zu dem Projekt hinzufügt, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730789</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730789</guid><dc:creator><![CDATA[Assun]]></dc:creator><pubDate>Wed, 23 Feb 2005 17:07:39 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Wed, 23 Feb 2005 18:23:59 GMT]]></title><description><![CDATA[<p>denke nicht weil eine komponente ja eine klasse ist und keine resourcen datei</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730871</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730871</guid><dc:creator><![CDATA[Blackhawk]]></dc:creator><pubDate>Wed, 23 Feb 2005 18:23:59 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Thu, 24 Feb 2005 07:38:35 GMT]]></title><description><![CDATA[<p>doch, das geht sogar sehr einfach:</p>
<p>XPStyle.cpp</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;basepch.h&gt;

#pragma hdrstop

#include &quot;XPStyle.h&quot;
#pragma package(smart_init)
#pragma resource &quot;winxp.res&quot;
//---------------------------------------------------------------------------
// Mit ValidCtrCheck wird sichergestellt, daß die erzeugten Komponenten
// keine rein virtuellen Funktionen besitzen.
//

static inline void ValidCtrCheck(TXPStyle *)
{
    new TXPStyle(NULL);
}
//---------------------------------------------------------------------------
__fastcall TXPStyle::TXPStyle(TComponent* Owner)
    : TComponent(Owner)
{
}
//---------------------------------------------------------------------------
namespace Xpstyle
{
    void __fastcall PACKAGE Register()
    {
         TComponentClass classes[1] = {__classid(TXPStyle)};
         RegisterComponents(&quot;gsm-dev&quot;, classes, 0);
    }
}
//---------------------------------------------------------------------------
</code></pre>
<p>XPStyle.h</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#ifndef XPStyleH
#define XPStyleH
//---------------------------------------------------------------------------
#include &lt;SysUtils.hpp&gt;
#include &lt;Classes.hpp&gt;
//---------------------------------------------------------------------------
class PACKAGE TXPStyle : public TComponent
{
private:
protected:
public:
    __fastcall TXPStyle(TComponent* Owner);
__published:
};
//---------------------------------------------------------------------------
#endif
</code></pre>
<p>Also einfach eine neue leere Komponente erzeugen, die von TComponent abgeleitet<br />
ist und dort #pragma resource &quot;winxp.res&quot; eintragen.</p>
<p>edit:</p>
<p>ich hab gerade festgestellt, dass es nur einmal pro Projekt klappt. Also wenn<br />
man versehentlich die Komponente löscht und wieder neu erstellt bekommt man<br />
die Resource nicht mehr eingebunden. Komische Sache...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/731223</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/731223</guid><dc:creator><![CDATA[Acidmrp]]></dc:creator><pubDate>Thu, 24 Feb 2005 07:38:35 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Thu, 24 Feb 2005 14:52:31 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Das klingt ja alles sehr interessant. Ich habe jetzt nur die Frage: Woher bekomme ich diese &quot;winxp.res&quot;???</p>
<p>Vielen Dank,<br />
Euer Entertainer</p>
]]></description><link>https://www.c-plusplus.net/forum/post/731535</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/731535</guid><dc:creator><![CDATA[Entertainer]]></dc:creator><pubDate>Thu, 24 Feb 2005 14:52:31 GMT</pubDate></item><item><title><![CDATA[Reply to XP Style als Komponente ! on Thu, 24 Feb 2005 15:10:23 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39251" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39251</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/731545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/731545</guid><dc:creator><![CDATA[Beliah]]></dc:creator><pubDate>Thu, 24 Feb 2005 15:10:23 GMT</pubDate></item></channel></rss>