<?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[Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse]]></title><description><![CDATA[<p>Hallo,</p>
<p>was muss ich beachten, wenn ich einer Dialogklasse eine oninit-Funktion<br />
hinzufügen will ?<br />
Reicht es eine Funktion mit &quot;OnInit&quot; zu erstellen und diese wird dann<br />
automatisch aufgerufen oder muss ein Ereignisshandler (welcher?) mit<br />
eingefügt werden. Oder gibt es dies bei Dialogklassen nicht ?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/82908/erstellen-der-quot-oninit-quot-funktion-einer-klasse</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 05:08:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/82908.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Aug 2004 01:14:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse on Mon, 16 Aug 2004 01:14:22 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>was muss ich beachten, wenn ich einer Dialogklasse eine oninit-Funktion<br />
hinzufügen will ?<br />
Reicht es eine Funktion mit &quot;OnInit&quot; zu erstellen und diese wird dann<br />
automatisch aufgerufen oder muss ein Ereignisshandler (welcher?) mit<br />
eingefügt werden. Oder gibt es dies bei Dialogklassen nicht ?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/583430</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583430</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Mon, 16 Aug 2004 01:14:22 GMT</pubDate></item><item><title><![CDATA[Reply to Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse on Mon, 16 Aug 2004 05:23:58 GMT]]></title><description><![CDATA[<p>OnInitDialog &lt;- MSDN</p>
]]></description><link>https://www.c-plusplus.net/forum/post/583453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583453</guid><dc:creator><![CDATA[fffffffff]]></dc:creator><pubDate>Mon, 16 Aug 2004 05:23:58 GMT</pubDate></item><item><title><![CDATA[Reply to Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse on Mon, 16 Aug 2004 06:59:41 GMT]]></title><description><![CDATA[<p>fffffffff schrieb:</p>
<blockquote>
<p>OnInitDialog &lt;- MSDN</p>
</blockquote>
<p>Das ist ja mein Problem, da steht:</p>
<p>This member function is called in response to the WM_INITDIALOG message. This message is sent to the dialog box during the Create, CreateIndirect, or DoModal calls, which occur immediately before the dialog box is displayed.<br />
....</p>
<p>da mach ich dann also einen Rechtsklick auf die Dialogbox und finde Null<br />
WM_INITDIALOG. Zumal dieses auch nicht in einem normalen MFC Dialog erzeugt wird<br />
oder per Rechtsklick erreichbar ist ....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/583474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583474</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Mon, 16 Aug 2004 06:59:41 GMT</pubDate></item><item><title><![CDATA[Reply to Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse on Mon, 16 Aug 2004 07:09:45 GMT]]></title><description><![CDATA[<p>Wenn deine Klasse von CDialog abgeleitet ist, muss das auch da sein (unter Nachrichtenbehandlung).</p>
<p>Ansonsten, versuch es mit selbst einbauen. Einen Eintrag in der MessageMap scheint man nicht zu brauchen.</p>
<p>Header</p>
<pre><code class="language-cpp">virtual BOOL OnInitDialog();
</code></pre>
<p>Cpp</p>
<pre><code class="language-cpp">BOOL CDeinDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/583480</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583480</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Mon, 16 Aug 2004 07:09:45 GMT</pubDate></item><item><title><![CDATA[Reply to Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse on Mon, 16 Aug 2004 08:00:25 GMT]]></title><description><![CDATA[<p><strong>OnInitDialog</strong> in deinem Dialog wird automatisch aufgerufen, weil es eine virtuelle Funktion ist, und nicht die Handler-Funktion für <strong>WM_INITDIALOG</strong>.</p>
<p>Die Handler-Funktion selbst ist in der MFC (<strong>CDialog::<em>Handle</em>InitDialog</strong>), von da wird dann die virtuelle Funktion aufgerufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/583504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583504</guid><dc:creator><![CDATA[Uwe Philipps]]></dc:creator><pubDate>Mon, 16 Aug 2004 08:00:25 GMT</pubDate></item><item><title><![CDATA[Reply to Erstellen der &amp;quot;OnInit&amp;quot; Funktion einer Klasse on Mon, 16 Aug 2004 13:34:03 GMT]]></title><description><![CDATA[<p>Und da ward ein Licht geboren ......</p>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/583776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583776</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Mon, 16 Aug 2004 13:34:03 GMT</pubDate></item></channel></rss>