<?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[Fenster wird nicht erstellt]]></title><description><![CDATA[<p>Moin zusammen</p>
<p>Also ich hoffe ihr könnt mir bei meinem Problem helfen, ich bin mir sicher das es ein ziemlich Simpler Fehler is, aber ich finde den Bock einfach ned. Also der Code soll einfach ein Fenster erstellen, aber er erstellt mir den Windows Handel ned und Beendet das Programm mit dem Code 0. Naja seht am besten selbst ma.</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;iostream&gt;

using namespace std;

const char myAppName [] = &quot;SimpleWindow&quot;;
LRESULT CALLBACK MsgProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){

	WNDCLASSEX wc;
	MSG Message;
	HWND hWnd;

	ZeroMemory(&amp;wc, sizeof(WNDCLASSEX));

	wc.cbSize = sizeof(WNDCLASSEX);
	wc.style = CS_VREDRAW | CS_HREDRAW |CS_OWNDC | CS_DBLCLKS;
	wc.lpfnWndProc = MsgProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = hInstance;
	wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = myAppName;

	hWnd = CreateWindow( myAppName, &quot;Direct 3D Tutorial 01: Create Device&quot;, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
							 CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, NULL,NULL, wc.hInstance, NULL);

	if(hWnd == NULL){
		return 0;
	}

	ShowWindow(hWnd, nCmdShow);
	UpdateWindow(hWnd);

	ZeroMemory(&amp;Message, sizeof(MSG));

	while(GetMessage(&amp;Message, NULL, 0,0)){

		TranslateMessage(&amp;Message);
		DispatchMessage(&amp;Message);
	}

	return 0;
}
LRESULT CALLBACK MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){

	switch(msg){

		case WM_DESTROY:
			DestroyWindow(hWnd);
			//UnregisterClass(&quot;Direct3D Tutorial&quot;, hInstance);
			PostQuitMessage(1);
			break;

		case WM_CREATE:
			break;
	}

	return DefWindowProc(hWnd, msg, wParam, lParam);
}
</code></pre>
<p>Danke schon ma für eure Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/169839/fenster-wird-nicht-erstellt</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 16:41:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/169839.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Jan 2007 13:51:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fenster wird nicht erstellt on Tue, 09 Jan 2007 13:51:34 GMT]]></title><description><![CDATA[<p>Moin zusammen</p>
<p>Also ich hoffe ihr könnt mir bei meinem Problem helfen, ich bin mir sicher das es ein ziemlich Simpler Fehler is, aber ich finde den Bock einfach ned. Also der Code soll einfach ein Fenster erstellen, aber er erstellt mir den Windows Handel ned und Beendet das Programm mit dem Code 0. Naja seht am besten selbst ma.</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;iostream&gt;

using namespace std;

const char myAppName [] = &quot;SimpleWindow&quot;;
LRESULT CALLBACK MsgProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){

	WNDCLASSEX wc;
	MSG Message;
	HWND hWnd;

	ZeroMemory(&amp;wc, sizeof(WNDCLASSEX));

	wc.cbSize = sizeof(WNDCLASSEX);
	wc.style = CS_VREDRAW | CS_HREDRAW |CS_OWNDC | CS_DBLCLKS;
	wc.lpfnWndProc = MsgProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = hInstance;
	wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = myAppName;

	hWnd = CreateWindow( myAppName, &quot;Direct 3D Tutorial 01: Create Device&quot;, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
							 CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, NULL,NULL, wc.hInstance, NULL);

	if(hWnd == NULL){
		return 0;
	}

	ShowWindow(hWnd, nCmdShow);
	UpdateWindow(hWnd);

	ZeroMemory(&amp;Message, sizeof(MSG));

	while(GetMessage(&amp;Message, NULL, 0,0)){

		TranslateMessage(&amp;Message);
		DispatchMessage(&amp;Message);
	}

	return 0;
}
LRESULT CALLBACK MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){

	switch(msg){

		case WM_DESTROY:
			DestroyWindow(hWnd);
			//UnregisterClass(&quot;Direct3D Tutorial&quot;, hInstance);
			PostQuitMessage(1);
			break;

		case WM_CREATE:
			break;
	}

	return DefWindowProc(hWnd, msg, wParam, lParam);
}
</code></pre>
<p>Danke schon ma für eure Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1206340</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1206340</guid><dc:creator><![CDATA[Meschugge]]></dc:creator><pubDate>Tue, 09 Jan 2007 13:51:34 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster wird nicht erstellt on Tue, 09 Jan 2007 14:06:18 GMT]]></title><description><![CDATA[<p>Es fehlt die Registrierung der Fensterklasse (<em>RegisterClassEx</em>).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1206353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1206353</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Tue, 09 Jan 2007 14:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster wird nicht erstellt on Tue, 09 Jan 2007 14:10:12 GMT]]></title><description><![CDATA[<p>Du solltest vor dem Erzeugen das Fenster Registrieren</p>
<pre><code class="language-cpp">if (!RegisterClassEx(&amp;wc)) return 0;
</code></pre>
<p>Mist, zu langsam</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1206355</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1206355</guid><dc:creator><![CDATA[eas]]></dc:creator><pubDate>Tue, 09 Jan 2007 14:10:12 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster wird nicht erstellt on Tue, 09 Jan 2007 14:13:49 GMT]]></title><description><![CDATA[<p>Peinlich Peinlich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Jetzt funzts, danke euch beiden für die schnelle Antwort.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1206362</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1206362</guid><dc:creator><![CDATA[Meschugge]]></dc:creator><pubDate>Tue, 09 Jan 2007 14:13:49 GMT</pubDate></item></channel></rss>