<?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[Dialog als Hauptfenster anzeigen]]></title><description><![CDATA[<p>Hallo, ich bekomme es einfach nicht hin, dass ein Dialog im Hauptfenster angezeigt wird. Ausgangspunkt ist ein mit Visual Studio 2008 erstelltes Win 32 Programm. Wenn ich dieses Kompiliere habe ich ein Fenster mit Menü und einem leeren weißen Haupfenster. Dieses leere Hauptfenster möchte ich jetzt sozusagen durch einen Dialog ersetzen. Versucht habe ich es mit CreateDialog bin über die Verwendung aber noch nicht ganz im klaren:</p>
<p>CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MAIN_DLG), hWnd, (DLGPROC)WndProcDlg);</p>
<p>Mit dem obigen Aufruf der sich in der Winmain-Funktion befindet passiert zumindest nichts. Woran kann das liegen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/216926/dialog-als-hauptfenster-anzeigen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 11:36:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/216926.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Jun 2008 17:55:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Mon, 30 Jun 2008 17:56:03 GMT]]></title><description><![CDATA[<p>Hallo, ich bekomme es einfach nicht hin, dass ein Dialog im Hauptfenster angezeigt wird. Ausgangspunkt ist ein mit Visual Studio 2008 erstelltes Win 32 Programm. Wenn ich dieses Kompiliere habe ich ein Fenster mit Menü und einem leeren weißen Haupfenster. Dieses leere Hauptfenster möchte ich jetzt sozusagen durch einen Dialog ersetzen. Versucht habe ich es mit CreateDialog bin über die Verwendung aber noch nicht ganz im klaren:</p>
<p>CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MAIN_DLG), hWnd, (DLGPROC)WndProcDlg);</p>
<p>Mit dem obigen Aufruf der sich in der Winmain-Funktion befindet passiert zumindest nichts. Woran kann das liegen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538736</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538736</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Mon, 30 Jun 2008 17:56:03 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Mon, 30 Jun 2008 18:10:24 GMT]]></title><description><![CDATA[<p>Falsches Forum. -&gt; WinAPI.</p>
<p>Aber hast du eine Ressource dazu?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538744</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Mon, 30 Jun 2008 18:10:24 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Mon, 30 Jun 2008 20:57:26 GMT]]></title><description><![CDATA[<p>Den Dialog habe ich in der *.rc Datei gespeichert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538827</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Mon, 30 Jun 2008 20:57:26 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Mon, 30 Jun 2008 21:37:10 GMT]]></title><description><![CDATA[<p>kann man in msvc 2008 nicht dialog projekte anlegen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538840</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538840</guid><dc:creator><![CDATA[Quellcode]]></dc:creator><pubDate>Mon, 30 Jun 2008 21:37:10 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Tue, 01 Jul 2008 13:03:41 GMT]]></title><description><![CDATA[<p>versuchs mal mit DialogBox (bei mir funktionert das)</p>
<pre><code class="language-cpp">DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DLG), NULL, WndProcDlg);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1539112</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539112</guid><dc:creator><![CDATA[helferlein]]></dc:creator><pubDate>Tue, 01 Jul 2008 13:03:41 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Tue, 01 Jul 2008 13:53:38 GMT]]></title><description><![CDATA[<p>Wenns geht versuch die WINAPI zum Zeichnen einer GUI zu vermeiden. Nimm lieber Qt oder WxWidgets. Die sind reines C++</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539145</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539145</guid><dc:creator><![CDATA[Fencer]]></dc:creator><pubDate>Tue, 01 Jul 2008 13:53:38 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Tue, 01 Jul 2008 14:54:37 GMT]]></title><description><![CDATA[<p>Danke schonmal für die Tipps. Ich habe es mit dem Aufruf von</p>
<pre><code>DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DLG), hWnd, (DLGPROC)WndProcDlg);
</code></pre>
<p>auch schon probiert, es wird dann auch der Dialog im Hauptfenster angezeigt, leider reagiert das Programm nur nicht mehr.</p>
<p>Qt und WxWidgets werde ich mir mal anschauen, für diesen Zweck reicht die Winapi aber völlig aus.</p>
<p>Hier nochmal die Winmain-Funktion. Vielleicht sieht ja jemand den Fehler.<br />
Die WndProcDlg-Funktion ist noch ohne Inhalt, ich hoffe das macht keine Probleme.</p>
<pre><code>int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);

        MSG msg;
	HACCEL hAccelTable;

	LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
	LoadString(hInstance, IDC_KEYGENERATOR, szWindowClass, MAX_LOADSTRING);
	MyRegisterClass(hInstance);

	if (!InitInstance (hInstance, nCmdShow))
	{
		return FALSE;
	}

	hDlgModeless = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MAIN_DLG), hWnd, (DLGPROC)WndProcDlg);
	//DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DLG), hWnd, (DLGPROC)WndProcDlg);

    hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_KEYGENERATOR));

	while (GetMessage(&amp;msg, NULL, 0, 0))
	{
		if (!TranslateAccelerator(msg.hwnd, hAccelTable, &amp;msg))
		{
			TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
		}
	}

	return (int) msg.wParam;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1539185</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539185</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Tue, 01 Jul 2008 14:54:37 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog als Hauptfenster anzeigen on Mon, 07 Jul 2008 13:58:24 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-403.html" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1542704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1542704</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 07 Jul 2008 13:58:24 GMT</pubDate></item></channel></rss>