<?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 zeigt sich nciht!]]></title><description><![CDATA[<p>Ich habe das Problem, dass mein Fenster leider nict zu sehen ist( es sollte eigenltich im Vollbildmodus angehen) Der Compiler wirft keine Fehler aus, man sieht einfach ncihts!!!</p>
<p>Hier einmal der Code!</p>
<pre><code>HWND CreateAppWindow(HINSTANCE hInst2)
{
	    WNDCLASSEX windowclass;
	    WCHAR NAME[256];
	    char* pmbhello=&quot;MAIN&quot;;
        MultiByteToWideChar( CP_ACP, 0, pmbhello,
        strlen(pmbhello)+1, NAME,sizeof(NAME)/sizeof(NAME[0]) );
	    windowclass.cbSize= sizeof(WNDCLASSEX);
		windowclass.style= CS_HREDRAW|CS_VREDRAW;
		windowclass.lpfnWndProc=WindowProc;
		windowclass.cbClsExtra = 0;
		windowclass.cbWndExtra = 0;
		windowclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
		windowclass.hCursor = LoadCursor(NULL, IDC_ARROW);
		windowclass.hbrBackground = (HBRUSH) COLOR_BACKGROUND+1;
		windowclass.lpszMenuName=NULL;
		windowclass.lpszClassName =(LPCWSTR)&quot;Main&quot;;
		RegisterClassEx (&amp;windowclass);

		mah= CreateWindowEx(NULL,
							NAME,
							NAME,
							WS_VISIBLE|WS_POPUP,
							0,0,
						    GetSystemMetrics(SM_CXSCREEN), 
                            GetSystemMetrics(SM_CYSCREEN), 
							NULL,
							NULL,
							hInst2,
							NULL);

return mah;
}
</code></pre>
<p><strong>Das ist der Code für meine CreateAppWIndow funktion. Jetzt der für die main.cpp</strong></p>
<pre><code>int WINAPI WinMain (HINSTANCE hInst,HINSTANCE hPrevInstance, LPSTR lpcmdlinde, int ncmdshow)
{

 mah=CreateAppWindow(hInst);

 while (PeekMessage(&amp;message,NULL,0,0,PM_REMOVE))
 {
	 TranslateMessage(&amp;message);
  DispatchMessage(&amp;message);
 }
}
LRESULT CALLBACK WindowProc (HWND mah,UINT message, WPARAM wParam, LPARAM lParam)
{

return (DefWindowProc(mah,message,wParam,lParam));
}
</code></pre>
<p>Includes sind der Übersichtlichkeit halber rausgelassen, eben so die Deklaration der Varialben message und mah!</p>
<p>Ich hoffe jemand kann mir helfen!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/205201/fenster-zeigt-sich-nciht</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 15:40:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/205201.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Feb 2008 16:45:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 16:45:18 GMT]]></title><description><![CDATA[<p>Ich habe das Problem, dass mein Fenster leider nict zu sehen ist( es sollte eigenltich im Vollbildmodus angehen) Der Compiler wirft keine Fehler aus, man sieht einfach ncihts!!!</p>
<p>Hier einmal der Code!</p>
<pre><code>HWND CreateAppWindow(HINSTANCE hInst2)
{
	    WNDCLASSEX windowclass;
	    WCHAR NAME[256];
	    char* pmbhello=&quot;MAIN&quot;;
        MultiByteToWideChar( CP_ACP, 0, pmbhello,
        strlen(pmbhello)+1, NAME,sizeof(NAME)/sizeof(NAME[0]) );
	    windowclass.cbSize= sizeof(WNDCLASSEX);
		windowclass.style= CS_HREDRAW|CS_VREDRAW;
		windowclass.lpfnWndProc=WindowProc;
		windowclass.cbClsExtra = 0;
		windowclass.cbWndExtra = 0;
		windowclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
		windowclass.hCursor = LoadCursor(NULL, IDC_ARROW);
		windowclass.hbrBackground = (HBRUSH) COLOR_BACKGROUND+1;
		windowclass.lpszMenuName=NULL;
		windowclass.lpszClassName =(LPCWSTR)&quot;Main&quot;;
		RegisterClassEx (&amp;windowclass);

		mah= CreateWindowEx(NULL,
							NAME,
							NAME,
							WS_VISIBLE|WS_POPUP,
							0,0,
						    GetSystemMetrics(SM_CXSCREEN), 
                            GetSystemMetrics(SM_CYSCREEN), 
							NULL,
							NULL,
							hInst2,
							NULL);

return mah;
}
</code></pre>
<p><strong>Das ist der Code für meine CreateAppWIndow funktion. Jetzt der für die main.cpp</strong></p>
<pre><code>int WINAPI WinMain (HINSTANCE hInst,HINSTANCE hPrevInstance, LPSTR lpcmdlinde, int ncmdshow)
{

 mah=CreateAppWindow(hInst);

 while (PeekMessage(&amp;message,NULL,0,0,PM_REMOVE))
 {
	 TranslateMessage(&amp;message);
  DispatchMessage(&amp;message);
 }
}
LRESULT CALLBACK WindowProc (HWND mah,UINT message, WPARAM wParam, LPARAM lParam)
{

return (DefWindowProc(mah,message,wParam,lParam));
}
</code></pre>
<p>Includes sind der Übersichtlichkeit halber rausgelassen, eben so die Deklaration der Varialben message und mah!</p>
<p>Ich hoffe jemand kann mir helfen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453799</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453799</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 16:45:18 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 16:47:51 GMT]]></title><description><![CDATA[<p>du brauchst noch ein UpdateWindow () und ein ShowWindow (), entweder nach deiner CreateAppWindow-Funktion oder direkt nach dem CreateWindowEx-Aufruf in deiner Funktion</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453803</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Mon, 11 Feb 2008 16:47:51 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 16:57:39 GMT]]></title><description><![CDATA[<p>Ich dachte die brauchts man nur wenn man nicht WS_Visible angibt aber ok mache ich mal. Aber könnte vielleicht nochmal jemand sagen was genau di ebeiden Funktionen machen? Das Show Window aktiviert das Fenster und das UpdateWindow sendet das erste WM_PAINT, dass dann später beim vershcieben, überdecken etc automatisch gesendet wird oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453814</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 16:57:39 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 17:03:26 GMT]]></title><description><![CDATA[<p>Ich habe das jetzt eingefügt, aber es zeigt sich immernoch nicht. Das Programm geht einfach sofort mit der Meldung</p>
<p>**Das Programm &quot;[2256] AGO-ENGINE.exe: Systemeigen&quot; wurde mit Code 0 (0x0) beendet.<br />
**</p>
<p>wieder aus! Was soll ich da machen. Wenn ich die GetMessag Methode statt PeekMessage benutze geht das Programm nicht aus( Debugger läuft weiter) aber es muss 1. mit PeekMessage sein und 2. sieht man auch bei GetMessage kein Fenster! Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453820</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453820</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 17:03:26 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 17:26:32 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">HWND hMain;

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

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, LPSTR szCmdLine, int iCmdShow)
{
	char MainWin[] = &quot;Hauptfenster&quot;;

	UNREFERENCED_PARAMETER (hPrI);
	UNREFERENCED_PARAMETER (szCmdLine);

	g_hInst = hI;
	WNDCLASS wc;

	wc.style = CS_HREDRAW | CS_VREDRAW;
	wc.lpfnWndProc = WndProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = hI;
	wc.hIcon = LoadIcon (hI, NULL);
	wc.hCursor = LoadCursor (NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = MainWin;

	RegisterClass (&amp;wc);

	int x = 410;
	x += GetSystemMetrics (SM_CXDLGFRAME) * 2;	//Breite des Rahmens * 2 (Links/Rechts)

	int y = 250;
	y += GetSystemMetrics (SM_CYCAPTION);		//Höhe der Titelleiste
	//y += GetSystemMetrics (SM_CYMENU);			//Höhe der Menu-Bar
	y += GetSystemMetrics (SM_CYDLGFRAME) * 2;	//Höhe des Rahmens * 2 (Oben/Unten)

	int xPos = (GetSystemMetrics (SM_CXSCREEN) / 2) - (x / 2);
	int yPos = (GetSystemMetrics (SM_CYSCREEN) / 2) - (y / 2);

	hMain = CreateWindow (MainWin, &quot;Test&quot;, WS_OVERLAPPEDWINDOW, xPos, yPos, x, y, NULL, NULL, hI, NULL);
	ShowWindow (hMain, iCmdShow);
	UpdateWindow (hMain);

	MSG msg;
	while (GetMessage (&amp;msg, NULL, 0, 0))
	{
		TranslateMessage (&amp;msg);
		DispatchMessage (&amp;msg);
	}
	return msg.wParam;
}
</code></pre>
<p>ich weiß nicht, obs dir hilft, ist mal nen bsp...musst mal gucken und vllt. probiern, falls niemand noch nen tipp hat...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453840</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453840</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Mon, 11 Feb 2008 17:26:32 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 18:03:01 GMT]]></title><description><![CDATA[<p>Nein, dass hilft mir leide rnicht wirklich. Hat sosnt noch jemand einen Vorschlag?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453869</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 18:03:01 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 20:19:49 GMT]]></title><description><![CDATA[<p>Mach mal das WS_VISIBLE da weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453966</guid><dc:creator><![CDATA[pivke]]></dc:creator><pubDate>Mon, 11 Feb 2008 20:19:49 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 20:45:17 GMT]]></title><description><![CDATA[<p>Also ich habe jetzt den Quelltext komplett nach den Tipps hier überarbeitet, aber es geht imemrnoch nciht! Ich kopiere jetzt noch einmal den Quelltext hier rein. Ich hoffe irgendjemand kann mir helfen( Es kann nciht daran liegen das ich indows Vista benutze oder?)</p>
<pre><code>#include &lt;windows.h&gt;

#include &quot;GlobalExVar.h&quot;
#include &quot;AGO.h&quot;
#include &quot;InitMainAppWindow.h&quot;
#include &quot;LRESULT.h&quot;
LRESULT CALLBACK WindowProc (HWND hWnd,UINT message, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrI, LPSTR szCmdLine, int iCmdShow) 
{
HWND hWnd;
hWnd=CreateAppWindow(hInst);
ShowWindow (hWnd, iCmdShow); 
UpdateWindow(hWnd);	

 while (PeekMessage(&amp;message,NULL,0,0,PM_REMOVE))
 {
	 TranslateMessage(&amp;message);
  DispatchMessage(&amp;message);
 }
 return(int)(message.wParam);
}
LRESULT CALLBACK WindowProc (HWND hWnd,UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
	case WM_DESTROY:
		{
			PostQuitMessage(0);
			return (0);
		}
	}
return (DefWindowProc(hWnd,message,wParam,lParam));
}
</code></pre>
<p>[message ist global deklariert]</p>
<pre><code>#include &lt;windows.h&gt;
#include &quot;Vars.h&quot;
#include &quot;InitMainAppWindow.h&quot;
#include &quot;GlobalExVar.h&quot;

HWND CreateAppWindow(HINSTANCE hInst2)
{
HWND mah;
 WNDCLASSEX windowclass;

static TCHAR NAME[]=TEXT(&quot;IDMW&quot;);
	    windowclass.cbSize= sizeof(WNDCLASSEX);
		windowclass.style= CS_HREDRAW|CS_VREDRAW;
		windowclass.lpfnWndProc=WindowProc;
		windowclass.cbClsExtra = 0;
		windowclass.cbWndExtra = 0;
		windowclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
		windowclass.hCursor = LoadCursor(NULL, IDC_ARROW);
		windowclass.hbrBackground = (HBRUSH) COLOR_BACKGROUND+1;
		windowclass.lpszMenuName=NULL;
		windowclass.lpszClassName =NAME;
		RegisterClassEx (&amp;windowclass);

		mah= CreateWindow(
							NAME,
							TEXT(&quot;NAMEDESFESNTER&quot;),
							WS_OVERLAPPEDWINDOW,
							100,100,
							300,250,
							NULL,
							NULL,
							hInst2,

							NULL);

return mah;
}
</code></pre>
<p>Das ist der COde. Er verursacht keine Fehler, aber, wenn ich es starte dauert es kurz, dann wird im Compilier folgender Text ausgegeben:</p>
<p>**&quot;AGO-ENGINE.exe&quot;: &quot;C:\Users\Nils\Desktop\MYENGINE\AGO-ENGINE\Debug\AGO-ENGINE.exe&quot; geladen, Symbole wurden geladen.<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\ntdll.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\kernel32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\user32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\gdi32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\advapi32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\rpcrt4.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\shimeng.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\apphelp.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\AppPatch\AcLayers.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\shell32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\msvcrt.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\shlwapi.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\ole32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\oleaut32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\userenv.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\secur32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\winspool.drv&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\mpr.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\imm32.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\msctf.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\lpk.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\System32\usp10.dll&quot; wurde geladen<br />
&quot;AGO-ENGINE.exe&quot;: &quot;C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100\comctl32.dll&quot; wurde geladen<br />
Das Programm &quot;[2504] AGO-ENGINE.exe: Systemeigen&quot; wurde mit Code 0 (0x0) beendet.<br />
**</p>
<p>Wieso funktioniert, dass nicht?! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453979</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 20:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 20:49:13 GMT]]></title><description><![CDATA[<p>Nimm statt PeekMessage() GetMessage()!</p>
<p>PeekMessage() gibt FALSE zurück, wenn gerade keine Nachrichten da sind und dann beendet sich dein Programm.<br />
GetMessage() wartet dagegen auf die nächste Nachricht.</p>
<p>PeekMessage() wird hauptsächlich bei z.B. Spielen benutzt.<br />
(Dann sieht die Schleife aber auch leicht anders aus)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453986</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453986</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Mon, 11 Feb 2008 20:49:13 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 21:03:13 GMT]]></title><description><![CDATA[<p>geeky schrieb:</p>
<blockquote>
<p>Nimm statt PeekMessage() GetMessage()!</p>
<p>PeekMessage() gibt FALSE zurück, wenn gerade keine Nachrichten da sind und dann beendet sich dein Programm.<br />
GetMessage() wartet dagegen auf die nächste Nachricht.</p>
<p>PeekMessage() wird hauptsächlich bei z.B. Spielen benutzt.<br />
(Dann sieht die Schleife aber auch leicht anders aus)</p>
</blockquote>
<p>Ich kenne den Unterschied und habe es auch mit GetMessage versucht. Und dann tritt auch tatsöchlich der Effekt, dass der Debugegr ausgeht nicht auf. Der Debugger läuft also weiter. Ein Fenster bekomme ich aber trotzdem nicht zu sehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454000</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454000</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 21:03:13 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 21:24:08 GMT]]></title><description><![CDATA[<p>Ich habe folgenden Codeteil ein wenig verändert:<br />
#include &lt;windows.h&gt;<br />
#include &quot;Vars.h&quot;<br />
#include &quot;InitMainAppWindow.h&quot;<br />
#include &quot;GlobalExVar.h&quot;</p>
<pre><code>HWND CreateAppWindow(HINSTANCE hInst2)
{
HWND mah;
 WNDCLASSEX windowclass;
 bool Test;	   
static TCHAR NAME[]=TEXT(&quot;IDMW&quot;);
	    windowclass.cbSize= sizeof(WNDCLASSEX);
		windowclass.style= CS_HREDRAW|CS_VREDRAW;
		windowclass.lpfnWndProc=WindowProc;
		windowclass.cbClsExtra = 0;
		windowclass.cbWndExtra = 0;
		windowclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
		windowclass.hCursor = LoadCursor(NULL, IDC_ARROW);
		windowclass.hbrBackground = (HBRUSH) COLOR_BACKGROUND+1;
		windowclass.lpszMenuName=NULL;
		windowclass.lpszClassName =NAME;
		RegisterClassEx (&amp;windowclass);

		mah = CreateWindowEx(NULL,
							NAME,
							TEXT(&quot;NAMEDESFESNTER&quot;),
							WS_OVERLAPPEDWINDOW,
							100,100,
							300,250,
							NULL,
							NULL,
							hInst2,
							NULL);

		if (mah==NULL)
		Test=false;
		if (Test==false)
			PostQuitMessage(0);

return mah;
}
</code></pre>
<p>Die folgende Stelle ist neu:</p>
<p><strong>if (mah==NULL)<br />
Test=false;<br />
if (Test==false)<br />
PostQuitMessage(0);</strong></p>
<p>Das Programm schließt sich, also stimmt etwas mit dem handle nicht. Aber ich komme einfach nciht auf den Fehler! Sieht jemand etwas?<br />
Hoffe auf vieeeele Antworten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454015</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454015</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 21:24:08 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 21:25:55 GMT]]></title><description><![CDATA[<p>Achso und GetMessage benutze ich jetzt auch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454016</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Mon, 11 Feb 2008 21:25:55 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Mon, 11 Feb 2008 21:31:39 GMT]]></title><description><![CDATA[<p>belege mal noch hInstance aus der WNDCLASSEX-Struktur, also</p>
<pre><code class="language-cpp">...
        windowclass.cbSize= sizeof(WNDCLASSEX);
        windowclass.style= CS_HREDRAW|CS_VREDRAW;
        windowclass.lpfnWndProc=WindowProc;
        windowclass.cbClsExtra = 0;
        windowclass.cbWndExtra = 0;
        windowclass.hInstance = hInst2;        // &lt;-- den hier :D
        windowclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hCursor = LoadCursor(NULL, IDC_ARROW);
        windowclass.hbrBackground = (HBRUSH) COLOR_BACKGROUND+1;
        windowclass.lpszMenuName=NULL;
        windowclass.lpszClassName =NAME;
        RegisterClassEx (&amp;windowclass);
        ...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1454019</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454019</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Mon, 11 Feb 2008 21:31:39 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 00:53:35 GMT]]></title><description><![CDATA[<p>Außerdem ist &quot;bool Test&quot; nicht initialisiert (und lt. Murphy immer false).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454080</guid><dc:creator><![CDATA[nachtreter]]></dc:creator><pubDate>Tue, 12 Feb 2008 00:53:35 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 03:34:13 GMT]]></title><description><![CDATA[<p>Tengriadon schrieb:</p>
<blockquote>
<pre><code class="language-cpp">if (mah==NULL)
    Test=false;
if (Test==false)
    PostQuitMessage(0);
</code></pre>
</blockquote>
<p>warum nicht:</p>
<pre><code class="language-cpp">if( !mah ) {
    MessageBox( 0, &quot;beim erstellen des Hauptfensters!&quot;, &quot;Fehler...&quot;, MB_OK );
    exit( EXIT_FAILURE ); // warum denn in die Message-Loop?
}
</code></pre>
<p>?</p>
<p>greetz, Swordfish</p>
<p>BTW: Solltest Du eben erst mit C/C++ anfangen - so wie es den Anschein hat - dann lass lieber erstmal die Finger von der WinAPI und beschäftige Dich mit der Konsole.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454086</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 12 Feb 2008 03:34:13 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 06:24:58 GMT]]></title><description><![CDATA[<p>Nein ich fange nicht erst mit C++ an. Das da sollte eigentlich nur ein keliner Test werden,deswegen der unsaubere Code. Dann trat aber dieses Problem auf und hier scheint ja auch keiner eine Lösung zu finden oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454091</guid><dc:creator><![CDATA[Tengriadon]]></dc:creator><pubDate>Tue, 12 Feb 2008 06:24:58 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 06:31:51 GMT]]></title><description><![CDATA[<p>Hast du die Überprüfung des Windowhandles korrigiert? Wird das Fenster überhaupt erstellt (Windowhandle != 0)? Hast Du den <code>hInstance</code> member der <code>WNDCLASSEX</code> gesetzt? Mach mal ein <code>memset( &amp;windowclass, 0 sizeof( WNDCLASSEX ) )</code> nach die deklaration der Struktur.</p>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454092</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454092</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 12 Feb 2008 06:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 13:23:52 GMT]]></title><description><![CDATA[<p>Swordfish schrieb:</p>
<blockquote>
<p>Hast du die Überprüfung des Windowhandles korrigiert? Wird das Fenster überhaupt erstellt (Windowhandle != 0)? Hast Du den <code>hInstance</code> member der <code>WNDCLASSEX</code> gesetzt? Mach mal ein <code>memset( &amp;windowclass, 0 sizeof( WNDCLASSEX ) )</code> nach die deklaration der Struktur.</p>
<p>greetz, Swordfish</p>
</blockquote>
<p>Das mit der Überprüfung war absicht für den Schrittdurchlauf, aber ich scheine heute ein wenig auf der Leitung zu stehen. Du Hast vollkommen recht ich habe vergessen der HINSTANCE- Membervariable der Struktur einen Wert zuzuweisen!</p>
<p><strong>VIELEN DANK SWORDFISH!!!!!!!!!!</strong> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Und an alle anderen natürlich auch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454376</guid><dc:creator><![CDATA[Xen]]></dc:creator><pubDate>Tue, 12 Feb 2008 13:23:52 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 13:25:44 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">HWND CreateAppWindow(HINSTANCE hInst2)
{
 HWND mah;
 WNDCLASSEX windowclass;
 bool Test; // &lt;---------------------------- :open_mouth: 
 static TCHAR NAME[]=TEXT(&quot;IDMW&quot;);

...

 if (mah==NULL)
     Test=false;
 if (Test==false) // &lt;---------------------- :open_mouth: 
     PostQuitMessage(0);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1454377</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454377</guid><dc:creator><![CDATA[nachtreter]]></dc:creator><pubDate>Tue, 12 Feb 2008 13:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 19:09:38 GMT]]></title><description><![CDATA[<p>Ich glaub', das hat er schon gerafft <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>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454655</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454655</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 12 Feb 2008 19:09:38 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 19:17:03 GMT]]></title><description><![CDATA[<p>Xen schrieb:</p>
<blockquote>
<p>Du Hast vollkommen recht ich habe vergessen der HINSTANCE- Membervariable der Struktur einen Wert zuzuweisen!</p>
</blockquote>
<p>tut mir leid aber ich komm mir vollkommen verarscht vor <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
vllt. lesen was man dir so schreibt, denn:</p>
<p>Fake oder Echt schrieb:</p>
<blockquote>
<p>belege mal noch hInstance aus der WNDCLASSEX-Struktur, also</p>
<pre><code class="language-cpp">...
        windowclass.cbSize= sizeof(WNDCLASSEX);
        windowclass.style= CS_HREDRAW|CS_VREDRAW;
        windowclass.lpfnWndProc=WindowProc;
        windowclass.cbClsExtra = 0;
        windowclass.cbWndExtra = 0;
        windowclass.hInstance = hInst2;        // &lt;-- den hier :D
        windowclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
        windowclass.hCursor = LoadCursor(NULL, IDC_ARROW);
        windowclass.hbrBackground = (HBRUSH) COLOR_BACKGROUND+1;
        windowclass.lpszMenuName=NULL;
        windowclass.lpszClassName =NAME;
        RegisterClassEx (&amp;windowclass);
        ...
</code></pre>
</blockquote>
<p>und das war schon gestern...naja jedem das seine <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454659</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454659</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Tue, 12 Feb 2008 19:17:03 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 19:37:12 GMT]]></title><description><![CDATA[<p>Nicht aufregen, BitWax, is halt ein Schussel <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454672</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454672</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 12 Feb 2008 19:37:12 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster zeigt sich nciht! on Tue, 12 Feb 2008 19:47:51 GMT]]></title><description><![CDATA[<p>ja wie gesagt, jedem das seine, muss er ja wissen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1454680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1454680</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Tue, 12 Feb 2008 19:47:51 GMT</pubDate></item></channel></rss>