<?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[Dialogfenster erstellen]]></title><description><![CDATA[<p>hallo, ich versuche in dieser verfluchten win-api so ein dummes simples dialogfenster zu machen, wo wirklich nur ein popeliger button drauf ist. Aber wenn der dialog startet friert das ganze fenster ein und ich kann nur noch abwürgen.</p>
<p>ich hab den aufruf von meinem dialog einfach mal da eingebunden, wo normalerweise der aufruf für die &quot;About&quot;-Box ist, wenn man sich die standard vorlage für ein win-api programm in visual studio erzeugen lässt.</p>
<p>es kann doch nicht so schwer sein, so ein dummes fenster hinzubekommen</p>
<pre><code class="language-cpp">INT_PTR CALLBACK	Graka(HWND, UINT, WPARAM, LPARAM);

........................
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	PAINTSTRUCT ps;
	HDC hdc;

	switch (message)
	{
	case WM_COMMAND:
		wmId    = LOWORD(wParam);
		wmEvent = HIWORD(wParam);
		// Menüauswahl bearbeiten:
		switch (wmId)
		{
		case IDM_\1:
			//DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
			DialogBox(hInst, MAKEINTRESOURCE(IDD_GRAKA), hWnd, Graka);
			break;
		case IDM_EXIT:
			DestroyWindow(hWnd);
			break;
		default:
			return DefWindowProc(hWnd, message, wParam, lParam);
		}
		break;
	case WM_PAINT:
		hdc = BeginPaint(hWnd, &amp;ps);
		// TODO: Hier den Zeichnungscode hinzufügen.
		EndPaint(hWnd, &amp;ps);
		break;
	case WM_DESTROY:
		PostQuitMessage(0);
		break;
	default:
		return DefWindowProc(hWnd, message, wParam, lParam);
	}
	return 0;
}

........................

INT_PTR CALLBACK Graka(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
	case WM_INITDIALOG:
		return (INT_PTR)TRUE;

	case WM_COMMAND:
		if (LOWORD(wParam) == IDC_OKI )
		{
			EndDialog(hDlg, LOWORD(wParam));
			return (INT_PTR)TRUE;
		}
		break;
	}
	return (INT_PTR)FALSE;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/205766/dialogfenster-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 15:34:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/205766.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 17 Feb 2008 20:53:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dialogfenster erstellen on Sun, 17 Feb 2008 20:53:26 GMT]]></title><description><![CDATA[<p>hallo, ich versuche in dieser verfluchten win-api so ein dummes simples dialogfenster zu machen, wo wirklich nur ein popeliger button drauf ist. Aber wenn der dialog startet friert das ganze fenster ein und ich kann nur noch abwürgen.</p>
<p>ich hab den aufruf von meinem dialog einfach mal da eingebunden, wo normalerweise der aufruf für die &quot;About&quot;-Box ist, wenn man sich die standard vorlage für ein win-api programm in visual studio erzeugen lässt.</p>
<p>es kann doch nicht so schwer sein, so ein dummes fenster hinzubekommen</p>
<pre><code class="language-cpp">INT_PTR CALLBACK	Graka(HWND, UINT, WPARAM, LPARAM);

........................
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	PAINTSTRUCT ps;
	HDC hdc;

	switch (message)
	{
	case WM_COMMAND:
		wmId    = LOWORD(wParam);
		wmEvent = HIWORD(wParam);
		// Menüauswahl bearbeiten:
		switch (wmId)
		{
		case IDM_\1:
			//DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
			DialogBox(hInst, MAKEINTRESOURCE(IDD_GRAKA), hWnd, Graka);
			break;
		case IDM_EXIT:
			DestroyWindow(hWnd);
			break;
		default:
			return DefWindowProc(hWnd, message, wParam, lParam);
		}
		break;
	case WM_PAINT:
		hdc = BeginPaint(hWnd, &amp;ps);
		// TODO: Hier den Zeichnungscode hinzufügen.
		EndPaint(hWnd, &amp;ps);
		break;
	case WM_DESTROY:
		PostQuitMessage(0);
		break;
	default:
		return DefWindowProc(hWnd, message, wParam, lParam);
	}
	return 0;
}

........................

INT_PTR CALLBACK Graka(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
	case WM_INITDIALOG:
		return (INT_PTR)TRUE;

	case WM_COMMAND:
		if (LOWORD(wParam) == IDC_OKI )
		{
			EndDialog(hDlg, LOWORD(wParam));
			return (INT_PTR)TRUE;
		}
		break;
	}
	return (INT_PTR)FALSE;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1457827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457827</guid><dc:creator><![CDATA[frusti]]></dc:creator><pubDate>Sun, 17 Feb 2008 20:53:26 GMT</pubDate></item><item><title><![CDATA[Reply to Dialogfenster erstellen on Sun, 17 Feb 2008 21:32:51 GMT]]></title><description><![CDATA[<p>An Deinem Code (den Du zeigst) liegt's nicht.</p>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1457840</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1457840</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sun, 17 Feb 2008 21:32:51 GMT</pubDate></item></channel></rss>