<?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[Was bedeutet dieser Quelltext?]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich mache mich ans GUI vom Builder und auf <a href="http://www.functionx.com/" rel="nofollow">http://www.functionx.com/</a> gehe ich grade eins nach dem anderen durch und stoße auf das erste Problem....</p>
<p>Am Anfang des ersten Artikels steht</p>
<pre><code>After specifying the owner, you must also specify the parent of the control.
The parent is responsible for destroying the child control when it (the parent) is destroyed.
To specify the parent of a control, call its Parent property and assign it the name of the parent.
Normally, the name of the parent is the same as the owner.
This would be done as follows:
[cpp]//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
	TSomeControl * ctlShowMe = new TSomeControl (Mom);
	ctlShowMe-&gt;Parent = Mom;
}
//---------------------------------------------------------------------------[/cpp]
</code></pre>
<p>Also die erste Zeile im Block erstellt eine TSomeComtrol und reserviert Speicher. Was mir allerdings absolut neu ist, ist das (Mom) dahinter und in der zeile darunter. Was die zweite Zeile macht, verstehe ich auch nicht <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>Könnte mir das jemand vllt VERSTÄNDLICH erläutern?</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192207/was-bedeutet-dieser-quelltext</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 20:18:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192207.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 Sep 2007 17:17:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Was bedeutet dieser Quelltext? on Tue, 11 Sep 2007 17:18:57 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich mache mich ans GUI vom Builder und auf <a href="http://www.functionx.com/" rel="nofollow">http://www.functionx.com/</a> gehe ich grade eins nach dem anderen durch und stoße auf das erste Problem....</p>
<p>Am Anfang des ersten Artikels steht</p>
<pre><code>After specifying the owner, you must also specify the parent of the control.
The parent is responsible for destroying the child control when it (the parent) is destroyed.
To specify the parent of a control, call its Parent property and assign it the name of the parent.
Normally, the name of the parent is the same as the owner.
This would be done as follows:
[cpp]//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
	TSomeControl * ctlShowMe = new TSomeControl (Mom);
	ctlShowMe-&gt;Parent = Mom;
}
//---------------------------------------------------------------------------[/cpp]
</code></pre>
<p>Also die erste Zeile im Block erstellt eine TSomeComtrol und reserviert Speicher. Was mir allerdings absolut neu ist, ist das (Mom) dahinter und in der zeile darunter. Was die zweite Zeile macht, verstehe ich auch nicht <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>Könnte mir das jemand vllt VERSTÄNDLICH erläutern?</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363527</guid><dc:creator><![CDATA[mulo]]></dc:creator><pubDate>Tue, 11 Sep 2007 17:18:57 GMT</pubDate></item><item><title><![CDATA[Reply to Was bedeutet dieser Quelltext? on Tue, 11 Sep 2007 21:56:31 GMT]]></title><description><![CDATA[<p>Vorneweg: nicht das Parent-Control, sondern der Owner ist für das Zerstören/Freigeben des zugeordneten Controls verantwortlich.</p>
<p>'Mom' ('Mutter', Wortspiel mit Parent/Eltern, könnte genauso Form1 oder PanelY heissen) ist der Name des Controls, das als Owner der neu zu erstellenden Instanz von <em>ctlShowMe</em> übergeben wird. Anschliessend wird <em>Mom</em> auch als Parent zugewiesen, damit <em>ctlShowMe</em> auf <em>Mom</em> gezeichnet wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363559</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Tue, 11 Sep 2007 21:56:31 GMT</pubDate></item></channel></rss>