<?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[Probleme mit Darstellung einer DialogBox]]></title><description><![CDATA[<p>Hallo!</p>
<p>Mein Problem ist, dass meine DialogBox nicht angezeigt wird. Ich habe bereits die Hinweise aus dem FAQ durch, doch meine DialogBox wird trotzdem nicht angezeigt.</p>
<pre><code>#include &lt;windows.h&gt;
#include &quot;resource.h&quot;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK DialogProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
		static char szAppName[] = &quot;Find&quot;;
		HWND hwnd;
		MSG msg;
		WNDCLASSEX wndclass;

		wndclass.cbSize = sizeof (wndclass);
		wndclass.style = CS_HREDRAW | CS_VREDRAW;
		wndclass.lpfnWndProc = WndProc;
		wndclass.cbClsExtra = 0;
		wndclass.cbWndExtra = DLGWINDOWEXTRA;
		wndclass.hInstance = hInstance;
		wndclass.hIcon = LoadIcon (hInstance, szAppName);
		wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
		wndclass.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
		wndclass.lpszMenuName = NULL;
		wndclass.lpszClassName = szAppName;
		wndclass.hIconSm = LoadIcon (hInstance, szAppName);

		RegisterClassEx (&amp;wndclass);

		hwnd = CreateDialog (hInstance, szAppName, 0, DialogProc);

		ShowWindow (hwnd, iCmdShow);

		while (GetMessage (&amp;msg, NULL, 0, 0))
		{
				TranslateMessage (&amp;msg);
				DispatchMessage (&amp;msg);
		}

		return msg.wParam;
}

LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
		switch (iMsg)
		{
				case WM_COMMAND :
						switch (LOWORD (wParam))
						{
								case BNOK :
										break;
								case ED_WILDCARD :
										break;
						}

						break;

				case WM_DESTROY :
						PostQuitMessage (0);
						return 0;
		}

		return DefWindowProc (hwnd, iMsg, wParam, lParam);
}

BOOL CALLBACK DialogProc (HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
		switch (iMsg)
		{
				case WM_INITDIALOG :
						return TRUE;
				case WM_CLOSE :
						EndDialog (hDlg, 0);
						return TRUE;
		}

		return FALSE;
}
</code></pre>
<p>Und hier mein Resourcenskript:</p>
<pre><code>Find DIALOG DISCARDABLE  0, 0, 272, 330
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
CAPTION &quot;Find&quot;
CLASS &quot;Find&quot;
FONT 8, &quot;MS Sans Serif&quot;
BEGIN
    DEFPUSHBUTTON   &quot;Verzeichnis auswählen&quot;,BNOK,5,5,90,14
    EDITTEXT        ED_WILDCARD,5,30,90,15,ES_AUTOHSCROLL
    EDITTEXT        ED_AUSGABE,6,61,254,259,ES_MULTILINE | ES_AUTOVSCROLL | 
                    ES_AUTOHSCROLL | ES_READONLY
END
</code></pre>
<p>Vielen Dank für eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/233950/probleme-mit-darstellung-einer-dialogbox</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 19:20:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/233950.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Feb 2009 10:25:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 10:25:05 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Mein Problem ist, dass meine DialogBox nicht angezeigt wird. Ich habe bereits die Hinweise aus dem FAQ durch, doch meine DialogBox wird trotzdem nicht angezeigt.</p>
<pre><code>#include &lt;windows.h&gt;
#include &quot;resource.h&quot;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK DialogProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
		static char szAppName[] = &quot;Find&quot;;
		HWND hwnd;
		MSG msg;
		WNDCLASSEX wndclass;

		wndclass.cbSize = sizeof (wndclass);
		wndclass.style = CS_HREDRAW | CS_VREDRAW;
		wndclass.lpfnWndProc = WndProc;
		wndclass.cbClsExtra = 0;
		wndclass.cbWndExtra = DLGWINDOWEXTRA;
		wndclass.hInstance = hInstance;
		wndclass.hIcon = LoadIcon (hInstance, szAppName);
		wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
		wndclass.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
		wndclass.lpszMenuName = NULL;
		wndclass.lpszClassName = szAppName;
		wndclass.hIconSm = LoadIcon (hInstance, szAppName);

		RegisterClassEx (&amp;wndclass);

		hwnd = CreateDialog (hInstance, szAppName, 0, DialogProc);

		ShowWindow (hwnd, iCmdShow);

		while (GetMessage (&amp;msg, NULL, 0, 0))
		{
				TranslateMessage (&amp;msg);
				DispatchMessage (&amp;msg);
		}

		return msg.wParam;
}

LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
		switch (iMsg)
		{
				case WM_COMMAND :
						switch (LOWORD (wParam))
						{
								case BNOK :
										break;
								case ED_WILDCARD :
										break;
						}

						break;

				case WM_DESTROY :
						PostQuitMessage (0);
						return 0;
		}

		return DefWindowProc (hwnd, iMsg, wParam, lParam);
}

BOOL CALLBACK DialogProc (HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
		switch (iMsg)
		{
				case WM_INITDIALOG :
						return TRUE;
				case WM_CLOSE :
						EndDialog (hDlg, 0);
						return TRUE;
		}

		return FALSE;
}
</code></pre>
<p>Und hier mein Resourcenskript:</p>
<pre><code>Find DIALOG DISCARDABLE  0, 0, 272, 330
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
CAPTION &quot;Find&quot;
CLASS &quot;Find&quot;
FONT 8, &quot;MS Sans Serif&quot;
BEGIN
    DEFPUSHBUTTON   &quot;Verzeichnis auswählen&quot;,BNOK,5,5,90,14
    EDITTEXT        ED_WILDCARD,5,30,90,15,ES_AUTOHSCROLL
    EDITTEXT        ED_AUSGABE,6,61,254,259,ES_MULTILINE | ES_AUTOVSCROLL | 
                    ES_AUTOHSCROLL | ES_READONLY
END
</code></pre>
<p>Vielen Dank für eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661596</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661596</guid><dc:creator><![CDATA[Gast-Hier]]></dc:creator><pubDate>Wed, 11 Feb 2009 10:25:05 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 10:44:26 GMT]]></title><description><![CDATA[<p>Fehlermeldung? Rückgabe von CreateDialog? Ein wenig mehr Info wäre hilfreich...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661608</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661608</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 11 Feb 2009 10:44:26 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 10:46:01 GMT]]></title><description><![CDATA[<p>Es kommt keine Fehlermeldung. Der Dialog wird nicht angezeigt ist aber als Prozess im Task-Manager vorhanden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661609</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661609</guid><dc:creator><![CDATA[Gast-Hier]]></dc:creator><pubDate>Wed, 11 Feb 2009 10:46:01 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 10:52:02 GMT]]></title><description><![CDATA[<p>ersetz mal diese Zeile hier:</p>
<p>ShowWindow (hwnd, iCmdShow);</p>
<p>durch die hier:</p>
<p>ShowWindow (hwnd, SW_SHOW);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661613</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661613</guid><dc:creator><![CDATA[Der_Knob]]></dc:creator><pubDate>Wed, 11 Feb 2009 10:52:02 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 10:55:34 GMT]]></title><description><![CDATA[<p>Es passiert das, was vorher auch schon passiert ist. Kein Dialog zu sehen, aber der Prozess läuft.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661618</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661618</guid><dc:creator><![CDATA[Gast-Hier]]></dc:creator><pubDate>Wed, 11 Feb 2009 10:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 12:03:47 GMT]]></title><description><![CDATA[<p>Was sagt denn GetLastError() nach dem Aufruf von CreateDialog?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661663</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661663</guid><dc:creator><![CDATA[Halbleiter]]></dc:creator><pubDate>Wed, 11 Feb 2009 12:03:47 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Darstellung einer DialogBox on Wed, 11 Feb 2009 17:21:36 GMT]]></title><description><![CDATA[<p>So funzt es bei mir:</p>
<p>CreateDialog(instanceHandle, MAKEINTRESOURCE(IDD_DIALOG1), 0, DialogProc);</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661963</guid><dc:creator><![CDATA[Funzer]]></dc:creator><pubDate>Wed, 11 Feb 2009 17:21:36 GMT</pubDate></item></channel></rss>