<?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[Mal wieder eine wrapper-klasse]]></title><description><![CDATA[<p>Hallo Gruppe!</p>
<p>Ich versuche mal wieder Win-Api-Calls in C++-Klassen zu kapseln, allerdings 'benimmt' sich mein Test-Programm nicht so, wie es soll. Genauer:</p>
<pre><code class="language-cpp">void WndBase::createWnd(HWND hWndParent, TCHAR *clsName, int style, int x, int y, int w, int h,
						TCHAR *wndName, int exStyle, HMENU hMenu)
{
#ifdef _DEBUG
	if ( !g_hInst )
		throw ErrWin(1, TEXT(&quot;WndBase::createWnd (%s) -&gt; no g_hInst defined!&quot;), clsName);

	//DEBUG
///////////////////
///////////////////
// Diese Msg-Box zeigt keinen Text an ... ?!
///////////////////
///////////////////
	DB_MSG(&quot;WndBase::createWindowEx(exStyle(%x), clsName('%s'), wndName('%s'), style(%x),&quot;
		&quot;x(%d), y(%d), w(%d), h(%d), hWndParent(%x), hMenu(%x), hInst(%x)&quot;,
		exStyle, clsName, wndName, style, x, y, w, h, hWndParent, hMenu, g_hInst);
#endif

/*
	m_hWnd = ::CreateWindowEx(exStyle, clsName, wndName, style, x, y, w, h,
		hWndParent, hMenu, g_hInst, this);
*/

	/////////////////////
	/////////////////////
	// ...und hier fehlt der Fenster-Titel
	/////////////////////
	/////////////////////

	m_hWnd = ::CreateWindowEx(exStyle, clsName, TEXT(&quot;test&quot;), style, x, y, w, h,
		hWndParent, hMenu, g_hInst, this);

	if ( !m_hWnd )
		throw ErrWin(2, TEXT(&quot;WndBase::createWnd (%s) -&gt; CreateWindowEx failed.&quot;), clsName);

}
</code></pre>
<p>Leider tappe ich hier völlig im dunkeln, und der Fehler ist wohlmöglich an einer ganz anderen Stelle, daher habe ich den kompletten Source (VC++ - Projekt) mal online gestellt:</p>
<p><a href="http://home.arcor.de/fonebone/wrap/" rel="nofollow">http://home.arcor.de/fonebone/wrap/</a></p>
<p>Gruß,<br />
FB</p>
<p>p.s. Sorry, ich kann leider das Problem nicht besser beschreiben, bzw enger eingrenzen...</p>
<p>p.p.s was mache ich bei der Code-Formatierung falsch?!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/67978/mal-wieder-eine-wrapper-klasse</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 15:25:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/67978.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Mar 2004 15:23:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mal wieder eine wrapper-klasse on Sat, 13 Mar 2004 15:23:12 GMT]]></title><description><![CDATA[<p>Hallo Gruppe!</p>
<p>Ich versuche mal wieder Win-Api-Calls in C++-Klassen zu kapseln, allerdings 'benimmt' sich mein Test-Programm nicht so, wie es soll. Genauer:</p>
<pre><code class="language-cpp">void WndBase::createWnd(HWND hWndParent, TCHAR *clsName, int style, int x, int y, int w, int h,
						TCHAR *wndName, int exStyle, HMENU hMenu)
{
#ifdef _DEBUG
	if ( !g_hInst )
		throw ErrWin(1, TEXT(&quot;WndBase::createWnd (%s) -&gt; no g_hInst defined!&quot;), clsName);

	//DEBUG
///////////////////
///////////////////
// Diese Msg-Box zeigt keinen Text an ... ?!
///////////////////
///////////////////
	DB_MSG(&quot;WndBase::createWindowEx(exStyle(%x), clsName('%s'), wndName('%s'), style(%x),&quot;
		&quot;x(%d), y(%d), w(%d), h(%d), hWndParent(%x), hMenu(%x), hInst(%x)&quot;,
		exStyle, clsName, wndName, style, x, y, w, h, hWndParent, hMenu, g_hInst);
#endif

/*
	m_hWnd = ::CreateWindowEx(exStyle, clsName, wndName, style, x, y, w, h,
		hWndParent, hMenu, g_hInst, this);
*/

	/////////////////////
	/////////////////////
	// ...und hier fehlt der Fenster-Titel
	/////////////////////
	/////////////////////

	m_hWnd = ::CreateWindowEx(exStyle, clsName, TEXT(&quot;test&quot;), style, x, y, w, h,
		hWndParent, hMenu, g_hInst, this);

	if ( !m_hWnd )
		throw ErrWin(2, TEXT(&quot;WndBase::createWnd (%s) -&gt; CreateWindowEx failed.&quot;), clsName);

}
</code></pre>
<p>Leider tappe ich hier völlig im dunkeln, und der Fehler ist wohlmöglich an einer ganz anderen Stelle, daher habe ich den kompletten Source (VC++ - Projekt) mal online gestellt:</p>
<p><a href="http://home.arcor.de/fonebone/wrap/" rel="nofollow">http://home.arcor.de/fonebone/wrap/</a></p>
<p>Gruß,<br />
FB</p>
<p>p.s. Sorry, ich kann leider das Problem nicht besser beschreiben, bzw enger eingrenzen...</p>
<p>p.p.s was mache ich bei der Code-Formatierung falsch?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/479636</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/479636</guid><dc:creator><![CDATA[FoneBone]]></dc:creator><pubDate>Sat, 13 Mar 2004 15:23:12 GMT</pubDate></item><item><title><![CDATA[Reply to Mal wieder eine wrapper-klasse on Mon, 15 Mar 2004 19:33:50 GMT]]></title><description><![CDATA[<p>noch eine Frage: Beim 'im-dunkeln-Herumstochern' ist mir aufgefallen, dass sich die im Debuger bzw, in Spy++ angezeigten Adressen für die wndProc unterscheiden (also nicht gleich sind). Den gleichen Effekt habe ich aber auch bei einer vom 'VC++-Assistenten' erstellten 'Standard-Win32-Anwendung'. Trotzdem frage ich mich, ob das seine Ordung hat und warum das so ist?!</p>
<p>Gruß,<br />
FB</p>
]]></description><link>https://www.c-plusplus.net/forum/post/481259</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/481259</guid><dc:creator><![CDATA[FoneBone]]></dc:creator><pubDate>Mon, 15 Mar 2004 19:33:50 GMT</pubDate></item></channel></rss>