<?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[Scrollbar zu einem bestehenden Formular hinzufügen]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich komme aus der Mac-Programmierung und habe ein Problem mit der Erzeugung von Scrollbars unter Windows. Ich möchte on-fly zu einem bestehenden Formular einen vertikalen Scrollbar hinzufügen. Ich experimentiere mit CreateWindow und CreateWindowEx, aber egal was ich mache, es wird jedes mal ein neues Fenster aufgemacht:</p>
<pre><code class="language-cpp">projPtr-&gt;vscrollbarWIN=CreateWindowEx( 
                0,                          // no extended styles 
                &quot;SCROLLBAR&quot;,                 // scroll bar control class 
                (LPSTR) NULL,                // text for window title bar 
                SBS_VERT,         // scroll bar styles 
                projPtr-&gt;vscrollbarrect.left,                           // horizontal position 
                projPtr-&gt;vscrollbarrect.top,                           // vertical position 
                15,                         // width of the scroll bar 
                100,               // default height 
                (HWND) hwnd,                   // handle to main window 
                (HMENU) 0,           // no menu for a scroll bar 
                (HINSTANCE) GetModuleHandle(0),                  // instance owning this window 
                (LPVOID) 0           // pointer not needed 
            );

            ShowWindow(projPtr-&gt;vscrollbarWIN,true);
</code></pre>
<p>Irgendeine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/126369/scrollbar-zu-einem-bestehenden-formular-hinzufügen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 20:20:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/126369.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Nov 2005 17:22:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Mon, 14 Nov 2005 17:22:58 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich komme aus der Mac-Programmierung und habe ein Problem mit der Erzeugung von Scrollbars unter Windows. Ich möchte on-fly zu einem bestehenden Formular einen vertikalen Scrollbar hinzufügen. Ich experimentiere mit CreateWindow und CreateWindowEx, aber egal was ich mache, es wird jedes mal ein neues Fenster aufgemacht:</p>
<pre><code class="language-cpp">projPtr-&gt;vscrollbarWIN=CreateWindowEx( 
                0,                          // no extended styles 
                &quot;SCROLLBAR&quot;,                 // scroll bar control class 
                (LPSTR) NULL,                // text for window title bar 
                SBS_VERT,         // scroll bar styles 
                projPtr-&gt;vscrollbarrect.left,                           // horizontal position 
                projPtr-&gt;vscrollbarrect.top,                           // vertical position 
                15,                         // width of the scroll bar 
                100,               // default height 
                (HWND) hwnd,                   // handle to main window 
                (HMENU) 0,           // no menu for a scroll bar 
                (HINSTANCE) GetModuleHandle(0),                  // instance owning this window 
                (LPVOID) 0           // pointer not needed 
            );

            ShowWindow(projPtr-&gt;vscrollbarWIN,true);
</code></pre>
<p>Irgendeine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/917583</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917583</guid><dc:creator><![CDATA[Christian Sakowski]]></dc:creator><pubDate>Mon, 14 Nov 2005 17:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Mon, 14 Nov 2005 17:37:09 GMT]]></title><description><![CDATA[<pre><code>projPtr-&gt;vscrollbarWIN=CreateWindowEx(
                0,                          // no extended styles
                &quot;SCROLLBAR&quot;,                 // scroll bar control class
                (LPSTR) NULL,                // text for window title bar
                SBS_VERT [b]| WS_CHILD[/b],         // scroll bar styles
                projPtr-&gt;vscrollbarrect.left,                           // horizontal position
                projPtr-&gt;vscrollbarrect.top,                           // vertical position
                15,                         // width of the scroll bar
                100,               // default height
                (HWND) hwnd,                   // handle to main window
                (HMENU) 0,           // no menu for a scroll bar
                (HINSTANCE) GetModuleHandle(0),                  // instance owning this window
                (LPVOID) 0           // pointer not needed
            );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/917590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917590</guid><dc:creator><![CDATA[Zerebus]]></dc:creator><pubDate>Mon, 14 Nov 2005 17:37:09 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Mon, 14 Nov 2005 17:54:14 GMT]]></title><description><![CDATA[<p>Nein, das war es nicht. Wenn ich das so übernehme wird nichts erstellt. Die Prozedur CreateWindowEx gibt 0 zurück.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/917609</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917609</guid><dc:creator><![CDATA[Christian Sakowski]]></dc:creator><pubDate>Mon, 14 Nov 2005 17:54:14 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Mon, 14 Nov 2005 18:27:19 GMT]]></title><description><![CDATA[<p>Hast du schon in der MSDN nachgeschaut?</p>
<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/scrollbars/scrollbars.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/scrollbars/scrollbars.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/917659</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917659</guid><dc:creator><![CDATA[Zerebus]]></dc:creator><pubDate>Mon, 14 Nov 2005 18:27:19 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Mon, 14 Nov 2005 19:12:16 GMT]]></title><description><![CDATA[<p>Ja klar. Das ist ja immer meine erste Anlaufstelle. Nur das hilft mir nicht weiter. Funktionieren tut es nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/917721</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917721</guid><dc:creator><![CDATA[Christian Sakowski]]></dc:creator><pubDate>Mon, 14 Nov 2005 19:12:16 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Tue, 15 Nov 2005 06:16:14 GMT]]></title><description><![CDATA[<p>Was meint denn GetLastError?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/918091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918091</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Tue, 15 Nov 2005 06:16:14 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Tue, 15 Nov 2005 08:38:36 GMT]]></title><description><![CDATA[<p>Ja, GetLastError gibt 1406 zurück:</p>
<p>ERROR_TLW_WITH_WSCHILD<br />
1406 Cannot create a top-level child window.</p>
<p>Aber warum???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/918194</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918194</guid><dc:creator><![CDATA[Christian Sakowski]]></dc:creator><pubDate>Tue, 15 Nov 2005 08:38:36 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Tue, 15 Nov 2005 08:43:40 GMT]]></title><description><![CDATA[<p>Versuchs mal damit:</p>
<pre><code class="language-cpp">GetClientRect( hWnd, &amp;rc );
hScrollBar = CreateWindowEx( 0, &quot;SCROLLBAR&quot;, NULL, SBS_RIGHTALIGN | SBS_VERT | WS_CHILD | WS_VISIBLE, rc.left, rc.top, rc.right, rc.bottom, hWnd, (HMENU) 0, hInstance, NULL );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/918203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918203</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Tue, 15 Nov 2005 08:43:40 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Tue, 15 Nov 2005 09:24:42 GMT]]></title><description><![CDATA[<p>Mhhh. Das gleiche. Da bekomme ich auch Fehler 1406. Was kann das nur sein?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/918240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918240</guid><dc:creator><![CDATA[Christian Sakowski]]></dc:creator><pubDate>Tue, 15 Nov 2005 09:24:42 GMT</pubDate></item><item><title><![CDATA[Reply to Scrollbar zu einem bestehenden Formular hinzufügen on Tue, 15 Nov 2005 09:33:59 GMT]]></title><description><![CDATA[<p>bei mir funktionierts.<br />
Ansonsten kannst Du dem Hauptfenster beim erstellen die Styles WS_VSCROLL und/oder WS_HSCROLL übergeben, damit bekommst Du auch Scrollbars...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/918247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918247</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Tue, 15 Nov 2005 09:33:59 GMT</pubDate></item></channel></rss>