<?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[Erstes &amp;quot;Windows&amp;quot; Programm]]></title><description><![CDATA[<p>Hi,</p>
<p>also, da ich mich schon mit der Konsole und C++ beschäftigt habe, wollt ich mal mich mit der Windowsprogrammierung befassen. Allerdings tritt da schon ein Fehler auf ^^. Habe halt mal einen Code abgetippt und wollte schauen was passiert, und ihn dan verändern etc.</p>
<p>Allerdings kommt dan der Fehler :<br />
[Linker Error] undefined reference to 'CreateMainWindow(HINSTANCE__*)<br />
(unbestimmte verweisung ... mal übersetzt <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>hier der code:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
//Anwendungsfenster erzeugen
HWND CreateMainWindow(HINSTANCE hInstance);

//Callback-Funktion zur Nachrichtenbehandlung 
LRESULT CALLBACK MessageHandler(HWND hwnd, UINT msg, WPARAM wParam,
                                     LPARAM lParam);

//globale Variable für das Fenster-Handle
HWND hWnd = 0;

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

{
                   //Fenster erzeugen und HAndle speichern
                   hWnd = CreateMainWindow(hInstance);

                   // Wenn der Rückgabewert 0 isr, ist ein Fehler aufgetreten
                   if(0 == hWnd)
                   {
                        MessageBox(0,&quot;Fenster konnte nicht erzeugt werden&quot;,
                                     &quot;Fehler&quot; ,MB_OK);

                   return 0;
                   }

                   // Struktur, in der Information zur Nachricht gespeichert werdern
                   MSG msg;

                   //Diese Schleife läuft bis die Nachricht WM_QUIT empfangen
                   // wird

                   while(GetMessage(&amp;msg,NULL,0,0))
                   {
                      //nachricht an die Callback-Funktion senden
                      TranslateMessage(&amp;msg);
                      DispatchMessage(&amp;msg);
                      }

                   // Rückgabewert an Windows
                   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/137472/erstes-quot-windows-quot-programm</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 23:47:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/137472.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Feb 2006 17:31:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Sat, 18 Feb 2006 08:21:13 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>also, da ich mich schon mit der Konsole und C++ beschäftigt habe, wollt ich mal mich mit der Windowsprogrammierung befassen. Allerdings tritt da schon ein Fehler auf ^^. Habe halt mal einen Code abgetippt und wollte schauen was passiert, und ihn dan verändern etc.</p>
<p>Allerdings kommt dan der Fehler :<br />
[Linker Error] undefined reference to 'CreateMainWindow(HINSTANCE__*)<br />
(unbestimmte verweisung ... mal übersetzt <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>hier der code:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
//Anwendungsfenster erzeugen
HWND CreateMainWindow(HINSTANCE hInstance);

//Callback-Funktion zur Nachrichtenbehandlung 
LRESULT CALLBACK MessageHandler(HWND hwnd, UINT msg, WPARAM wParam,
                                     LPARAM lParam);

//globale Variable für das Fenster-Handle
HWND hWnd = 0;

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

{
                   //Fenster erzeugen und HAndle speichern
                   hWnd = CreateMainWindow(hInstance);

                   // Wenn der Rückgabewert 0 isr, ist ein Fehler aufgetreten
                   if(0 == hWnd)
                   {
                        MessageBox(0,&quot;Fenster konnte nicht erzeugt werden&quot;,
                                     &quot;Fehler&quot; ,MB_OK);

                   return 0;
                   }

                   // Struktur, in der Information zur Nachricht gespeichert werdern
                   MSG msg;

                   //Diese Schleife läuft bis die Nachricht WM_QUIT empfangen
                   // wird

                   while(GetMessage(&amp;msg,NULL,0,0))
                   {
                      //nachricht an die Callback-Funktion senden
                      TranslateMessage(&amp;msg);
                      DispatchMessage(&amp;msg);
                      }

                   // Rückgabewert an Windows
                   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/996887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996887</guid><dc:creator><![CDATA[neo*X*]]></dc:creator><pubDate>Sat, 18 Feb 2006 08:21:13 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Fri, 17 Feb 2006 17:34:56 GMT]]></title><description><![CDATA[<p>Die Lösung könnte darin bestehen diese Frage im RICHTIGEN Sub-Forum, nämlich<br />
WINAPI zu stellen. <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/996889</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996889</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Fri, 17 Feb 2006 17:34:56 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Fri, 17 Feb 2006 17:40:00 GMT]]></title><description><![CDATA[<p>mhm sry, tut mir leid. könnte es ein mod verschieben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/996895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996895</guid><dc:creator><![CDATA[neo*X*]]></dc:creator><pubDate>Fri, 17 Feb 2006 17:40:00 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Fri, 17 Feb 2006 17:46:56 GMT]]></title><description><![CDATA[<p>Wenn das der ganze Code ist, dann fehlt die implementierung dieser Funktion.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/996898</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/996898</guid><dc:creator><![CDATA[efsdh]]></dc:creator><pubDate>Fri, 17 Feb 2006 17:46:56 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Fri, 17 Feb 2006 22:08:06 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=10455" rel="nofollow">evilissimo</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/997031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997031</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 17 Feb 2006 22:08:06 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Sat, 18 Feb 2006 08:22:26 GMT]]></title><description><![CDATA[<p>könnte mir jemand anhand eines codes das programm zum laufen brinegn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997091</guid><dc:creator><![CDATA[neo*X*]]></dc:creator><pubDate>Sat, 18 Feb 2006 08:22:26 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Sat, 18 Feb 2006 09:34:22 GMT]]></title><description><![CDATA[<p>Es gibt viele Tutorials, in denen beschrieben wird, wie man ein Fenster erstellt und wie man Nachrichten verarbeitet:</p>
<p><a href="http://www.win-api.de" rel="nofollow">http://www.win-api.de</a><br />
<a href="http://www.functionx.com/win32/index.htm" rel="nofollow">http://www.functionx.com/win32/index.htm</a><br />
<a href="http://www.winapi.net/" rel="nofollow">http://www.winapi.net/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/997105</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997105</guid><dc:creator><![CDATA[qasdfgh]]></dc:creator><pubDate>Sat, 18 Feb 2006 09:34:22 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes &amp;quot;Windows&amp;quot; Programm on Sat, 18 Feb 2006 13:00:08 GMT]]></title><description><![CDATA[<p>nette seiten, vielen dank <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/997184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997184</guid><dc:creator><![CDATA[neo*X*]]></dc:creator><pubDate>Sat, 18 Feb 2006 13:00:08 GMT</pubDate></item></channel></rss>