<?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[Ein Form mehrfach laden]]></title><description><![CDATA[<pre><code class="language-cpp">void go_to(AnsiString nick)
{
LONG MyGWL_EXSTYLE = GetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE);
SetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE, MyGWL_EXSTYLE | WS_EX_APPWINDOW );
Form2-&gt;Caption=nick;
Form2-&gt;Show();
}
</code></pre>
<p>So sieht mein Programmcode bisweilen aus. Wenn ich jetzt aber mit einem anderen Übergabewert ein weiteres Form anzeigen lassen will dann ändert er die Caption des aktuellen Forms einfach nur um. Klar stimmt ja auch...<br />
Meine Frage wäre.. wie ich mehrere Forms erstellen kann.</p>
<p>Meine Idee ist es unter Umständen die Form zu kopieren und umzubennen oder so...<br />
Sodaß, er einfach jedes Mal Form2 mit einer neuen Captino versieht und es dann umbenennt.</p>
<p>Wie sowas zu realisieren ist... da würd ich auch eure Hilfe vertrauen <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>
<p>Wäre nett <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/115558/ein-form-mehrfach-laden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Jul 2026 09:41:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/115558.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Jul 2005 22:35:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ein Form mehrfach laden on Fri, 15 Jul 2005 22:35:55 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">void go_to(AnsiString nick)
{
LONG MyGWL_EXSTYLE = GetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE);
SetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE, MyGWL_EXSTYLE | WS_EX_APPWINDOW );
Form2-&gt;Caption=nick;
Form2-&gt;Show();
}
</code></pre>
<p>So sieht mein Programmcode bisweilen aus. Wenn ich jetzt aber mit einem anderen Übergabewert ein weiteres Form anzeigen lassen will dann ändert er die Caption des aktuellen Forms einfach nur um. Klar stimmt ja auch...<br />
Meine Frage wäre.. wie ich mehrere Forms erstellen kann.</p>
<p>Meine Idee ist es unter Umständen die Form zu kopieren und umzubennen oder so...<br />
Sodaß, er einfach jedes Mal Form2 mit einer neuen Captino versieht und es dann umbenennt.</p>
<p>Wie sowas zu realisieren ist... da würd ich auch eure Hilfe vertrauen <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>
<p>Wäre nett <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/832069</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832069</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Fri, 15 Jul 2005 22:35:55 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 04:25:34 GMT]]></title><description><![CDATA[<p>Form2* myform = new Form2(this);<br />
myform-&gt;Caption=&quot;wwwww&quot;;<br />
myform-&gt;Show();<br />
...<br />
delete form;</p>
<p>Diese Technik in Form eines Arry aus Zeigern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832110</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sat, 16 Jul 2005 04:25:34 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:07:19 GMT]]></title><description><![CDATA[<p>Christian211 schrieb:</p>
<blockquote>
<p>Form2* myform = new Form2(this);<br />
myform-&gt;Caption=&quot;wwwww&quot;;<br />
myform-&gt;Show();<br />
...<br />
delete form;</p>
<p>Diese Technik in Form eines Arry aus Zeigern.</p>
</blockquote>
<p>Das mit new haben mir schon mehrere Leute gesagt... scheint also der richtige Ansatz zu sein...<br />
Also ich hab den Quelltext wie folgt umbenannt:</p>
<pre><code class="language-cpp">void go_to(AnsiString nick)
{
LONG MyGWL_EXSTYLE = GetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE);
SetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE, MyGWL_EXSTYLE | WS_EX_APPWINDOW );
Form2* myform = new Form2(this);
myform-&gt;Caption=nick;
myform-&gt;Show();
delete myform;
}
</code></pre>
<p>Jetzt bekomme ich aber einige Fehler angezeigt die wie folgt lauten:</p>
<pre><code>[C++ Error] winhand.cpp(9): E2451 Undefined symbol 'myform'
[C++ Error] winhand.cpp(9): E2303 Type name expected
[C++ Error] winhand.cpp(9): E2379 Statement missing ;
[C++ Error] winhand.cpp(12): E2158 Operand of 'delete' must be non-const pointer
</code></pre>
<p>Mag mir da jemand helfen?<br />
Ich hab mit Pointern dank unseres tollen Programmierlehrers noch nie gearbeitet.<br />
Ich kenn mich da kein Stück mit aus. Also wäre eine möglichst genaue und &quot;idiotensichere&quot; Erklärung ganz nett <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>
]]></description><link>https://www.c-plusplus.net/forum/post/832208</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832208</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:07:19 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:29:40 GMT]]></title><description><![CDATA[<p>Bin mir nicht sicher, aber versuchs mal mit</p>
<pre><code class="language-cpp">myForm *Form2 = new TForm2(this);
</code></pre>
<p>oder so ähnlich</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832223</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832223</guid><dc:creator><![CDATA[BCB6-User]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:29:40 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:31:51 GMT]]></title><description><![CDATA[<p>BCB6-User schrieb:</p>
<blockquote>
<p>Bin mir nicht sicher, aber versuchs mal mit</p>
<pre><code class="language-cpp">myForm *Form2 = new TForm2(this);
</code></pre>
<p>oder so ähnlich</p>
</blockquote>
<p>eher so</p>
<pre><code class="language-cpp">TForm2 *myForm = new TForm2(this);
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832225</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:39:04 GMT]]></title><description><![CDATA[<p>BCB6-User schrieb:</p>
<blockquote>
<p>Bin mir nicht sicher, aber versuchs mal mit</p>
<pre><code class="language-cpp">myForm *Form2 = new TForm2(this);
</code></pre>
<p>oder so ähnlich</p>
</blockquote>
<pre><code>[C++ Error] winhand.cpp(9): E2451 Undefined symbol 'myForm'
[C++ Error] winhand.cpp(9): E2297 'this' can only be used within a member function
[C++ Error] winhand.cpp(10): E2451 Undefined symbol 'myform'
[C++ Error] winhand.cpp(12): E2158 Operand of 'delete' must be non-const pointer
</code></pre>
<p>diese Fehler bekomme ich wenn ich folgenden Code probiere...</p>
<pre><code class="language-cpp">void go_to(AnsiString nick)
{
LONG MyGWL_EXSTYLE = GetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE);
SetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE, MyGWL_EXSTYLE | WS_EX_APPWINDOW );
myForm *Form2 = new TForm2(this);
myform-&gt;Caption=nick;
myform-&gt;Show();
delete myform;
}
</code></pre>
<p>Hmm <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 />
Bin ja mal gespannt ob da noch jemand Rat weiß <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Danke schonmal für die bisherigen bemühungen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/832231</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832231</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:41:23 GMT]]></title><description><![CDATA[<p>akari schrieb:</p>
<blockquote>
<p>BCB6-User schrieb:</p>
<blockquote>
<p>Bin mir nicht sicher, aber versuchs mal mit</p>
<pre><code class="language-cpp">myForm *Form2 = new TForm2(this);
</code></pre>
<p>oder so ähnlich</p>
</blockquote>
<p>eher so</p>
<pre><code class="language-cpp">TForm2 *myForm = new TForm2(this);
</code></pre>
<p>bis bald<br />
akari</p>
</blockquote>
<p>jetzt bekomm ich immerhin nur noch einen Fehler <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>
<pre><code>[C++ Error] winhand.cpp(9): E2297 'this' can only be used within a member function
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/832234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832234</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:41:23 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:49:47 GMT]]></title><description><![CDATA[<p>Mach die Funktion go_to zu einer Memberfunktion von (vermutlich) Form1. Oder schau mal in der Hilfe nach, was denn dort überhaupt übergeben werden kann.</p>
<p>Anonsten kann ich dir nur raten, erst mal ein paar Tutorials mit den Grundlagen durchzuarbeiten.</p>
<p>Und bitte keine Fullquotes machen.</p>
<p>Grüße Joe_M.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832237</guid><dc:creator><![CDATA[zufaulzumeinloggen]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:49:47 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 11:55:30 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ach, das hab ich ja ganz übersehen. Die Fehlermeldung ist schon ganz aussagekräftig, this kann nur in Methoden benutzt werden, also Funktionen, die einer Klasse wie TForm1 zugeordnet sind. Dies solltest du in einem Tutorial über Objektorientierte Programmierung in C++ nachlesen.</p>
<p>Du kannst jetzt ganz einfach die Methode go_to deiner Fensterklasse zuordnen (wenn die Fensterklasse TForm1 heißt) :</p>
<pre><code class="language-cpp">void TForm1::go_to(AnsiString nick)
{
LONG MyGWL_EXSTYLE = GetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE);
SetWindowLong(Form2-&gt;Handle, GWL_EXSTYLE, MyGWL_EXSTYLE | WS_EX_APPWINDOW );
myForm *Form2 = new TForm2(this);
myform-&gt;Caption=nick;
myform-&gt;Show();
delete myform;
}
</code></pre>
<p>Außerdem öffnest du noch das zugehörige Headerfile zu diesem Fenster, und gibts dort noch die Definition der Methode an</p>
<pre><code class="language-cpp">public :
  ...
  void go_to(AnsiString nick);
</code></pre>
<p>/Edit : zu spät (@ Joe_M : für deine Statistik *grins*)</p>
<p>/Edit : momentmal, eigentlich ist das this in TForm2(this) gar nicht nötig, TForm2(NULL) ist in diesem Fall völlig ausreichend</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832238</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832238</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 16 Jul 2005 11:55:30 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:06:03 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">{
myform-&gt;Show();
delete myform;
}
</code></pre>
<p>Ist mir gerade noch aufgefallen. So wird das Form2, direkt nach Erstellung, sofort wieder gelöscht. Bestenfalls flackert es mal kurz auf, egal, ob der Konstruktor mit, oder ohne Owner-Parameter aufgerufen wird.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/7971">@akari</a>: Scheint mein Glückstag zu sein. <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>Grüße Joe_M.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832244</guid><dc:creator><![CDATA[zufaulzumeinloggen]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:06:03 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:11:12 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ja, statt Show() sollte wohl ShowModal() aufgerufen werden.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832246</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832246</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:11:12 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:12:14 GMT]]></title><description><![CDATA[<p>LOL</p>
<p>Also joa.. danke erstmal <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 />
Wird schonklappen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
Nur... muss ich jetzt das delete woanders rein packen.. macht wenig sinn, dass ich das öffne wenn ichs direkt wieder lösch <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 />
Aber danke leute <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ihr habt mir sehr geholfen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/832248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832248</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:16:41 GMT]]></title><description><![CDATA[<p>akari schrieb:</p>
<blockquote>
<p>ja, statt Show() sollte wohl ShowModal() aufgerufen werden.</p>
</blockquote>
<p>Hmm.. weiß net obs nu daran liegt.. auf jeden Fall kann ich jetzt gar net mehr zum Form1 um ein weiteres Fenster zu öffnen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/832251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832251</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:16:41 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:24:42 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>dann schau dir mal in der Borland-Hilfe an, was TForm::ShowModal() macht.</p>
<p>Ansonsten must du wirklich das delete an eine endere Stelle verlegen, nämlich dann wenn du das entprechende Fenster schließt.<br />
Eventuell wäre ja eine MDI-Anwendung für dich das bessere Konzept.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832259</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832259</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:24:42 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:29:18 GMT]]></title><description><![CDATA[<p>Hatte doch</p>
<pre><code class="language-cpp">myform-&gt;Show(); 
... 
delete form;
</code></pre>
<p>geschrieben. Die ... bedeuten, dass dazwischen was kommt und der Zeiger freizugeben ist.</p>
<p>Du kannst den Zeiger global anlegen, im Konstruktor initialisieren und im Destruktor löschen. So kann du Show() verwenden ohne in der Funktion ein delete zu machen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832266</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:29:18 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 12:55:36 GMT]]></title><description><![CDATA[<p>Christian211 schrieb:</p>
<blockquote>
<p>Du kannst den Zeiger global anlegen, im Konstruktor initialisieren und im Destruktor löschen. So kann du Show() verwenden ohne in der Funktion ein delete zu machen</p>
</blockquote>
<p>Das klingt gut. Nur wie global anlegen? Sorry... ich steh irgendwie aufm Schlauch...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832284</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832284</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 12:55:36 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 13:06:57 GMT]]></title><description><![CDATA[<p>Hi Christian,</p>
<p>scheinst ja jetzt auch öfter hier zu sein...<br />
Es hatte dir doch keiner einen Vorwurf gemacht. Es war einfach ein Mißverständnis von Shevron. Wie das eben so ist, wenn man sich nicht die Mühe macht, sich intensiv mit den Grundlagen auseinander zu setzen, bevor man sich an ein GUI-Projekt wagt.</p>
<p>Allein diesen Satz find ich sehr treffend:</p>
<p>shevron schrieb:</p>
<blockquote>
<p>Das mit new haben mir schon mehrere Leute gesagt... scheint also der richtige Ansatz zu sein...</p>
</blockquote>
<p>Noch jemand, der keine F1-Taste auf seiner Tastur hat... Oder der einfach zu faul ist, sie zu benuten. Ich kann mir nichr vorstellen, dass man an new und delete vorbeikommt, wenn man auch nur ein einziges Grundlagentutorial durcharbeitet.</p>
<p>Sorry, Shevron, aber Du mußt zuerst ein paar Grundlagen lernen. So führt jede Antwort von uns nur zu 2 Neuen Fragen. Und die werden alle ausführlichst in Grundlagentutorials beantwortet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832295</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 16 Jul 2005 13:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 13:21:48 GMT]]></title><description><![CDATA[<p>Nach 2 Jahren Programmierung sollte man meinen es zu können nicht wahr? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Aber wie schon gesagt.. mein Lehrer war nicht so die Granate...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832309</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832309</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 13:21:48 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 13:33:31 GMT]]></title><description><![CDATA[<p>Sollte man tatsächlich meinen... Es ist mir schleierhaft, wie man 2 Jahre lang C++ lernen kann, ohne einmal mit Themen, wie 'Lebensdauer von Variablen' oder 'Dynamische Instanzen von Objekten' in Kontakt zu geraten.<br />
Wie auch immer, es kann nicht schaden, die Lücken mit einem Tutorial zu schließen. Müßte doch recht schnell gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832312</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 16 Jul 2005 13:33:31 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 14:20:47 GMT]]></title><description><![CDATA[<p>joa mach ich jetzt auch mal.. also bis gleich ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832344</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 14:20:47 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 15:00:48 GMT]]></title><description><![CDATA[<p>Habe micht auch gar nicht &quot;vorgeworfen&quot; gefühlt <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>
<p>Hier nochmal alles genau für shevron:</p>
<p>Alternative 1 globaler Zeiger</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
Irgendwas *zeiger;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
zeiger=new Irgendwas;
}
//---------------------------------------------------------------------------

TForm1::~TForm1()
{
delete zeiger
}
</code></pre>
<p>Alternative 2 Bestandteil der Klasse. Hier wird der Zeiger in der *.h definiert:</p>
<pre><code class="language-cpp">class TForm1 : public TForm
{
__published:	// Von der IDE verwaltete Komponenten
private:
	Irgendwas *zeiger;	// Anwender-Deklarationen
public:		// Anwender-Deklarationen
	__fastcall TForm1(TComponent* Owner);
	~TForm1();
};
</code></pre>
<p>Im Konstuktor und Destruktor bleibt es wie es ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/832377</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832377</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sat, 16 Jul 2005 15:00:48 GMT</pubDate></item><item><title><![CDATA[Reply to Ein Form mehrfach laden on Sat, 16 Jul 2005 16:21:57 GMT]]></title><description><![CDATA[<p>Danke Christian... Werde denk ich mal so verfahren...<br />
Ich les mir jetzt aber glaub ich trotzdem mal besser Tuts und so durch...<br />
Gibts ja nicht.. was hatte ich da nur fürn Stumpf-Lehrer?<br />
Naja... wenn man nicht alles selber macht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Trotzdem danke Jungs <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
Ich bleib tapfer am Ball <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>
]]></description><link>https://www.c-plusplus.net/forum/post/832409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/832409</guid><dc:creator><![CDATA[shevron]]></dc:creator><pubDate>Sat, 16 Jul 2005 16:21:57 GMT</pubDate></item></channel></rss>