<?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[RegisterClassEx]]></title><description><![CDATA[<pre><code class="language-cpp">int WINAPI WinMain(::HINSTANCE__* instance, ::HINSTANCE__* prevInstance, char* cmdLine, int cmdShow)
{	
	::WNDCLASSEX	wndClass;
	::HWND__*		hwnd;
	::MSG			message;

		// Alle Objekte initialisieren
	::ZeroMemory(&amp;message,		sizeof(::WNDCLASSEX));
	::ZeroMemory(&amp;hwnd,			sizeof(::HWND__*));
	::ZeroMemory(&amp;message,		sizeof(::MSG));

		// WNDCLASSEX initialisieren
	wndClass.cbSize				= sizeof(WNDCLASSEX);
	wndClass.style				= CS_VREDRAW | CS_HREDRAW;
	wndClass.lpfnWndProc		= wndProc;
	wndClass.hInstance			= instance;
	wndClass.hIcon				= ::LoadIcon(nhNULL, IDI_APPLICATION);
	wndClass.hIconSm			= ::LoadIcon(nhNULL, IDI_APPLICATION);
	wndClass.hCursor			= ::LoadCursor(nhNULL, IDC_ARROW);
	wndClass.hbrBackground		= static_cast&lt;::HBRUSH__*&gt;(::GetStockObject(0));
	wndClass.lpszClassName		= window::name;

		// Fenster registrieren
	if(!::RegisterClassEx(&amp;wndClass))
	{
		::MessageBoxW(nhNULL, L&quot;Programm nutzt Unicode und setzt WIndows NT voraus&quot;,
					  window::name, MB_ICONERROR);

		return 0;
	}

...
</code></pre>
<p>Warum kann der die Fensterklasse nicht registrieren? Bei mir gibt er die ErrorMessage aus. Ich nutze aber windows XP.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160763/registerclassex</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 15:46:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160763.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Sep 2006 06:43:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegisterClassEx on Fri, 29 Sep 2006 06:43:27 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int WINAPI WinMain(::HINSTANCE__* instance, ::HINSTANCE__* prevInstance, char* cmdLine, int cmdShow)
{	
	::WNDCLASSEX	wndClass;
	::HWND__*		hwnd;
	::MSG			message;

		// Alle Objekte initialisieren
	::ZeroMemory(&amp;message,		sizeof(::WNDCLASSEX));
	::ZeroMemory(&amp;hwnd,			sizeof(::HWND__*));
	::ZeroMemory(&amp;message,		sizeof(::MSG));

		// WNDCLASSEX initialisieren
	wndClass.cbSize				= sizeof(WNDCLASSEX);
	wndClass.style				= CS_VREDRAW | CS_HREDRAW;
	wndClass.lpfnWndProc		= wndProc;
	wndClass.hInstance			= instance;
	wndClass.hIcon				= ::LoadIcon(nhNULL, IDI_APPLICATION);
	wndClass.hIconSm			= ::LoadIcon(nhNULL, IDI_APPLICATION);
	wndClass.hCursor			= ::LoadCursor(nhNULL, IDC_ARROW);
	wndClass.hbrBackground		= static_cast&lt;::HBRUSH__*&gt;(::GetStockObject(0));
	wndClass.lpszClassName		= window::name;

		// Fenster registrieren
	if(!::RegisterClassEx(&amp;wndClass))
	{
		::MessageBoxW(nhNULL, L&quot;Programm nutzt Unicode und setzt WIndows NT voraus&quot;,
					  window::name, MB_ICONERROR);

		return 0;
	}

...
</code></pre>
<p>Warum kann der die Fensterklasse nicht registrieren? Bei mir gibt er die ErrorMessage aus. Ich nutze aber windows XP.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146307</guid><dc:creator><![CDATA[tuikghlhl]]></dc:creator><pubDate>Fri, 29 Sep 2006 06:43:27 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterClassEx on Fri, 29 Sep 2006 06:50:09 GMT]]></title><description><![CDATA[<p>tuikghlhl schrieb:</p>
<blockquote>
<p>Bei mir gibt er die ErrorMessage aus. Ich nutze aber windows XP.</p>
</blockquote>
<p>Wenn RegisterClassEx fehlschlägt, kann das auch andere Ursachen haben. Was sagt denn GetLastError?</p>
<p>P.S.:<br />
Kann es sein, dass du Doppeldoppelpunktitis hast?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146310</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146310</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Fri, 29 Sep 2006 06:50:09 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterClassEx on Fri, 29 Sep 2006 07:39:31 GMT]]></title><description><![CDATA[<p>WNDCLASSEX hat 12 Member, du initialisiert nur 9.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146331</guid><dc:creator><![CDATA[::]]></dc:creator><pubDate>Fri, 29 Sep 2006 07:39:31 GMT</pubDate></item><item><title><![CDATA[Reply to RegisterClassEx on Fri, 29 Sep 2006 07:53:35 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">::WNDCLASSEX    wndClass;
    ::HWND__*        hwnd;
    ::MSG            message;

        // Alle Objekte initialisieren
    ::ZeroMemory(&amp;message,       sizeof(::WNDCLASSEX));  // &lt;--- ???
    ::ZeroMemory(&amp;hwnd,          sizeof(::HWND__*));
    ::ZeroMemory(&amp;message,       sizeof(::MSG));
</code></pre>
<p>Meinst Du nicht</p>
<pre><code class="language-cpp">::ZeroMemory(&amp;wndClass,      sizeof(::WNDCLASSEX));
</code></pre>
<p>?<br />
Dann sollten auch die fehlenden Member verziehen werden, initialisier sie trotzdem besser mit NULL.</p>
<pre><code class="language-cpp">WNDCLASSEX wcx; 

    // Fill in the window class structure with parameters 
    // that describe the main window. 

    wcx.cbSize = sizeof(wcx);          // size of structure 
    wcx.style = CS_HREDRAW | 
        CS_VREDRAW;                    // redraw if size changes 
    wcx.lpfnWndProc = MainWndProc;     // points to window procedure 
    wcx.cbClsExtra = 0;                // no extra class memory 
    wcx.cbWndExtra = 0;                // no extra window memory 
    wcx.hInstance = hinstance;         // handle to instance 
    wcx.hIcon = LoadIcon(NULL, 
        IDI_APPLICATION);              // predefined app. icon 
    wcx.hCursor = LoadCursor(NULL, 
        IDC_ARROW);                    // predefined arrow 
    wcx.hbrBackground = GetStockObject( 
        WHITE_BRUSH);                  // white background brush 
    wcx.lpszMenuName =  &quot;MainMenu&quot;;    // name of menu resource 
    wcx.lpszClassName = &quot;MainWClass&quot;;  // name of window class 
    wcx.hIconSm = LoadImage(hinstance, // small class icon 
        MAKEINTRESOURCE(5),
        IMAGE_ICON, 
        GetSystemMetrics(SM_CXSMICON), 
        GetSystemMetrics(SM_CYSMICON), 
        LR_DEFAULTCOLOR);
</code></pre>
<p>Quelle: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windowclasses/usingwindow.asp" rel="nofollow">MSDN</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146343</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146343</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Fri, 29 Sep 2006 07:53:35 GMT</pubDate></item></channel></rss>