<?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[programm schließt sich nicht]]></title><description><![CDATA[<p>Hallo zusammen.<br />
Bin dabei WinAPI/c++ zu lernen.<br />
Mein problem ist das ich das gefühl habe das mein programm einfriert bzw sich nicht fließen lässt.</p>
<pre><code class="language-cpp">#define STRICT
#include &lt;windows.h&gt;

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

const char szAppName[] = &quot;FunWarSuche v0.1&quot;;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                                        PSTR szCmdLine, int iCmdShow)
{
                                        HWND hWnd;
                                        MSG msg;
                                        WNDCLASS wc;
                                        wc.style = CS_HREDRAW | CS_VREDRAW;
                                        wc.lpfnWndProc = WndProc;
                                        wc.cbClsExtra  = 0;
                                        wc.cbWndExtra  = 0;
                                        wc.hInstance   = hInstance;
                                        wc.hCursor     = LoadCursor(NULL,IDC_ARROW);
                                        wc.hIcon       = LoadIcon(NULL,IDI_APPLICATION);
                                        wc.hbrBackground =  (HBRUSH)GetStockObject(WHITE_BRUSH);
                                        wc.lpszClassName = szAppName;
                                        wc.lpszMenuName  = NULL;
                                        RegisterClass(&amp;wc);

hWnd = CreateWindow(szAppName,
                    &quot;FunWarSuche v0.1&quot;,
                    WS_OVERLAPPEDWINDOW,
                    CW_USEDEFAULT,
                    CW_USEDEFAULT,
                    CW_USEDEFAULT,
                    CW_USEDEFAULT,
                    NULL,
                    NULL,
                    hInstance,
                    NULL);

ShowWindow(hWnd, iCmdShow);
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)
{
         switch (message)
         {
                  case WM_DESTROY:
                       {
                                  PostQuitMessage(0);
                                  return 0;
                       }
         }

                  return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
<p>Woran könnte es liegen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/130896/programm-schließt-sich-nicht</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 00:53:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/130896.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Dec 2005 16:01:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to programm schließt sich nicht on Wed, 28 Dec 2005 16:01:00 GMT]]></title><description><![CDATA[<p>Hallo zusammen.<br />
Bin dabei WinAPI/c++ zu lernen.<br />
Mein problem ist das ich das gefühl habe das mein programm einfriert bzw sich nicht fließen lässt.</p>
<pre><code class="language-cpp">#define STRICT
#include &lt;windows.h&gt;

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

const char szAppName[] = &quot;FunWarSuche v0.1&quot;;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                                        PSTR szCmdLine, int iCmdShow)
{
                                        HWND hWnd;
                                        MSG msg;
                                        WNDCLASS wc;
                                        wc.style = CS_HREDRAW | CS_VREDRAW;
                                        wc.lpfnWndProc = WndProc;
                                        wc.cbClsExtra  = 0;
                                        wc.cbWndExtra  = 0;
                                        wc.hInstance   = hInstance;
                                        wc.hCursor     = LoadCursor(NULL,IDC_ARROW);
                                        wc.hIcon       = LoadIcon(NULL,IDI_APPLICATION);
                                        wc.hbrBackground =  (HBRUSH)GetStockObject(WHITE_BRUSH);
                                        wc.lpszClassName = szAppName;
                                        wc.lpszMenuName  = NULL;
                                        RegisterClass(&amp;wc);

hWnd = CreateWindow(szAppName,
                    &quot;FunWarSuche v0.1&quot;,
                    WS_OVERLAPPEDWINDOW,
                    CW_USEDEFAULT,
                    CW_USEDEFAULT,
                    CW_USEDEFAULT,
                    CW_USEDEFAULT,
                    NULL,
                    NULL,
                    hInstance,
                    NULL);

ShowWindow(hWnd, iCmdShow);
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)
{
         switch (message)
         {
                  case WM_DESTROY:
                       {
                                  PostQuitMessage(0);
                                  return 0;
                       }
         }

                  return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
<p>Woran könnte es liegen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951541</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951541</guid><dc:creator><![CDATA[d4n1el]]></dc:creator><pubDate>Wed, 28 Dec 2005 16:01:00 GMT</pubDate></item><item><title><![CDATA[Reply to programm schließt sich nicht on Wed, 28 Dec 2005 16:07:27 GMT]]></title><description><![CDATA[<p>Definiere mal dein Gefühl etwas näher ^^<br />
Meinst du der Prozess bleibt im TaskManager drin nachdem du das Programm geschlossen hast und das Fenster verschwunden ist?</p>
<p>Ist das der komplette Code? Hast du am Compiler bestimmte Einstellungen verändert?<br />
Also was hier steht scheint mir auf den ersten Blick richtig zu sein.</p>
<p>Greetz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951544</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951544</guid><dc:creator><![CDATA[Manuel]]></dc:creator><pubDate>Wed, 28 Dec 2005 16:07:27 GMT</pubDate></item><item><title><![CDATA[Reply to programm schließt sich nicht on Wed, 28 Dec 2005 16:18:40 GMT]]></title><description><![CDATA[<p>while(GetMessage(&amp;msg, NULL, 0, 0));<br />
-----------------------------------^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951550</guid><dc:creator><![CDATA[^]]></dc:creator><pubDate>Wed, 28 Dec 2005 16:18:40 GMT</pubDate></item><item><title><![CDATA[Reply to programm schließt sich nicht on Wed, 28 Dec 2005 17:50:55 GMT]]></title><description><![CDATA[<p>d4n1el schrieb:</p>
<blockquote>
<pre><code class="language-cpp">[...]while(GetMessage(&amp;msg, NULL, 0, 0));
{
                       TranslateMessage(&amp;msg);
                       DispatchMessage(&amp;msg);
}[...]
</code></pre>
</blockquote>
<p>Direkt hinter dem while kommt nen ; - das ist der Fehler</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951595</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951595</guid><dc:creator><![CDATA[ItsNotYou]]></dc:creator><pubDate>Wed, 28 Dec 2005 17:50:55 GMT</pubDate></item><item><title><![CDATA[Reply to programm schließt sich nicht on Wed, 28 Dec 2005 17:35:31 GMT]]></title><description><![CDATA[<p>oh danke es lag an den &quot;;&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951600</guid><dc:creator><![CDATA[d4n1el]]></dc:creator><pubDate>Wed, 28 Dec 2005 17:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to programm schließt sich nicht on Wed, 28 Dec 2005 19:07:07 GMT]]></title><description><![CDATA[<p>*umfall*<br />
JAAAA ... so gut sind meine Augen um die Uhrzeit nicht mehr <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</p>
]]></description><link>https://www.c-plusplus.net/forum/post/951681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/951681</guid><dc:creator><![CDATA[Manuel]]></dc:creator><pubDate>Wed, 28 Dec 2005 19:07:07 GMT</pubDate></item></channel></rss>