<?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[Integer zu WideString umwandeln]]></title><description><![CDATA[<p>Hier ein Codeauszug<br />
Kompilierung --- ok<br />
Ausführen --- Fehler ( unhandle exception )</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
	static RECT rect;
	PAINTSTRUCT ps;
	HDC hdc = 0;
	long breite, hoehe;
	TCHAR* x = L&quot;Hallo&quot;;
	TCHAR* y = L&quot;Hello&quot;;

	switch (msg) {
		case WM_CREATE:

			return 0;

		case WM_SIZE:
			GetWindowRect(hWnd, &amp;rect);
			return 0;

		case WM_PAINT:
			hdc = BeginPaint(hWnd, &amp;ps);
			breite = rect.right - rect.left;
			hoehe = rect.bottom - rect.top;
			wsprintf(x, L&quot;Breite: &amp;d&quot;, breite);
			wsprintf(y, L&quot;Höhe: &amp;d&quot;, hoehe); //( Debug Cursor von VC++ 08 zeigt es hier an )
			TextOut(hdc, 300, 300, x, wcslen(x));
			TextOut(hdc, 300, 320, y, wcslen(y));
			EndPaint(hWnd, &amp;ps);
			return 0;

		case WM_DESTROY:
			PostQuitMessage(0);
			return 0;

		default:
			return DefWindowProc(hWnd, msg, wParam, lParam);
	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/223552/integer-zu-widestring-umwandeln</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 07:11:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/223552.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 Sep 2008 13:05:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Integer zu WideString umwandeln on Sat, 27 Sep 2008 13:07:37 GMT]]></title><description><![CDATA[<p>Hier ein Codeauszug<br />
Kompilierung --- ok<br />
Ausführen --- Fehler ( unhandle exception )</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
	static RECT rect;
	PAINTSTRUCT ps;
	HDC hdc = 0;
	long breite, hoehe;
	TCHAR* x = L&quot;Hallo&quot;;
	TCHAR* y = L&quot;Hello&quot;;

	switch (msg) {
		case WM_CREATE:

			return 0;

		case WM_SIZE:
			GetWindowRect(hWnd, &amp;rect);
			return 0;

		case WM_PAINT:
			hdc = BeginPaint(hWnd, &amp;ps);
			breite = rect.right - rect.left;
			hoehe = rect.bottom - rect.top;
			wsprintf(x, L&quot;Breite: &amp;d&quot;, breite);
			wsprintf(y, L&quot;Höhe: &amp;d&quot;, hoehe); //( Debug Cursor von VC++ 08 zeigt es hier an )
			TextOut(hdc, 300, 300, x, wcslen(x));
			TextOut(hdc, 300, 320, y, wcslen(y));
			EndPaint(hWnd, &amp;ps);
			return 0;

		case WM_DESTROY:
			PostQuitMessage(0);
			return 0;

		default:
			return DefWindowProc(hWnd, msg, wParam, lParam);
	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1589055</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1589055</guid><dc:creator><![CDATA[JnZn558]]></dc:creator><pubDate>Sat, 27 Sep 2008 13:07:37 GMT</pubDate></item><item><title><![CDATA[Reply to Integer zu WideString umwandeln on Sat, 27 Sep 2008 13:25:07 GMT]]></title><description><![CDATA[<p>1. Deine Speicher für die Zahlen sind ungültig.<br />
Du musst einen Aray zur Verfdügung stellen und keinen Zeiger auf eine Konstante.<br />
TCHAR x[20], y[20];</p>
<p>2. Weiterhin muss es in dem wsprintf %d heißen und nicht &amp;d</p>
<p>3. Wenn Du schon TCHAR verwendest dann kanst Du auch _tsprintf nutzen und den _T Makro für die Konstanten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1589066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1589066</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 27 Sep 2008 13:25:07 GMT</pubDate></item></channel></rss>