<?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[Neuen Fensterstyle setzen geht ned]]></title><description><![CDATA[<p>Hey!</p>
<p>Warum funktioniert SetWindowLong() nicht:</p>
<pre><code class="language-cpp">HWND windowHandle = CreateWindow(&quot;Main&quot;, 0, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);

SetWindowLong(windowHandle, GWL_STYLE, WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE); 
SetWindowPos(windowHandle, HWND_NOTOPMOST, 0, 0, 640, 480, SWP_FRAMECHANGED);
</code></pre>
<p>SetWindowPos() hat einen Effekt, aber das Fenster hat anschließend trotzdem kein SYSMENU oder ne MINIMIZEBOX.</p>
<p>Was mach ich falsch?</p>
<p>Danke!<br />
MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/195993/neuen-fensterstyle-setzen-geht-ned</link><generator>RSS for Node</generator><lastBuildDate>Mon, 29 Jun 2026 21:22:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/195993.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Oct 2007 10:47:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 10:47:21 GMT]]></title><description><![CDATA[<p>Hey!</p>
<p>Warum funktioniert SetWindowLong() nicht:</p>
<pre><code class="language-cpp">HWND windowHandle = CreateWindow(&quot;Main&quot;, 0, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);

SetWindowLong(windowHandle, GWL_STYLE, WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE); 
SetWindowPos(windowHandle, HWND_NOTOPMOST, 0, 0, 640, 480, SWP_FRAMECHANGED);
</code></pre>
<p>SetWindowPos() hat einen Effekt, aber das Fenster hat anschließend trotzdem kein SYSMENU oder ne MINIMIZEBOX.</p>
<p>Was mach ich falsch?</p>
<p>Danke!<br />
MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391096</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391096</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Wed, 24 Oct 2007 10:47:21 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 12:15:05 GMT]]></title><description><![CDATA[<p>Überprüf die Rückgabewerte und lass Dir mit GetLastError die Fehlercodes geben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391157</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391157</guid><dc:creator><![CDATA[~Airdamn]]></dc:creator><pubDate>Wed, 24 Oct 2007 12:15:05 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 13:26:07 GMT]]></title><description><![CDATA[<p>Wenn ich...</p>
<pre><code class="language-cpp">if(SetWindowLong(windowHandle, GWL_STYLE, WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE) == 0)
		MessageBox(0, 0, 0, 0);
</code></pre>
<p>...schreibe, wird keine MessageBox angezeigt und GetLastError() ist 0. Wenn ich aber...</p>
<pre><code class="language-cpp">if(SetWindowLong(windowHandle, GWL_STYLE, WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE) == WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE)
		MessageBox(0, 0, 0, 0);
</code></pre>
<p>...schreibe, wird die MessageBox angezeigt und GetLastError() ist 6? Warum tritt ein Fehler auf, wenn ich mit einem anderen Wert vergleiche??</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391217</guid><dc:creator><![CDATA[ceplusplus@loggedoff]]></dc:creator><pubDate>Wed, 24 Oct 2007 13:26:07 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 13:45:26 GMT]]></title><description><![CDATA[<p>Hast du dir mal angesehen, was der Rückgabewert von SetWindowLong() darstellt? Und wo genau fragst du GetLastError() ab?</p>
<p>(btw - Fehlercode 6 steht für &quot;ungültiges Handle&quot;, vielleicht hilft das ja)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391234</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 24 Oct 2007 13:45:26 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 13:54:55 GMT]]></title><description><![CDATA[<p>Das stellt der Rückgabewert dar: WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE<br />
GetLastError rufe ich danach auf. Ja, ungültiges Handle, aber warum nur, wenn ich mit den styles vergleiche? Das kann doch nix mit einem Vergleich zu tun haben.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391245</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391245</guid><dc:creator><![CDATA[ceplusplus@loggedoff]]></dc:creator><pubDate>Wed, 24 Oct 2007 13:54:55 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 13:59:17 GMT]]></title><description><![CDATA[<p>ceplusplus@loggedoff schrieb:</p>
<blockquote>
<p>Das stellt der Rückgabewert dar: WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE</p>
</blockquote>
<p>*g* Lies nochmal langsam - in der MSDN steht auch dabei, was dieser Wert aussagen soll <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>(btw, ich erinnere mich dunkel, daß einige Fensterstile schon beim Anlegen gesetzt werden MÜSSEN)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391252</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 24 Oct 2007 13:59:17 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Wed, 24 Oct 2007 14:03:57 GMT]]></title><description><![CDATA[<p>Oh, &quot;the previous value&quot; ... aber der Rückgabewert ist ja nicht 0. Ich versteh garnix mehr...</p>
<pre><code class="language-cpp">windowClass.lpfnWndProc = MsgProc;
windowClass.lpszClassName = &quot;Main&quot;;

RegisterClass(&amp;windowClass);

windowHandle = CreateWindow(&quot;Main&quot;, 0, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);

SetWindowLong(windowHandle, GWL_STYLE, WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE); 
SetWindowPos(windowHandle, HWND_NOTOPMOST, 0, 0, 640, 480, SWP_FRAMECHANGED);
</code></pre>
<p>Warum haut es nicht hin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391256</guid><dc:creator><![CDATA[ceplusplus@loggedoff]]></dc:creator><pubDate>Wed, 24 Oct 2007 14:03:57 GMT</pubDate></item><item><title><![CDATA[Reply to Neuen Fensterstyle setzen geht ned on Thu, 25 Oct 2007 09:20:10 GMT]]></title><description><![CDATA[<p>Hab wo anders nachgefragt. Problem gelöst:<br />
Man muss WS_CAPTION auch setzen, sobald man einmal WS_POPUP gesetzt hat oder so. Jedenfalls muss dieser style noch dazu, wenn man in den Fenstermodus geht.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391693</guid><dc:creator><![CDATA[ceplusplus@loggedoff]]></dc:creator><pubDate>Thu, 25 Oct 2007 09:20:10 GMT</pubDate></item></channel></rss>