<?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[Hilfe bei Form mit DLL erstellen]]></title><description><![CDATA[<p>Erstelle wie unten aufgeführt mit einer DLL eine Form die ich über mein Programm aufrufe. Jetzt ist es aber so das weil es ShowModal ist das Programm nicht benutzt werden kann sollange die Form der DLL offen ist. Und wenn ich die Form einfach mit Show starte wird sie nicht angezeigt (denke mal wegen dem delete direkt danach). Wie macht man das, das ich die Form mit Show starte oder zumindest den selben effect habe?</p>
<pre><code class="language-cpp">extern &quot;C&quot; __declspec(dllexport) void FormShow(TComponent* Owner)
{
  TDLLForm* DLLForm = new TDLLForm(Owner);
  DLLForm-&gt;ShowModal();
  delete DLLForm;
}
//---------------------------------------------------------------------------
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/95736/hilfe-bei-form-mit-dll-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 04:24:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/95736.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Dec 2004 19:40:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Wed, 22 Dec 2004 19:40:16 GMT]]></title><description><![CDATA[<p>Erstelle wie unten aufgeführt mit einer DLL eine Form die ich über mein Programm aufrufe. Jetzt ist es aber so das weil es ShowModal ist das Programm nicht benutzt werden kann sollange die Form der DLL offen ist. Und wenn ich die Form einfach mit Show starte wird sie nicht angezeigt (denke mal wegen dem delete direkt danach). Wie macht man das, das ich die Form mit Show starte oder zumindest den selben effect habe?</p>
<pre><code class="language-cpp">extern &quot;C&quot; __declspec(dllexport) void FormShow(TComponent* Owner)
{
  TDLLForm* DLLForm = new TDLLForm(Owner);
  DLLForm-&gt;ShowModal();
  delete DLLForm;
}
//---------------------------------------------------------------------------
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/679021</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679021</guid><dc:creator><![CDATA[dille]]></dc:creator><pubDate>Wed, 22 Dec 2004 19:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Wed, 22 Dec 2004 20:18:57 GMT]]></title><description><![CDATA[<p>Mach einfach ZWEI Funktionen in der DLL.</p>
<p>1. erzeugt Form und Show (nichtmodal!)<br />
Das Handle in einer Variablen speichern!</p>
<p>2. deleted die Form<br />
Aufruf am Ende des Programmes nicht vergessen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679052</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679052</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Wed, 22 Dec 2004 20:18:57 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Wed, 22 Dec 2004 20:48:39 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>das heißt, du könntest zum beispiel eine globale Variable <em>TDLLForm * DLLForm</em> anlegen, der du statt der internen in der Funktion <em>FormShow</em> die Instanz gibst.<br />
Oder (was ich bevorzuge) du gibts die Instanz als Rückgabewert der Funktion zurück, ohne eine delete.<br />
In beiden Fällen mußt du aber sichergehen, das du irgendwann die Instanz schließt und löscht. Am besten mit einer weiteren Funktion namens <em>FormClose(void)</em> bzw *FormClose(TDLLForm <em>DLLForm)</em>, in dem entweder die Instanz als globale Variable oder als Parameter gelöscht wird.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679078</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 22 Dec 2004 20:48:39 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Thu, 23 Dec 2004 20:09:41 GMT]]></title><description><![CDATA[<p>Irgendwie bekomme ich das nicht hin. So lange ich es statisch mache geht alles so wie ich möchte. Aber wenn es ich es dynamisch mache gibt es eine Fehlermeldung.</p>
<p>So wie hier auch schon<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=68580&amp;highlight=form+in+dll" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=68580&amp;highlight=form+in+dll</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/679796</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679796</guid><dc:creator><![CDATA[dille]]></dc:creator><pubDate>Thu, 23 Dec 2004 20:09:41 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Mon, 27 Dec 2004 16:18:31 GMT]]></title><description><![CDATA[<p>Wenn ich es so mache kann ich die DLL nicht mal mehr starten weil es dann fehler im Speicher gibt.</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;vcl.h&gt;
#include &lt;windows.h&gt;
#include &quot;formunit.h&quot;
#pragma hdrstop
TDLLForm* DLLForm = new TDLLForm(NULL);
//---------------------------------------------------------------------------
#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
  return 1;
}
//---------------------------------------------------------------------------
extern &quot;C&quot; __declspec(dllexport) void ModulShow(TComponent* Owner)
{
  DLLForm-&gt;Show();
}
//---------------------------------------------------------------------------
__declspec(dllexport) void ModulClose(TComponent* Owner)
{
  delete DLLForm;
}
//---------------------------------------------------------------------------
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/681554</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681554</guid><dc:creator><![CDATA[dille]]></dc:creator><pubDate>Mon, 27 Dec 2004 16:18:31 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Mon, 27 Dec 2004 19:45:07 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>probier mal statt</p>
<pre><code class="language-cpp">TDLLForm* DLLForm = new TDLLForm(NULL);
</code></pre>
<p>diese Variante</p>
<pre><code class="language-cpp">TDLLForm* DLLForm = NULL;
...
extern &quot;C&quot; __declspec(dllexport) void ModulCreate(TComponent* Owner)
{
  DLLForm = new TDLLForm(NULL);
}
//---------------------------------------------------------------------------
</code></pre>
<p>Durch das aufrufen der Funktion wird die Instanz erschaffen.<br />
Duech ModulClose() (nenn es lieber ModulDestroy) wird die Instanz gelöscht.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/681667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681667</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 27 Dec 2004 19:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Form mit DLL erstellen on Tue, 28 Dec 2004 12:46:23 GMT]]></title><description><![CDATA[<p>Das hat keine änderung gebracht. Gibt immer noch diesen fehler.</p>
<p>Wenn du mal zeit und lust findest könnte ich das auch mal packen und zum Download stellen oder es dir schicken. Das wären dann nur 40KB.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/681959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681959</guid><dc:creator><![CDATA[dille]]></dc:creator><pubDate>Tue, 28 Dec 2004 12:46:23 GMT</pubDate></item></channel></rss>