<?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[WinApi Fenster fragen]]></title><description><![CDATA[<p>Hi<br />
Ich benutze den Dev C++ IDE (Kompiler) und möchte ein Fenster erstellen. Ich habe den Quelltext von diesen Tutoriel: <a href="http://www.henkessoft.de/C++/WinAPI/WinAPI%20Kapitel%201%20bis%206/api2.htm" rel="nofollow">http://www.henkessoft.de/C++/WinAPI/WinAPI Kapitel 1 bis 6/api2.htm</a><br />
Hier der Quelltext:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt; 
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);  
//Deklaration der Windows-Nachrichten-Prozedur 

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow) 
{ 
char szName[] = &quot;Fensterklasse&quot;; 
WNDCLASS wc; 

wc.style         = CS_HREDRAW | CS_VREDRAW;   // CS = &quot;class style&quot; 
wc.lpfnWndProc   = WndProc; 
wc.cbClsExtra    = 0; 
wc.cbWndExtra    = 0; 
wc.hInstance     = hI; 
wc.hIcon         = LoadIcon (NULL, IDI_WINLOGO); 
wc.hCursor       = LoadCursor (NULL, IDC_ARROW); 
wc.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH); 
wc.lpszMenuName  = NULL; 
wc.lpszClassName = szName; 

RegisterClass (&amp;wc); 

HWND hwnd = CreateWindow (szName, &quot;&quot;, WS_SYSMENU | WS_THICKFRAME,  
                          0, 0, 200, 100, NULL, NULL, hI, NULL); 

ShowWindow   (hwnd, iCmdShow); 
UpdateWindow (hwnd); 

// Nachrichten-Schleife 
MSG msg; 
    while (GetMessage (&amp;msg, NULL, 0, 0)) 
    { 
        TranslateMessage (&amp;msg); 
        DispatchMessage (&amp;msg); 
    } 
return msg.wParam; 
} 

// Windows-Nachrichten-Prozedur 
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); 
        TextOut (hdc, 20, 20, &quot;Ich bin ein Fenster.&quot;, 20); 
    EndPaint (hwnd, &amp;ps); 
    return 0; 

case WM_DESTROY: 
    PostQuitMessage (0); 
    return 0; 
} 

return DefWindowProc (hwnd, message, wParam, lParam); 
}
</code></pre>
<p>Dabei erschein folgender Fehler: [Linker error] undefined reference to <code>GetStockObject@4' \[Linker error\] undefined reference to</code>TextOutA@20'<br />
ld returned 1 exit status</p>
<p>Hat jemand ne Idee was der Fehler ist oder kennt jemand ein besseres Tutoriel?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/240651/winapi-fenster-fragen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Apr 2026 08:53:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/240651.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 May 2009 13:40:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:38:24 GMT]]></title><description><![CDATA[<p>Hi<br />
Ich benutze den Dev C++ IDE (Kompiler) und möchte ein Fenster erstellen. Ich habe den Quelltext von diesen Tutoriel: <a href="http://www.henkessoft.de/C++/WinAPI/WinAPI%20Kapitel%201%20bis%206/api2.htm" rel="nofollow">http://www.henkessoft.de/C++/WinAPI/WinAPI Kapitel 1 bis 6/api2.htm</a><br />
Hier der Quelltext:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt; 
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);  
//Deklaration der Windows-Nachrichten-Prozedur 

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow) 
{ 
char szName[] = &quot;Fensterklasse&quot;; 
WNDCLASS wc; 

wc.style         = CS_HREDRAW | CS_VREDRAW;   // CS = &quot;class style&quot; 
wc.lpfnWndProc   = WndProc; 
wc.cbClsExtra    = 0; 
wc.cbWndExtra    = 0; 
wc.hInstance     = hI; 
wc.hIcon         = LoadIcon (NULL, IDI_WINLOGO); 
wc.hCursor       = LoadCursor (NULL, IDC_ARROW); 
wc.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH); 
wc.lpszMenuName  = NULL; 
wc.lpszClassName = szName; 

RegisterClass (&amp;wc); 

HWND hwnd = CreateWindow (szName, &quot;&quot;, WS_SYSMENU | WS_THICKFRAME,  
                          0, 0, 200, 100, NULL, NULL, hI, NULL); 

ShowWindow   (hwnd, iCmdShow); 
UpdateWindow (hwnd); 

// Nachrichten-Schleife 
MSG msg; 
    while (GetMessage (&amp;msg, NULL, 0, 0)) 
    { 
        TranslateMessage (&amp;msg); 
        DispatchMessage (&amp;msg); 
    } 
return msg.wParam; 
} 

// Windows-Nachrichten-Prozedur 
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); 
        TextOut (hdc, 20, 20, &quot;Ich bin ein Fenster.&quot;, 20); 
    EndPaint (hwnd, &amp;ps); 
    return 0; 

case WM_DESTROY: 
    PostQuitMessage (0); 
    return 0; 
} 

return DefWindowProc (hwnd, message, wParam, lParam); 
}
</code></pre>
<p>Dabei erschein folgender Fehler: [Linker error] undefined reference to <code>GetStockObject@4' \[Linker error\] undefined reference to</code>TextOutA@20'<br />
ld returned 1 exit status</p>
<p>Hat jemand ne Idee was der Fehler ist oder kennt jemand ein besseres Tutoriel?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708162</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708162</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Sat, 09 May 2009 14:38:24 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 13:45:59 GMT]]></title><description><![CDATA[<p>ist irgendeine library nicht drin, deshalb findet der linker die funktionen nicht.<br />
der aufruf sollte so aussehen gcc -o name <strong>-mwindows</strong> datei.c</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708165</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708165</guid><dc:creator><![CDATA[player4245]]></dc:creator><pubDate>Sat, 09 May 2009 13:45:59 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:04:13 GMT]]></title><description><![CDATA[<p>Also was genau muss ich jetzt ändern?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708173</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Sat, 09 May 2009 14:04:13 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:06:23 GMT]]></title><description><![CDATA[<p>du musst in deinem compiler aufruf -mwindows hinzufügen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708174</guid><dc:creator><![CDATA[player4245]]></dc:creator><pubDate>Sat, 09 May 2009 14:06:23 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:07:32 GMT]]></title><description><![CDATA[<p>oh sorry hast ja ne ide, da musst du bei einem neuen projekt win32 fensteranwendung oder so wählen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708176</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708176</guid><dc:creator><![CDATA[player4245]]></dc:creator><pubDate>Sat, 09 May 2009 14:07:32 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:15:37 GMT]]></title><description><![CDATA[<p>Okay Danke klappt jetzt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708179</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Sat, 09 May 2009 14:15:37 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:37:49 GMT]]></title><description><![CDATA[<p>Was genau macht eigentlich bei diesem Code</p>
<pre><code class="language-cpp">ShowWindow   (hwnd, iCmdShow);
</code></pre>
<p>der Befehl iCmdShow.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708192</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708192</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Sat, 09 May 2009 14:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:45:10 GMT]]></title><description><![CDATA[<p>den Parameter ist von der WinMain und sagt aus, wie dein Fenster dargestellt wird.</p>
<pre><code class="language-cpp">int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1708199</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708199</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 09 May 2009 14:45:10 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 14:50:18 GMT]]></title><description><![CDATA[<p>Und wie stellt iCmdShow, dass Fenster da, weil es gibt ja auch noch<br />
SW_NORMAL. Also was ist der Unterschied zwischen SW_NORMAL und iCmdShow?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708203</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Sat, 09 May 2009 14:50:18 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 15:07:27 GMT]]></title><description><![CDATA[<p>iCmdShow ist Grundsätzlich SW_SHOWNORMAL.<br />
Bei Verknüpfungen von Programmen kann man jedoch unter Eigenschaften das Programm minimiert und maximiert starten. Dann hat iCmdShow einen anderen Wert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708212</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708212</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 09 May 2009 15:07:27 GMT</pubDate></item><item><title><![CDATA[Reply to WinApi Fenster fragen on Sat, 09 May 2009 15:11:28 GMT]]></title><description><![CDATA[<p>Okay Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1708215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1708215</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Sat, 09 May 2009 15:11:28 GMT</pubDate></item></channel></rss>