<?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[Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage?]]></title><description><![CDATA[<p>Hallo,</p>
<p>möchte in einer Listbox nach einem String suchen und den<br />
Index zurückerhalten; kann aber keine direkte Listfunktion<br />
dafür finden. Gibt es die nicht oder heißt die unter C++<br />
vielleicht anders als Find oder Search?</p>
<p>Wollte es dann mit Sendmessage machen:<br />
i1=sendmessage (frm1_lbAnzeige-&gt;Handle,LB_FIND,0,z1);</p>
<p>Dann kommt beim ausführen aber die Meldung:<br />
Falsches Symbol 'LB_FIND'</p>
<p>Bedeutet das der Wert für LB_Find nicht bekannt ist?<br />
Wenn ja, wo sind diese hinterlegt bzw. wie binde ich die ein?<br />
(habe in google, online hilfe und hier gesucht, nix gefunden)</p>
<p>Danke für Tips</p>
<p>Stefan</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/117873/sendmessage-als-funktion-unbekannt-bzw-listboxsuche-nur-mit-sendmessage</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 11:41:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/117873.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Aug 2005 08:03:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 08:03:18 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>möchte in einer Listbox nach einem String suchen und den<br />
Index zurückerhalten; kann aber keine direkte Listfunktion<br />
dafür finden. Gibt es die nicht oder heißt die unter C++<br />
vielleicht anders als Find oder Search?</p>
<p>Wollte es dann mit Sendmessage machen:<br />
i1=sendmessage (frm1_lbAnzeige-&gt;Handle,LB_FIND,0,z1);</p>
<p>Dann kommt beim ausführen aber die Meldung:<br />
Falsches Symbol 'LB_FIND'</p>
<p>Bedeutet das der Wert für LB_Find nicht bekannt ist?<br />
Wenn ja, wo sind diese hinterlegt bzw. wie binde ich die ein?<br />
(habe in google, online hilfe und hier gesucht, nix gefunden)</p>
<p>Danke für Tips</p>
<p>Stefan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850571</guid><dc:creator><![CDATA[Stefan71242]]></dc:creator><pubDate>Fri, 12 Aug 2005 08:03:18 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 08:19:38 GMT]]></title><description><![CDATA[<p>TListBox::Items::IndexOf()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850580</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850580</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 12 Aug 2005 08:19:38 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 08:24:07 GMT]]></title><description><![CDATA[<p>Vielen Dank!! Funktioniert.</p>
<p>Kann mir jemand noch sagen, wie das mit dem LB_FIND ist?</p>
<p>Gruss Stefan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850584</guid><dc:creator><![CDATA[Stefan71242]]></dc:creator><pubDate>Fri, 12 Aug 2005 08:24:07 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 08:50:07 GMT]]></title><description><![CDATA[<p>LB_FIND klingt sehr nach WinAPI. IndexOf macht vermutlich nichts anderes, als diese Funktion aufzurufen...<br />
Deswegen liebe ich die VCL so, man kommt meist ohne die WinAPI aus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850607</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850607</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 12 Aug 2005 08:50:07 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 08:51:28 GMT]]></title><description><![CDATA[<blockquote>
<p>Deswegen liebe ich die VCL so, man kommt meist ohne die WinAPI aus.</p>
</blockquote>
<p><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="🙂"
    /> <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>...kann si aber fast immer wenns nötig ist einbinden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850611</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850611</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Fri, 12 Aug 2005 08:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 09:09:57 GMT]]></title><description><![CDATA[<p>Äh, einbinden ist mir schon klar (LB_FIND=xx)<br />
Aber es gibt doch bestimmt eine Möglichkeit z.B. mit include (?)<br />
die ganze API Variabeln einzubinden? Einzeln wäre ja wahnsinn..</p>
<p>Danke und Gruss Stefan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850628</guid><dc:creator><![CDATA[Stefan71242]]></dc:creator><pubDate>Fri, 12 Aug 2005 09:09:57 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 10:00:04 GMT]]></title><description><![CDATA[<p>Aus der Windows SDK-Hilfe:</p>
<blockquote>
<p>An application sends an LB_FINDSTRING message to find the first string in a list box that contains the specified prefix.</p>
<p>LB_FINDSTRING<br />
wParam = (WPARAM) indexStart; // item before start of search<br />
lParam = (LPARAM) (LPCTSTR) lpszFind; // search string address</p>
<p>Parameters</p>
<p>indexStart</p>
<p>Value of wParam. Specifies the zero-based index of the item before the first item to be searched. When the search reaches the bottom of the list box, it continues from the top of the list box back to the item specified by the indexStart parameter. If indexStart is -1, the entire list box is searched from the beginning.<br />
Windows 95: The wParam parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a listbox is limited only by available memory.</p>
<p>lpszFind</p>
<p>Value of lParam. Points to the null-terminated string that contains the prefix to search for. The search is case independent, so this string can contain any combination of uppercase and lowercase letters.</p>
<p>Return Values</p>
<p>The return value is the index of the matching item, or LB_ERR if the search was unsuccessful.</p>
<p>Remarks</p>
<p>If you create the list box with an owner-drawn style but without the LBS_HASSTRINGS style, this message returns the index of the item with a long value (supplied as the lParam parameter of the LB_ADDSTRING or LB_INSERTSTRING message) that matches the value supplied as the lpszFind parameter.</p>
</blockquote>
<p>Wenn Du das einfacher findest, als IndexOf zu verwenden...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850678</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 12 Aug 2005 10:00:04 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 10:06:57 GMT]]></title><description><![CDATA[<p>@Joe_M</p>
<p>Danke für Deine Antwort; ich Blödel habe ja LB_FIND statt LB_FINDSTRING<br />
geschrieben; kein Wunder das ich auch unter Google nix finden konnte.. ähem.</p>
<p>Allerdings benutze ich lieber API Funktionen; da diese wesentlich zeitloser<br />
sind als alle integrierten Funktionen von Programmiersprachen. Habe Programme<br />
von 1993, die heute noch auf allen Windows Versionen einwandfrei laufen!<br />
(unter Win95 A entwickelt). Warum? Weil ich fast alles mit API mache; nimmt<br />
man dagegen z.B. die C++ Funktionen weiss man nie was in der nächsten<br />
Funktion passiert (API sind wesentlich resistenter gegen Änderungen)<br />
Jedenfalls meine Erfahrung.</p>
<p>Gruss Stefan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850684</guid><dc:creator><![CDATA[Stefan71242]]></dc:creator><pubDate>Fri, 12 Aug 2005 10:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 11:06:06 GMT]]></title><description><![CDATA[<p>Dann stellt sich mir allerdings dir Frage, warum Du den BCB verwendest...<br />
Das ist das falsche Werkzeug für deine Wünsche. Sobald Du schon ein TForm verwendest, verläßt Du den API-Pfad...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850733</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850733</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 12 Aug 2005 11:06:06 GMT</pubDate></item><item><title><![CDATA[Reply to Sendmessage als Funktion unbekannt bzw. Listboxsuche nur mit Sendmessage? on Fri, 12 Aug 2005 11:11:38 GMT]]></title><description><![CDATA[<p>Zumal ich die Logik sowieso nicht verstehen, da die VCL auch nix anderes macht, als die WinAPI von Achtzehnhundertdazumal zu nutzen. Meine BCB-Programme laufen auch unt 95-XP.<br />
Und warum die WinAPI resistenter gegen änderungen ist als C++ verstehe ich schon mal gar nicht... du vergleichst da doch Äpfel mit Birnen... C++ ist die Programmiersprache und die hält sich an einen Standard.</p>
<p>Die WinAPI hingegen ist von der Gnade seiner Durchlaucht Eminenz Gates des Große abhängig (und wurde in C/C++ Programmiert <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/850741</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850741</guid><dc:creator><![CDATA[-**xXx**-]]></dc:creator><pubDate>Fri, 12 Aug 2005 11:11:38 GMT</pubDate></item></channel></rss>