<?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[SendMessage von einem Dialog zum anderen]]></title><description><![CDATA[<p>Hi.<br />
Kurze Erläuterung:<br />
Ich habe einen Dialog welchen ich mit new erstelle und dann in ein TabCtrl lade.<br />
Jetzt möchte ich wenn ein Button dort gedrückt wird, dass ich ein SendMessage() aufrufe und die Nachricht an das Hauptfenster schicken. Leider kommt diese Nachricht nie dort an...</p>
<p>Ich hatte es mit GetParent()-&gt;SendMessage() versucht.</p>
<p>Wie mache ich das richtig?<br />
Oder welche andere Möglichkeit gibt es?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/79017/sendmessage-von-einem-dialog-zum-anderen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 11:19:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/79017.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Jul 2004 11:12:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 11:12:06 GMT]]></title><description><![CDATA[<p>Hi.<br />
Kurze Erläuterung:<br />
Ich habe einen Dialog welchen ich mit new erstelle und dann in ein TabCtrl lade.<br />
Jetzt möchte ich wenn ein Button dort gedrückt wird, dass ich ein SendMessage() aufrufe und die Nachricht an das Hauptfenster schicken. Leider kommt diese Nachricht nie dort an...</p>
<p>Ich hatte es mit GetParent()-&gt;SendMessage() versucht.</p>
<p>Wie mache ich das richtig?<br />
Oder welche andere Möglichkeit gibt es?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555144</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555144</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 07 Jul 2004 11:12:06 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 11:43:17 GMT]]></title><description><![CDATA[<p>Servus,</p>
<p>wie fängst du denn die Nachricht ab? Rufst du PreTranslateMessage auf oder hast du in deiner MSG Map etwas stehen?</p>
<p>Bsp.:</p>
<pre><code class="language-cpp">//Global
const WM_MSG_KATZENKLO = WM_USER +1;

//Nicht Modaler Dlg
void CTestDlg::OnBnClickedButton1()
{
	GetParent()-&gt;SendMessage(WM_MSG_KATZENKLO, 0, 0);
} 

//HauptDlg
BEGIN_MESSAGE_MAP(CTestMsgDlg, CDialog)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	//}}AFX_MSG_MAP
	ON_MESSAGE(WM_MSG_KATZENKLO, OnKatzenKlo)
END_MESSAGE_MAP()
.
.
.

LRESULT CTestMsgDlg::OnKatzenKlo(WPARAM wParam, LPARAM lParam)
{
	AfxMessageBox(&quot;Jetzt stinkts!!!&quot;);

	return 0;
}
</code></pre>
<p>*winke*<br />
Hellsgore</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555161</guid><dc:creator><![CDATA[Hellsgore]]></dc:creator><pubDate>Wed, 07 Jul 2004 11:43:17 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 13:39:26 GMT]]></title><description><![CDATA[<p>Ich hab wie ich das bisher immer gemacht hatte einfach die WindowProc überschrieben.<br />
Bisher hat das immer funktioniert, aber da hab ich auch nicht selber die Nachrichten geschickt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555247</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 07 Jul 2004 13:39:26 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 13:46:28 GMT]]></title><description><![CDATA[<p>Servus,</p>
<pre><code class="language-cpp">LRESULT CTestMsgDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
	if (message == WM_MSG_KATZENKLO)
		int Paul = 0;

	return CDialog::WindowProc(message, wParam, lParam);
}
</code></pre>
<p>Ajo, klappt auch. Vielleicht die MSG nicht richtig deklariert oder deine GetParent() gibt keinen Zeiger zurück?</p>
<p>*winke*<br />
Hellsgore</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555255</guid><dc:creator><![CDATA[Hellsgore]]></dc:creator><pubDate>Wed, 07 Jul 2004 13:46:28 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:09:24 GMT]]></title><description><![CDATA[<p>Ich hab nen</p>
<pre><code class="language-cpp">#define WM_CUSTOM_POS (WM_USER + 3333)
</code></pre>
<p>gemacht und verschicke das.<br />
GetParent() liefert auch nen Pointer auf ein CWnd Objekt zurück. Aber ich hab das Gefühl es ist das falsche... Weil im Hauptdialog kommt die Nachricht nie an. (Rechtschreibfehler sind ausgeschlossen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555277</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555277</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:09:24 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:10:50 GMT]]></title><description><![CDATA[<p>Ist das Tab Control vielleicht das Parent?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555280</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555280</guid><dc:creator><![CDATA[?????]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:10:50 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:14:47 GMT]]></title><description><![CDATA[<p>Kann sein, darum frag ich ja hier <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 />
Was wäre wenn? Wie komm ich an das Parent des Parents?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555285</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555285</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:14:47 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:15:28 GMT]]></title><description><![CDATA[<p>Test mal:</p>
<pre><code class="language-cpp">AfxGetMainWnd()-&gt;SendMessage(Blalalala);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/555288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555288</guid><dc:creator><![CDATA[Hellsgore]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:15:28 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:18:48 GMT]]></title><description><![CDATA[<p>the_alien schrieb:</p>
<blockquote>
<p>Kann sein, darum frag ich ja hier <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 />
Was wäre wenn? Wie komm ich an das Parent des Parents?</p>
</blockquote>
<p>Dumm?</p>
<p>GetParent()-&gt;GetParent()-&gt;...()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555291</guid><dc:creator><![CDATA[dumm?]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:18:48 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:23:18 GMT]]></title><description><![CDATA[<p>Hallo anonymer... ich kann dich nicht leiden. Vielleicht kommt man in dem Moment einfach nicht drauf. Danke.</p>
<p>Werd beides testen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555297</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555297</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:23:18 GMT</pubDate></item><item><title><![CDATA[Reply to SendMessage von einem Dialog zum anderen on Wed, 07 Jul 2004 14:26:49 GMT]]></title><description><![CDATA[<p>Geht beides. Danke, das wars.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555307</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 07 Jul 2004 14:26:49 GMT</pubDate></item></channel></rss>