<?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[Wird nict angezeigt!]]></title><description><![CDATA[<p>Hi!<br />
Ich wollte ein ganz normales Fenster erstellen.Aber irgendwie ist das unsichtbar.Unten in der Taskleiste wird es angezeigt aber auf dem Bildschirm sieht man nichts:</p>
<pre><code class="language-cpp">#include &quot;C:\Dokumente und Einstellungen\Marius\Desktop\Math\rbw3d.h&quot;
#include &quot;InitD3D.h&quot;
#include &lt;d3d9.h&gt;
#include &lt;windows.h&gt;

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

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
	HWND hwnd;
	MSG msg;
	WNDCLASS wndclass;

	wndclass.lpszClassName = &quot;Game&quot;;
	wndclass.lpszMenuName = NULL;
	wndclass.cbClsExtra = 0;
	wndclass.cbWndExtra = 0;
	wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
	wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wndclass.hInstance = hInstance;
	wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
	wndclass.lpfnWndProc = WndProc;
	wndclass.style = CS_HREDRAW | CS_VREDRAW;

	if(!RegisterClass(&amp;wndclass))
	{
		MessageBox(NULL, &quot;Fensterklass konnte nicht registriert werden&quot;,  &quot;Fehler&quot;, MB_OKCANCEL | MB_ICONEXCLAMATION);
		return 1;
	};

	hwnd = CreateWindow(&quot;Game&quot;, 
		                &quot;DirectX&quot;, 
						WS_OVERLAPPEDWINDOW, 
						CW_DEFAULT, 
						CW_DEFAULT, 
						CW_DEFAULT, 
						CW_DEFAULT, 
						NULL, 
						NULL, 
						hInstance, 
						NULL);

	ShowWindow(hwnd, nShowCmd);
	UpdateWindow(hwnd);

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

LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	HDC hdc;
	PAINTSTRUCT ps;

	switch(message)
	{
	case WM_PAINT:
		hdc= BeginPaint(hwnd, &amp;ps);

		EndPaint(hwnd, &amp;ps);
		return 0;
	case WM_DESTROY:
		PostQuitMessage(0);
		return 0;
	}
	return DefWindowProc(hwnd, message, wParam, lParam);
};

};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/72804/wird-nict-angezeigt</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 03:01:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/72804.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 May 2004 16:48:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wird nict angezeigt! on Sun, 02 May 2004 16:48:52 GMT]]></title><description><![CDATA[<p>Hi!<br />
Ich wollte ein ganz normales Fenster erstellen.Aber irgendwie ist das unsichtbar.Unten in der Taskleiste wird es angezeigt aber auf dem Bildschirm sieht man nichts:</p>
<pre><code class="language-cpp">#include &quot;C:\Dokumente und Einstellungen\Marius\Desktop\Math\rbw3d.h&quot;
#include &quot;InitD3D.h&quot;
#include &lt;d3d9.h&gt;
#include &lt;windows.h&gt;

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

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
	HWND hwnd;
	MSG msg;
	WNDCLASS wndclass;

	wndclass.lpszClassName = &quot;Game&quot;;
	wndclass.lpszMenuName = NULL;
	wndclass.cbClsExtra = 0;
	wndclass.cbWndExtra = 0;
	wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
	wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wndclass.hInstance = hInstance;
	wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
	wndclass.lpfnWndProc = WndProc;
	wndclass.style = CS_HREDRAW | CS_VREDRAW;

	if(!RegisterClass(&amp;wndclass))
	{
		MessageBox(NULL, &quot;Fensterklass konnte nicht registriert werden&quot;,  &quot;Fehler&quot;, MB_OKCANCEL | MB_ICONEXCLAMATION);
		return 1;
	};

	hwnd = CreateWindow(&quot;Game&quot;, 
		                &quot;DirectX&quot;, 
						WS_OVERLAPPEDWINDOW, 
						CW_DEFAULT, 
						CW_DEFAULT, 
						CW_DEFAULT, 
						CW_DEFAULT, 
						NULL, 
						NULL, 
						hInstance, 
						NULL);

	ShowWindow(hwnd, nShowCmd);
	UpdateWindow(hwnd);

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

LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	HDC hdc;
	PAINTSTRUCT ps;

	switch(message)
	{
	case WM_PAINT:
		hdc= BeginPaint(hwnd, &amp;ps);

		EndPaint(hwnd, &amp;ps);
		return 0;
	case WM_DESTROY:
		PostQuitMessage(0);
		return 0;
	}
	return DefWindowProc(hwnd, message, wParam, lParam);
};

};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/512998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/512998</guid><dc:creator><![CDATA[Janss]]></dc:creator><pubDate>Sun, 02 May 2004 16:48:52 GMT</pubDate></item><item><title><![CDATA[Reply to Wird nict angezeigt! on Sun, 02 May 2004 18:51:51 GMT]]></title><description><![CDATA[<p>Ich weiß ja nicht, was du in deinen Header-Files noch stehen hast, aber wenn du das eine ); am Ende noch wegnimmst und bei CreateWindow anstelle von CW_DEFAULT CW_USEDEFAULT verwendest zeigt er bei mir das Fenster korrekt an <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/513056</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/513056</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sun, 02 May 2004 18:51:51 GMT</pubDate></item><item><title><![CDATA[Reply to Wird nict angezeigt! on Sun, 02 May 2004 18:58:09 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>habs bei mir mit dem BCB auch kompiliert. Musste auch CW_USEDEFAULT nehmen und &quot;};&quot; in der letzten Zeile entfernen.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/1644">@flenders</a><br />
Aber scheinbar konnte er es ja kompilieren. Mit dem &quot;};&quot; hat er sich vielleicht vertippt. Aber wenn CW_DEFAULT folgendermaßen aussieht:</p>
<pre><code class="language-cpp">#define CW_DEFAULT 0
</code></pre>
<p>ist es wohl klar.</p>
<p>MfG<br />
tuküe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/513062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/513062</guid><dc:creator><![CDATA[tuküe]]></dc:creator><pubDate>Sun, 02 May 2004 18:58:09 GMT</pubDate></item></channel></rss>