<?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[Resize-Verhalten bei einer ListBox]]></title><description><![CDATA[<p>Hallo!</p>
<p>Wenn ich die Größe einer ListBox in der Höhe verändere, passt es sich nicht wirklich an den vorgegebenen Wert an. Es verändert seine Größe nur in &quot;Item-Height-Schritten&quot;, d.h. es ändert seine Größe so, dass gerade das letzte (auf die Sichtbarkeit bezogen) Item in der ListBox noch zu sehen ist.</p>
<p>Muss ich die ListBox subclassen um dieses Verhalten zu umgehen, oder geht es einfacher?</p>
<p>MfG,<br />
Aziz</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/67758/resize-verhalten-bei-einer-listbox</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 08:36:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/67758.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Mar 2004 13:26:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Thu, 11 Mar 2004 16:13:31 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Wenn ich die Größe einer ListBox in der Höhe verändere, passt es sich nicht wirklich an den vorgegebenen Wert an. Es verändert seine Größe nur in &quot;Item-Height-Schritten&quot;, d.h. es ändert seine Größe so, dass gerade das letzte (auf die Sichtbarkeit bezogen) Item in der ListBox noch zu sehen ist.</p>
<p>Muss ich die ListBox subclassen um dieses Verhalten zu umgehen, oder geht es einfacher?</p>
<p>MfG,<br />
Aziz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/478262</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/478262</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Thu, 11 Mar 2004 16:13:31 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Thu, 11 Mar 2004 19:09:36 GMT]]></title><description><![CDATA[<p>Funktioniert, wie vermutet, mit Subclassing wunderbar.</p>
<p>Hier der Code:</p>
<pre><code class="language-cpp">WNDPROC OldListBoxProc = NULL; // muss global sein
.
.
.
// irgendwo im Code
HWND hwndListBox = CreateWindowEx(NULL, &quot;LISTBOX&quot;, ..., ...);
OldListBoxProc = (WNDPROC)SetWindowLong(hwndListBox, GWL_WNDPROC, (LONG)ListBoxSubClassedProc);
</code></pre>
<pre><code class="language-cpp">LRESULT CALLBACK ListBoxSubClassedProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 
{ 
  switch(message)
  { 
  case WM_SIZE:
    return 0;
  } 

  return CallWindowProc(OldListBoxProc, hWnd, message, wParam, lParam); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/478575</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/478575</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Thu, 11 Mar 2004 19:09:36 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Thu, 11 Mar 2004 22:16:56 GMT]]></title><description><![CDATA[<p>Merke jetzt, dass die ListBox durch das Unterdrücken von WM_SIZE keine Scrollbars mehr anzeigen kann <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Würd' mich über einen Lösungsvorschlag freuen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/478692</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/478692</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Thu, 11 Mar 2004 22:16:56 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Fri, 12 Mar 2004 14:03:00 GMT]]></title><description><![CDATA[<p>Vielleicht über WM_GETMINMAXINFO <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/479083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479083</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 12 Mar 2004 14:03:00 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Fri, 12 Mar 2004 15:56:13 GMT]]></title><description><![CDATA[<p>Ich verstehe nicht ganz. Kannst du mir deine Idee etwas näher erklären? Wenn ich WM_GETMINMAXINFO unterdrücke macht es keinen Unterschied; die ListBox weist immer noch das selbe Verhalten auf.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/479170</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479170</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Fri, 12 Mar 2004 15:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Fri, 12 Mar 2004 16:34:28 GMT]]></title><description><![CDATA[<p>Nein, du könntest versuchen, dort die gewünschte Höhe zu setzen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/479201</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479201</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 12 Mar 2004 16:34:28 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Fri, 12 Mar 2004 18:35:14 GMT]]></title><description><![CDATA[<p>Hmm. Merkwürdigerweise kriegt die neue WindowProc keine einzige von dieser Message...</p>
<p>Ich fürchte, mir wird der Weg nicht erspart bleiben, die ListBox mit einer ListView zu ersetzen. Ich vermute die ListView macht da keine Probleme..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/479289</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479289</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Fri, 12 Mar 2004 18:35:14 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Fri, 12 Mar 2004 20:06:39 GMT]]></title><description><![CDATA[<p>hast Du schon das Stil-Flag <strong>LBS_NOINTEGRALHEIGHT</strong> probiert?</p>
<p>Zitat:<br />
Specifies that the size of the list box is exactly the size specified by the application when it created the list box. Normally, Windows sizes a list box so that the list box does not display partial items.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/479356</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479356</guid><dc:creator><![CDATA[Uli]]></dc:creator><pubDate>Fri, 12 Mar 2004 20:06:39 GMT</pubDate></item><item><title><![CDATA[Reply to Resize-Verhalten bei einer ListBox on Fri, 12 Mar 2004 20:11:24 GMT]]></title><description><![CDATA[<p>Ähm, das hab ich nicht bemerkt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Gut, dass du mir den Tipp gibst <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="😃"
    /><br />
Danke herzlichst!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/479361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479361</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Fri, 12 Mar 2004 20:11:24 GMT</pubDate></item></channel></rss>