<?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[Titel des Windows wird nicht korrekt angezeigt trotz ASCII]]></title><description><![CDATA[<p>Ich benutze die *A Funktionen der Win32 API da ich nur mit ASCII Symbole arbeiten will. Trotzdem wird den Caption des Windows mit Quadratchen gezeigt.</p>
<p>Mein Code:</p>
<pre><code class="language-cpp">class window {

		HINSTANCE hInstance_;
		HWND hWnd_;
		std::string classname_, caption_;

/*...*/
		window(HINSTANCE hi, const char* cn, const char* cap, WNDPROC pf);
/*...*/}
</code></pre>
<pre><code class="language-cpp">window::window(HINSTANCE hi, const char* cn, const char* cap, WNDPROC pf)
:hInstance_(hi), hWnd_(0), classname_(cn), caption_(cap) {
	WNDCLASSA wndclass;
	wndclass.style         = CS_HREDRAW | CS_VREDRAW;
	wndclass.lpfnWndProc   = pf;
	wndclass.cbClsExtra    = 0;
	wndclass.cbWndExtra    = 0;
	wndclass.hInstance     = hInstance_;
	wndclass.hIcon         = LoadIcon(0, IDI_APPLICATION);
	wndclass.hCursor       = LoadCursor(0, IDC_ARROW);
	wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
	wndclass.lpszMenuName  = 0;
	wndclass.lpszClassName = classname_.c_str();
	if (!RegisterClassA(&amp;wndclass)) {
		/*...*/
		return;
	}
	hWnd_ = CreateWindowA(classname_.c_str(),	// window class name
						caption_.c_str(),		// window caption
						WS_OVERLAPPEDWINDOW,	// window style
						0,						// initial x position
						0,						// initial y position
						CW_USEDEFAULT,			// initial x size
						CW_USEDEFAULT,			// initial y size
						0,						// parent window handle
						0,						// window menu handle
						hInstance_,				// program instance handle
						0);						// creation parameters
	if (!hWnd_) {
		/*...*/
		return;
	}
}
</code></pre>
<p>Woran liegt das Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/182389/titel-des-windows-wird-nicht-korrekt-angezeigt-trotz-ascii</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 14:50:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/182389.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 May 2007 14:57:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Thu, 24 May 2007 14:57:03 GMT]]></title><description><![CDATA[<p>Ich benutze die *A Funktionen der Win32 API da ich nur mit ASCII Symbole arbeiten will. Trotzdem wird den Caption des Windows mit Quadratchen gezeigt.</p>
<p>Mein Code:</p>
<pre><code class="language-cpp">class window {

		HINSTANCE hInstance_;
		HWND hWnd_;
		std::string classname_, caption_;

/*...*/
		window(HINSTANCE hi, const char* cn, const char* cap, WNDPROC pf);
/*...*/}
</code></pre>
<pre><code class="language-cpp">window::window(HINSTANCE hi, const char* cn, const char* cap, WNDPROC pf)
:hInstance_(hi), hWnd_(0), classname_(cn), caption_(cap) {
	WNDCLASSA wndclass;
	wndclass.style         = CS_HREDRAW | CS_VREDRAW;
	wndclass.lpfnWndProc   = pf;
	wndclass.cbClsExtra    = 0;
	wndclass.cbWndExtra    = 0;
	wndclass.hInstance     = hInstance_;
	wndclass.hIcon         = LoadIcon(0, IDI_APPLICATION);
	wndclass.hCursor       = LoadCursor(0, IDC_ARROW);
	wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
	wndclass.lpszMenuName  = 0;
	wndclass.lpszClassName = classname_.c_str();
	if (!RegisterClassA(&amp;wndclass)) {
		/*...*/
		return;
	}
	hWnd_ = CreateWindowA(classname_.c_str(),	// window class name
						caption_.c_str(),		// window caption
						WS_OVERLAPPEDWINDOW,	// window style
						0,						// initial x position
						0,						// initial y position
						CW_USEDEFAULT,			// initial x size
						CW_USEDEFAULT,			// initial y size
						0,						// parent window handle
						0,						// window menu handle
						hInstance_,				// program instance handle
						0);						// creation parameters
	if (!hWnd_) {
		/*...*/
		return;
	}
}
</code></pre>
<p>Woran liegt das Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1291468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1291468</guid><dc:creator><![CDATA[khalderon]]></dc:creator><pubDate>Thu, 24 May 2007 14:57:03 GMT</pubDate></item><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Thu, 24 May 2007 15:05:14 GMT]]></title><description><![CDATA[<p>Was für einen Wert übergibst du denn als 'cap' an den Ctor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1291477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1291477</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 24 May 2007 15:05:14 GMT</pubDate></item><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Thu, 24 May 2007 15:06:11 GMT]]></title><description><![CDATA[<p>&quot;MainWindow&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1291479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1291479</guid><dc:creator><![CDATA[khalderon]]></dc:creator><pubDate>Thu, 24 May 2007 15:06:11 GMT</pubDate></item><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Fri, 25 May 2007 07:47:14 GMT]]></title><description><![CDATA[<p>Und was kommt am anderen Ende raus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1291970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1291970</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 25 May 2007 07:47:14 GMT</pubDate></item><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Fri, 25 May 2007 12:25:29 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>Und was kommt am anderen Ende raus?</p>
</blockquote>
<p>Etwas wie kleine Quadraten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292198</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292198</guid><dc:creator><![CDATA[khalderon]]></dc:creator><pubDate>Fri, 25 May 2007 12:25:29 GMT</pubDate></item><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Fri, 25 May 2007 17:45:22 GMT]]></title><description><![CDATA[<p>Die Sachen werden noch mysteriöser. Ich habe auf die C++ Strings verzichtet und reine &quot;const char*&quot; benutzt. Trotzdem bleibt den Titel beschissen:<br />
<a href="http://tinypic.com/view.php?pic=4kcq3w7" rel="nofollow">http://tinypic.com/view.php?pic=4kcq3w7</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292376</guid><dc:creator><![CDATA[khalderon]]></dc:creator><pubDate>Fri, 25 May 2007 17:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to Titel des Windows wird nicht korrekt angezeigt trotz ASCII on Fri, 25 May 2007 17:47:26 GMT]]></title><description><![CDATA[<p>Ich habe endlich die Lösung gefunden!<br />
Man muss einfach in die Einstellungen des VC++ nach &quot;Character Set&quot; suchen und dies zu &quot;Not set&quot; einstellen!<br />
Dann hat es geklappt!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292378</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292378</guid><dc:creator><![CDATA[khalderon]]></dc:creator><pubDate>Fri, 25 May 2007 17:47:26 GMT</pubDate></item></channel></rss>