<?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[String zu LPARAM umwandeln]]></title><description><![CDATA[<p>Hallo, wie kann man denn einen String in LPARAM umwandeln? Bei dem folgendem Aufruf bekomme ich es nämlich nicht gebacken.</p>
<pre><code>string x = &quot;Hallo&quot;;
SendMessage(g_hListBox, LB_ADDSTRING, 0, (LPARAM)x);
</code></pre>
<p>So geht es dagegen:</p>
<pre><code>SendMessage(g_hListBox, LB_ADDSTRING, 0, (LPARAM)L&quot;Hallo&quot;);
</code></pre>
<p>Gruß</p>
<p>Student83</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/217684/string-zu-lparam-umwandeln</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 11:02:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/217684.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 Jul 2008 22:40:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Wed, 09 Jul 2008 22:40:41 GMT]]></title><description><![CDATA[<p>Hallo, wie kann man denn einen String in LPARAM umwandeln? Bei dem folgendem Aufruf bekomme ich es nämlich nicht gebacken.</p>
<pre><code>string x = &quot;Hallo&quot;;
SendMessage(g_hListBox, LB_ADDSTRING, 0, (LPARAM)x);
</code></pre>
<p>So geht es dagegen:</p>
<pre><code>SendMessage(g_hListBox, LB_ADDSTRING, 0, (LPARAM)L&quot;Hallo&quot;);
</code></pre>
<p>Gruß</p>
<p>Student83</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544630</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Wed, 09 Jul 2008 22:40:41 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Wed, 09 Jul 2008 22:45:37 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">string x = &quot;Hallo&quot;;
SendMessage(g_hListBox, LB_ADDSTRING, 0, (LPARAM)x.c_str());
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1544632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544632</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 09 Jul 2008 22:45:37 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Wed, 09 Jul 2008 23:33:46 GMT]]></title><description><![CDATA[<p>Leider kommt da immer noch Chinesisch bei raus. Das liegt wohl daran, dass es Unicode sein muss?</p>
<pre><code>int iKey[64];
	string sKey;

	for (int i=0;i&lt;64;i++)
	{
		iKey[i]=rand();
	    //Hier muss noch der Integerwert in den String (oder  
        //was auch immer) kopiert werden.
    }

	SendMessage(g_hListBox, LB_ADDSTRING, 0, (LPARAM)sKey);
</code></pre>
<p>Vielleicht ist String doch nicht das optimale? Vielleicht wchar_t?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544642</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544642</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Wed, 09 Jul 2008 23:33:46 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Thu, 10 Jul 2008 07:09:41 GMT]]></title><description><![CDATA[<p>Dann nimm doch std::wstring.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544717</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Thu, 10 Jul 2008 07:09:41 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Thu, 10 Jul 2008 11:15:12 GMT]]></title><description><![CDATA[<p>Ok, und wie kann ich jetzt den einzelnen Zeichen des wstring Integer-Werte zuordnen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544915</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Thu, 10 Jul 2008 11:15:12 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Thu, 10 Jul 2008 11:37:26 GMT]]></title><description><![CDATA[<p>Kommt drauf an, wie du dir das Ergebnis vorstellst...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544938</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544938</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Thu, 10 Jul 2008 11:37:26 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Thu, 10 Jul 2008 11:50:42 GMT]]></title><description><![CDATA[<p>Mittlerweile bin ich mir unsicher wie ich das überhaupt programmieren soll. Ich habe vor eine Funktion zu schreiben in der ein Passwort aus ASCII Zeichen generiert wird. Dieses Passwort soll dann von der Funktion in einer Zeichenkette zurückgegeben werden. Die zurückgegebene Zeichenkette wird dann von einer anderen Funktion mit SendMessage(...) an eine ListBox ausgegeben. Ich habe allerdings keine Ahnung welche Datentypen ich verwenden soll. Mit Unicode und Strings kenne ich mich noch nicht so gut aus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544954</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544954</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Thu, 10 Jul 2008 11:50:42 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Thu, 10 Jul 2008 12:00:51 GMT]]></title><description><![CDATA[<p>Wenns nur um (alle) ASCII Zeichen geht musst kannst du den Rückgabewert von rand() in den Bereich 0-127 bringen.</p>
<pre><code class="language-cpp">std::wstring str;
str.reserve( 64 );

for ( int i = 0; i &lt; 64; ++i )
{
    str += random( 0, 127 ); // deine randomfunktion
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1544971</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544971</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Thu, 10 Jul 2008 12:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to String zu LPARAM umwandeln on Thu, 10 Jul 2008 12:11:05 GMT]]></title><description><![CDATA[<p>Danke, so funktioniert es.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544984</guid><dc:creator><![CDATA[Student83]]></dc:creator><pubDate>Thu, 10 Jul 2008 12:11:05 GMT</pubDate></item></channel></rss>