<?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[return -&amp;gt; WndProc]]></title><description><![CDATA[<p>Guten Abend zusammen!<br />
Aus der WndProc heraus wird über AboutDlgProc ein Dialog geöffnet bzw. abgefragt.<br />
Sollte IDOK_EXIT gedrückt werden, dann muss sich das ganze Programm beenden.<br />
Wie gebe ich den Wert von IDOK_EXIT wieder an die WndProc zurück?</p>
<p>Grüsse,<br />
Sotares</p>
<pre><code>BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{

	switch(message)
	{
	case WM_INITDIALOG:
		return TRUE;

	case WM_COMMAND:
		switch (LOWORD (wParam))
		{

		case IDOK_ABOUT: {
			EndDialog(hDlg,0);
			return TRUE; }

		case IDOK_EXIT: {
			EndDialog(hDlg,0);
			return 1; }

		case IDCANCEL_EXIT: {
			EndDialog(hDlg,0);
			return 1; }
		}
		break;

	}

	return FALSE;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/166284/return-gt-wndproc</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 01:49:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/166284.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Nov 2006 19:11:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to return -&amp;gt; WndProc on Mon, 27 Nov 2006 19:11:43 GMT]]></title><description><![CDATA[<p>Guten Abend zusammen!<br />
Aus der WndProc heraus wird über AboutDlgProc ein Dialog geöffnet bzw. abgefragt.<br />
Sollte IDOK_EXIT gedrückt werden, dann muss sich das ganze Programm beenden.<br />
Wie gebe ich den Wert von IDOK_EXIT wieder an die WndProc zurück?</p>
<p>Grüsse,<br />
Sotares</p>
<pre><code>BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{

	switch(message)
	{
	case WM_INITDIALOG:
		return TRUE;

	case WM_COMMAND:
		switch (LOWORD (wParam))
		{

		case IDOK_ABOUT: {
			EndDialog(hDlg,0);
			return TRUE; }

		case IDOK_EXIT: {
			EndDialog(hDlg,0);
			return 1; }

		case IDCANCEL_EXIT: {
			EndDialog(hDlg,0);
			return 1; }
		}
		break;

	}

	return FALSE;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1182643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1182643</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Mon, 27 Nov 2006 19:11:43 GMT</pubDate></item><item><title><![CDATA[Reply to return -&amp;gt; WndProc on Mon, 27 Nov 2006 20:02:29 GMT]]></title><description><![CDATA[<p>Über den 2. Parameter von EndDialog...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1182675</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1182675</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 27 Nov 2006 20:02:29 GMT</pubDate></item><item><title><![CDATA[Reply to return -&amp;gt; WndProc on Mon, 27 Nov 2006 21:51:36 GMT]]></title><description><![CDATA[<p>Neuerdings ist der Return-Wert einer Dialog-Prozedur i.A. übrigens INT_PTR CALLBACK (wg. der 64-Bit Kompatibilität). Ob das für Dich nun relevant ist, oder nicht, musst Du natürlich selbst entscheiden <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/1182750</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1182750</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Mon, 27 Nov 2006 21:51:36 GMT</pubDate></item><item><title><![CDATA[Reply to return -&amp;gt; WndProc on Mon, 27 Nov 2006 22:54:31 GMT]]></title><description><![CDATA[<p>Danke für die Hilfestellung, nun läuft es!</p>
<p>In der AboutDlgProc</p>
<pre><code>case IDOK_EXIT: { 
		EndDialog(hDlg,(wParam));
		return TRUE; }
</code></pre>
<p>In der WndProc</p>
<pre><code>case ID_EXIT: {
   if(DialogBox(hInst, TEXT(&quot;Exit&quot;), hWnd, AboutDlgProc)==IDOK_EXIT)
   {
   SendMessage(hWnd,WM_CLOSE,0,0);
   }
}
</code></pre>
<p>Mit freundlichen Grüssen,<br />
Sotares</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1182775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1182775</guid><dc:creator><![CDATA[Sotares]]></dc:creator><pubDate>Mon, 27 Nov 2006 22:54:31 GMT</pubDate></item></channel></rss>