<?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[Windows Aplikation - aber wo anfangen??]]></title><description><![CDATA[<p>Hi Leute. Ich weiss ihr werdet jetz bestimmt lachen. Aber ich mach noch nich lange mit C++. Hab bis jetz immer Dos-Anwendungen programmiert, weil ich nich wusste wie es anders geht. Ich habe nämlich folgendes Problem:</p>
<p>So sieht meine main.cpp aus, wenn ich ne Windows-application neu aufmache:</p>
<p>#include &lt;windows.h&gt;</p>
<p>/* Declare Windows procedure */<br />
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);</p>
<p>/* Make the class name into a global variable */<br />
<div class="plugin-markdown"><input type="checkbox" id="checkbox72773" /><label for="checkbox72773">= &quot;WindowsApp&quot;;</label></div></p>
<p>int WINAPI WinMain (HINSTANCE hThisInstance,<br />
HINSTANCE hPrevInstance,<br />
LPSTR lpszArgument,<br />
int nFunsterStil)</p>
<p>{<br />
HWND hwnd; /* This is the handle for our window <em>/<br />
MSG messages; /</em> Here messages to the application are saved <em>/<br />
WNDCLASSEX wincl; /</em> Data structure for the windowclass */</p>
<p>/* The Window structure <em>/<br />
wincl.hInstance = hThisInstance;<br />
wincl.lpszClassName = szClassName;<br />
wincl.lpfnWndProc = WindowProcedure; /</em> This function is called by windows <em>/<br />
wincl.style = CS_DBLCLKS; /</em> Catch double-clicks */<br />
wincl.cbSize = sizeof (WNDCLASSEX);</p>
<p>/* Use default icon and mouse-pointer <em>/<br />
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);<br />
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);<br />
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);<br />
wincl.lpszMenuName = NULL; /</em> No menu <em>/<br />
wincl.cbClsExtra = 0; /</em> No extra bytes after the window class <em>/<br />
wincl.cbWndExtra = 0; /</em> structure or the window instance */<br />
/* Use Windows's default color as the background of the window */<br />
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;</p>
<p>/* Register the window class, and if it fails quit the program */<br />
if (!RegisterClassEx (&amp;wincl))<br />
return 0;</p>
<p>/* The class is registered, let's create the program*/<br />
hwnd = CreateWindowEx (<br />
0, /* Extended possibilites for variation <em>/<br />
szClassName, /</em> Classname <em>/<br />
&quot;Windows App&quot;, /</em> Title Text <em>/<br />
WS_OVERLAPPEDWINDOW, /</em> default window <em>/<br />
CW_USEDEFAULT, /</em> Windows decides the position <em>/<br />
CW_USEDEFAULT, /</em> where the window ends up on the screen <em>/<br />
544, /</em> The programs width <em>/<br />
375, /</em> and height in pixels <em>/<br />
HWND_DESKTOP, /</em> The window is a child-window to desktop <em>/<br />
NULL, /</em> No menu <em>/<br />
hThisInstance, /</em> Program Instance handler <em>/<br />
NULL /</em> No Window Creation data */<br />
);</p>
<p>/* Make the window visible on the screen */<br />
ShowWindow (hwnd, nFunsterStil);</p>
<p>/* Run the message loop. It will run until GetMessage() returns 0 */<br />
while (GetMessage (&amp;messages, NULL, 0, 0))<br />
{<br />
/* Translate virtual-key messages into character messages */<br />
TranslateMessage(&amp;messages);<br />
/* Send message to WindowProcedure */<br />
DispatchMessage(&amp;messages);<br />
}</p>
<p>/* The program return-value is 0 - The value that PostQuitMessage() gave */<br />
return messages.wParam;<br />
}</p>
<p>/* This function is called by the Windows function DispatchMessage() */</p>
<p>LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)<br />
{<br />
switch (message) /* handle the messages <em>/<br />
{<br />
case WM_DESTROY:<br />
PostQuitMessage (0); /</em> send a WM_QUIT to the message queue <em>/<br />
break;<br />
default: /</em> for messages that we don't deal with */<br />
return DefWindowProc (hwnd, message, wParam, lParam);<br />
}</p>
<p>return 0;<br />
}</p>
<p>Ich hab eigentlich nur eine Frage: Wo muss ich mein Programm hinschreiben. Einfach nur unten drunter? Oda kann ich den ganzen Quark löschen und dann loslegen? Brauche dringend Hilfe. Thx!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/169455/windows-aplikation-aber-wo-anfangen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 13:04:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/169455.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Jan 2007 13:37:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Fri, 05 Jan 2007 13:37:31 GMT]]></title><description><![CDATA[<p>Hi Leute. Ich weiss ihr werdet jetz bestimmt lachen. Aber ich mach noch nich lange mit C++. Hab bis jetz immer Dos-Anwendungen programmiert, weil ich nich wusste wie es anders geht. Ich habe nämlich folgendes Problem:</p>
<p>So sieht meine main.cpp aus, wenn ich ne Windows-application neu aufmache:</p>
<p>#include &lt;windows.h&gt;</p>
<p>/* Declare Windows procedure */<br />
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);</p>
<p>/* Make the class name into a global variable */<br />
<div class="plugin-markdown"><input type="checkbox" id="checkbox72773" /><label for="checkbox72773">= &quot;WindowsApp&quot;;</label></div></p>
<p>int WINAPI WinMain (HINSTANCE hThisInstance,<br />
HINSTANCE hPrevInstance,<br />
LPSTR lpszArgument,<br />
int nFunsterStil)</p>
<p>{<br />
HWND hwnd; /* This is the handle for our window <em>/<br />
MSG messages; /</em> Here messages to the application are saved <em>/<br />
WNDCLASSEX wincl; /</em> Data structure for the windowclass */</p>
<p>/* The Window structure <em>/<br />
wincl.hInstance = hThisInstance;<br />
wincl.lpszClassName = szClassName;<br />
wincl.lpfnWndProc = WindowProcedure; /</em> This function is called by windows <em>/<br />
wincl.style = CS_DBLCLKS; /</em> Catch double-clicks */<br />
wincl.cbSize = sizeof (WNDCLASSEX);</p>
<p>/* Use default icon and mouse-pointer <em>/<br />
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);<br />
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);<br />
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);<br />
wincl.lpszMenuName = NULL; /</em> No menu <em>/<br />
wincl.cbClsExtra = 0; /</em> No extra bytes after the window class <em>/<br />
wincl.cbWndExtra = 0; /</em> structure or the window instance */<br />
/* Use Windows's default color as the background of the window */<br />
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;</p>
<p>/* Register the window class, and if it fails quit the program */<br />
if (!RegisterClassEx (&amp;wincl))<br />
return 0;</p>
<p>/* The class is registered, let's create the program*/<br />
hwnd = CreateWindowEx (<br />
0, /* Extended possibilites for variation <em>/<br />
szClassName, /</em> Classname <em>/<br />
&quot;Windows App&quot;, /</em> Title Text <em>/<br />
WS_OVERLAPPEDWINDOW, /</em> default window <em>/<br />
CW_USEDEFAULT, /</em> Windows decides the position <em>/<br />
CW_USEDEFAULT, /</em> where the window ends up on the screen <em>/<br />
544, /</em> The programs width <em>/<br />
375, /</em> and height in pixels <em>/<br />
HWND_DESKTOP, /</em> The window is a child-window to desktop <em>/<br />
NULL, /</em> No menu <em>/<br />
hThisInstance, /</em> Program Instance handler <em>/<br />
NULL /</em> No Window Creation data */<br />
);</p>
<p>/* Make the window visible on the screen */<br />
ShowWindow (hwnd, nFunsterStil);</p>
<p>/* Run the message loop. It will run until GetMessage() returns 0 */<br />
while (GetMessage (&amp;messages, NULL, 0, 0))<br />
{<br />
/* Translate virtual-key messages into character messages */<br />
TranslateMessage(&amp;messages);<br />
/* Send message to WindowProcedure */<br />
DispatchMessage(&amp;messages);<br />
}</p>
<p>/* The program return-value is 0 - The value that PostQuitMessage() gave */<br />
return messages.wParam;<br />
}</p>
<p>/* This function is called by the Windows function DispatchMessage() */</p>
<p>LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)<br />
{<br />
switch (message) /* handle the messages <em>/<br />
{<br />
case WM_DESTROY:<br />
PostQuitMessage (0); /</em> send a WM_QUIT to the message queue <em>/<br />
break;<br />
default: /</em> for messages that we don't deal with */<br />
return DefWindowProc (hwnd, message, wParam, lParam);<br />
}</p>
<p>return 0;<br />
}</p>
<p>Ich hab eigentlich nur eine Frage: Wo muss ich mein Programm hinschreiben. Einfach nur unten drunter? Oda kann ich den ganzen Quark löschen und dann loslegen? Brauche dringend Hilfe. Thx!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1203572</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1203572</guid><dc:creator><![CDATA[pilzsammler1988]]></dc:creator><pubDate>Fri, 05 Jan 2007 13:37:31 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Fri, 05 Jan 2007 13:47:28 GMT]]></title><description><![CDATA[<p>wenn du winapi machen möchtest dann <a href="http://www.win-api.de/tutorials.php" rel="nofollow">http://www.win-api.de/tutorials.php</a><br />
wenn nicht dann musst du uns schon mitteilen was du machen möchtest <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="😉"
    /><br />
ps: falsches forum <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> winapi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1203588</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1203588</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 05 Jan 2007 13:47:28 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Fri, 05 Jan 2007 14:31:18 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/14721">@pilzsammler1988</a>:<br />
als ich mit winAPI angefangen hab, da hab ich auch so gedacht wie du un hab also stdio inkludiert und in winMAIN ma printf(&quot;hello&quot;); geschrieben^^<br />
aber bei windows geht das ein bissle anders. (siehe tutorial von miller_m)<br />
sollte das aus irgentwelschen gründen - was ich nicht denke - scheisse sein, dann probier ma: <a href="http://www.winprog.org/tutorial/" rel="nofollow">http://www.winprog.org/tutorial/</a> (englisch)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1203644</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1203644</guid><dc:creator><![CDATA[Fachmann]]></dc:creator><pubDate>Fri, 05 Jan 2007 14:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Fri, 05 Jan 2007 14:46:43 GMT]]></title><description><![CDATA[<p>Was mich an <a href="http://www.win-api.de/tutorials.php" rel="nofollow">http://www.win-api.de/tutorials.php</a> stört ist, dass nicht std::string benutzt wird und anschließend diese strings umgewandelt werden, sondern nur const char. (Wobei, was weiß ich schon, bin selber noch Anfänger.)</p>
<p>Ich persönlich kann das zweite Tutorial eher empfehlen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1203666</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1203666</guid><dc:creator><![CDATA[Jacks Rache]]></dc:creator><pubDate>Fri, 05 Jan 2007 14:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Fri, 05 Jan 2007 16:58:31 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=403" rel="nofollow">HumeSikkins</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/1203779</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1203779</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 05 Jan 2007 16:58:31 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Wed, 15 Aug 2007 06:34:48 GMT]]></title><description><![CDATA[<p>@Jacks Rache<br />
warum keine strings verwenden geht doch wunderbar, wozu gibt es denn noch die c_str() für teile der winapi die meckern ?? nur auch nich überall anwendbar <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1344723</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1344723</guid><dc:creator><![CDATA[Ascharan]]></dc:creator><pubDate>Wed, 15 Aug 2007 06:34:48 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Sat, 20 Oct 2007 20:05:51 GMT]]></title><description><![CDATA[<p>Scheiss spam hier...<br />
Egal.<br />
Ich empfehle dir wirklich ein Gui-Toolkit wie wxWidgets zu verwenden. Es ist viel schneller als WINAPI zu erlernen und führt schneller zum Erfolg. Ausserdem ist es 1000x einfacher und schneller zu programmieren. Ich möchte nicht mehr auf wxWidgets verzichten. Auch die MFC is hier besser als WINAPI... das grenzt eigentlich schon an Masochismus damit zu programmieren :P. Scherz beseite, wenn du willst, lerns :). Aber wenn du lieber Ergebnisse sehen möchtes und innerhalb sagen wir 1 Woche richtig gute GUI-Anwendungen produzieren willst, nimm MFC oder wxWidgets. Letzters empfehle ich, weil es Plattformunabhängig ist und deine Programme dann auch unter Linux/Mac laufen können.<br />
rya.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1389164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1389164</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Sat, 20 Oct 2007 20:05:51 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Thu, 20 Dec 2007 21:14:12 GMT]]></title><description><![CDATA[<p>a3oxiI liked much has me site Your very ,</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1424117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1424117</guid><dc:creator><![CDATA[natasha]]></dc:creator><pubDate>Thu, 20 Dec 2007 21:14:12 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Aplikation - aber wo anfangen?? on Fri, 21 Dec 2007 01:15:43 GMT]]></title><description><![CDATA[<p>Kann mich dem prinzipiell anschließen. Aber: man lernt, wenn man sich mit der WinAPI genauer beschäftigt, viel Hintergrundwissen, wie Betriebssysteme arbeiten (Windows). Wenn Du ein Framework verwendest, würde ich mich vorher gründlich informieren, welches für Dich in Frage kommt (...da gibts einige Unterschiede, Vor- und Nachteile) . Die MFC würde ich *nicht* empfehlen ( <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> schreckliches 'C++' <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/1424224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1424224</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 21 Dec 2007 01:15:43 GMT</pubDate></item></channel></rss>