<?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[GetWindowText   wchar to double und zurück]]></title><description><![CDATA[<pre><code class="language-cpp">case ID_SHOW1:
		TCHAR* clamda1;
		char* buf;
		wchar_t* wbuf;

		clamda1=new TCHAR[GetWindowTextLength(hLamda1)+1];
		buf=new char[GetWindowTextLength(hLamda1)+1];
		wbuf=new wchar_t[GetWindowTextLength(hLamda1)+1];

		GetWindowText(hLamda1,clamda1,GetWindowTextLength(hLamda1)+1);

		lamda1=wcstod(clamda1,NULL);     //wchar in double umwandeln

		lamda1*=10; //irgend was sickes berechnen

		sprintf(buf,&quot;%f&quot;,lamda1);        //double in char umwandeln

 		for(int i=0;i&lt;=(GetWindowTextLength(hLamda1)-1);i++)   //char in wchar umwandeln
		       wbuf[i]=buf[i];	

		wbuf[GetWindowTextLength(hLamda1)]='\0';

                SetWindowText(hWnd,wbuf);
		break;
</code></pre>
<p>Geht das kürzer, wenn die richtige double to wchar Funktion ( _esvct() oder sowas) irgend nen Fehler in ner Debugger Hook *.h Datei hervorruft und man es dadurch also nicht verwenden kann?? Weil das scheint mir doch irgendwie umständlich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /> Wie wandelt man dennn allgemein einen Datentyp in nen andern um, irgendwie was hin- und hershiften oder so vllt? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190189/getwindowtext-wchar-to-double-und-zurück</link><generator>RSS for Node</generator><lastBuildDate>Thu, 02 Jul 2026 06:13:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190189.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Aug 2007 14:24:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetWindowText   wchar to double und zurück on Mon, 20 Aug 2007 14:47:16 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">case ID_SHOW1:
		TCHAR* clamda1;
		char* buf;
		wchar_t* wbuf;

		clamda1=new TCHAR[GetWindowTextLength(hLamda1)+1];
		buf=new char[GetWindowTextLength(hLamda1)+1];
		wbuf=new wchar_t[GetWindowTextLength(hLamda1)+1];

		GetWindowText(hLamda1,clamda1,GetWindowTextLength(hLamda1)+1);

		lamda1=wcstod(clamda1,NULL);     //wchar in double umwandeln

		lamda1*=10; //irgend was sickes berechnen

		sprintf(buf,&quot;%f&quot;,lamda1);        //double in char umwandeln

 		for(int i=0;i&lt;=(GetWindowTextLength(hLamda1)-1);i++)   //char in wchar umwandeln
		       wbuf[i]=buf[i];	

		wbuf[GetWindowTextLength(hLamda1)]='\0';

                SetWindowText(hWnd,wbuf);
		break;
</code></pre>
<p>Geht das kürzer, wenn die richtige double to wchar Funktion ( _esvct() oder sowas) irgend nen Fehler in ner Debugger Hook *.h Datei hervorruft und man es dadurch also nicht verwenden kann?? Weil das scheint mir doch irgendwie umständlich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /> Wie wandelt man dennn allgemein einen Datentyp in nen andern um, irgendwie was hin- und hershiften oder so vllt? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348348</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348348</guid><dc:creator><![CDATA[MasterCounter]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:47:16 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowText   wchar to double und zurück on Mon, 20 Aug 2007 14:44:41 GMT]]></title><description><![CDATA[<p>einfach einen TCHAR Piffer verwenden und _stprintf verwenden.</p>
<p>Die Art und Weise wie Du hier char to wchar_t umwandelst ist falsch! Verwende mbtowc, oder noch besser entsprechende T2A A2T A2W Makros.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348366</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348366</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:44:41 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowText   wchar to double und zurück on Mon, 20 Aug 2007 14:48:16 GMT]]></title><description><![CDATA[<p>wchar_t ist ein unsigned short (16bit)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348371</guid><dc:creator><![CDATA[orr lol]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:48:16 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowText   wchar to double und zurück on Mon, 20 Aug 2007 14:57:01 GMT]]></title><description><![CDATA[<p>Klingt gut, weil dass das so nicht richtig is, war mir irgendwie klar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /><br />
Aber was ist ein Piffer?</p>
<p>Edit: Habs jetzt:</p>
<pre><code class="language-cpp">_stprintf(buf,TEXT(&quot;%f&quot;),lamda1); //buf is TCHAR und lamda1 is double
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1348372</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348372</guid><dc:creator><![CDATA[MasterCounter]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:57:01 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowText   wchar to double und zurück on Mon, 20 Aug 2007 15:59:07 GMT]]></title><description><![CDATA[<p>Puffer <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="😃"
    /> Sorry i und u liegen für meine Griffel manchmal zu nahe beieinander...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348421</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348421</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 20 Aug 2007 15:59:07 GMT</pubDate></item></channel></rss>