<?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[Slider erstellen]]></title><description><![CDATA[<p>hy, ich hab versucht einen Slider via CreateWindow zu erstellen, bei Buttons Editfelder klappt das ganz gut aber mit dem Slider bekomm ich das nicht hin.<br />
kann mir da jemand helfen? was mach ich verkehrt?</p>
<p>hWndParent &amp; hInstance sind gültig. wärend hWndSlider immer Null ist.</p>
<pre><code>CRect rc;
rc.top			= 0;
rc.left			= 0;
rc.bottom		= 50;
rc.right		= 100;

DWORD dwStyle	= WS_CHILD | WS_VISIBLE | WS_HSCROLL |TBS_AUTOTICKS | TBS_TOP;

HWND hWndSlider = CreateWindow(	&quot;SLIDER&quot;,_T(&quot;&quot;),dwStyle, 
									rc-&gt;top,rc-&gt;left,rc-&gt;Width(),rc-&gt;Height(), 
									hWndParent,(HMENU)IDC_SLIDER,hInstance,NULL);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/179250/slider-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 03:09:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/179250.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Apr 2007 18:46:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Slider erstellen on Thu, 19 Apr 2007 18:46:23 GMT]]></title><description><![CDATA[<p>hy, ich hab versucht einen Slider via CreateWindow zu erstellen, bei Buttons Editfelder klappt das ganz gut aber mit dem Slider bekomm ich das nicht hin.<br />
kann mir da jemand helfen? was mach ich verkehrt?</p>
<p>hWndParent &amp; hInstance sind gültig. wärend hWndSlider immer Null ist.</p>
<pre><code>CRect rc;
rc.top			= 0;
rc.left			= 0;
rc.bottom		= 50;
rc.right		= 100;

DWORD dwStyle	= WS_CHILD | WS_VISIBLE | WS_HSCROLL |TBS_AUTOTICKS | TBS_TOP;

HWND hWndSlider = CreateWindow(	&quot;SLIDER&quot;,_T(&quot;&quot;),dwStyle, 
									rc-&gt;top,rc-&gt;left,rc-&gt;Width(),rc-&gt;Height(), 
									hWndParent,(HMENU)IDC_SLIDER,hInstance,NULL);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1269524</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269524</guid><dc:creator><![CDATA[*rT*f*Ct]]></dc:creator><pubDate>Thu, 19 Apr 2007 18:46:23 GMT</pubDate></item><item><title><![CDATA[Reply to Slider erstellen on Thu, 19 Apr 2007 19:24:30 GMT]]></title><description><![CDATA[<p>Vielleicht weil es eine klasse &quot;Slieder&quot; nicht gibt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Kann mich jetzt auch irren habe ich aber noch nie bei CreateWindow was von gehört. Und falls es ein CommonControl ist vergiss die Header und lib nicht.</p>
<p>MfG schirrmie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269577</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269577</guid><dc:creator><![CDATA[schirrmie]]></dc:creator><pubDate>Thu, 19 Apr 2007 19:24:30 GMT</pubDate></item><item><title><![CDATA[Reply to Slider erstellen on Thu, 19 Apr 2007 20:15:38 GMT]]></title><description><![CDATA[<p>hmmm,<br />
also ich hab in der msdn geschaut unter Common Control, dort schreiben sie das man die</p>
<pre><code>#include &lt;windows.h&gt;
#include &lt;shlwapi.h&gt;
#include &lt;commctrl.h&gt;
</code></pre>
<p>includen soll,<br />
aber von'er lib schreiben die da nix?<br />
hab vorsichtshalber mal die ShLwApi.Lib mít in den system-ordner gepackt. mit gleichbleibenden ergebniss, das es nucht funzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269608</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269608</guid><dc:creator><![CDATA[*rT*f*Ct]]></dc:creator><pubDate>Thu, 19 Apr 2007 20:15:38 GMT</pubDate></item><item><title><![CDATA[Reply to Slider erstellen on Fri, 20 Apr 2007 05:56:59 GMT]]></title><description><![CDATA[<p>Also hast du denn auch nachgeschaut ob &quot;Slider&quot; eine Common Control klasse ist? Wie gesagt ich glaube nicht! Und du brauchst für common Controls die commctrl.h und die Comctl32.lib! Woher hast du denn diesen &quot;Slider&quot; ist das irgendein Delphi oder VB &quot;mist&quot; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>schirrmie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269704</guid><dc:creator><![CDATA[schirrmie]]></dc:creator><pubDate>Fri, 20 Apr 2007 05:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to Slider erstellen on Fri, 20 Apr 2007 06:24:51 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">// Create
HWND m_Handle = ::CreateWindow(
                               TRACKBAR_CLASS,
                               _T(&quot;&quot;),
                               WS_CHILD|WS_VISIBLE|TBS_AUTOTICKS,
                               10, // left
                               10, // top
                               150, // length
                               30, // height,
                               m_hWndMain,
                               reinterpret_cast&lt;HMENU&gt;(static_cast&lt;ULONG_PTR&gt;(ID_SLIDER)),
                               0,
                               0
                               );
// Max Steps
::SendMessage(m_Handle, TBM_SETRANGEMAX, true, 100);

// Steps Wide for display the small lines
::SendMessage(m_Handle, TBM_SETTICFREQ, 10, 0);

// Set Position
::SendMessage(m_Handle, TBM_SETPOS, true, 50);

// Get Position
int pos = static_cast&lt;unsigned int&gt;(::SendMessage(m_Handle, TBM_GETPOS, 0, 0));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1269723</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269723</guid><dc:creator><![CDATA[EXDW]]></dc:creator><pubDate>Fri, 20 Apr 2007 06:24:51 GMT</pubDate></item><item><title><![CDATA[Reply to Slider erstellen on Fri, 20 Apr 2007 16:51:50 GMT]]></title><description><![CDATA[<p>danke evil,<br />
das was mir gefehlt hat war die TRACKBAR_CLASS.</p>
<p>hab da gleich das nächste problem.<br />
ich würd gern ne eigene CallBack procedur für die Slider erstellen, doch der folgende Code läst die Slider wieder verschwinden.</p>
<pre><code class="language-cpp">WNDPROC m_SliderProc = (WNDPROC)SetWindowLong(hWndSlider, GWL_WNDPROC, (LONG) SliderCtrlProc);

LRESULT APIENTRY  SliderCtrlProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	...
	return CallWindowProc(m_SliderProc, hDlg, message, wParam, lParam );
}
</code></pre>
<p>in der procedur selbst ruf ich momentan nur WM_HSCROLL ab.<br />
weis jemand woran das liegen könnte?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1270142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1270142</guid><dc:creator><![CDATA[*rT*f*Ct]]></dc:creator><pubDate>Fri, 20 Apr 2007 16:51:50 GMT</pubDate></item></channel></rss>