<?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[SetWindowPos wirft Assertion ??]]></title><description><![CDATA[<p>Ich bekomme in einem CStatic Control indem ich ein SetWindowPos aufrufe</p>
<pre><code>void CGraphCtrl::Resize(const long width, const long height)
{	
	SetWindowPos(NULL, 0, 0, width, height, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
}
</code></pre>
<p>eine Fehlermeldung an folgender Stelle</p>
<pre><code>BOOL CWnd::SetWindowPos(const CWnd* pWndInsertAfter, int x, int y, int cx,
	int cy, UINT nFlags)
{
	ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));
</code></pre>
<p>Anscheint weil m_hWnd==NULL ist. Die gleiche Assertion wird dann an weiteren Stellen noch ein paar mal in anderen Aufrufen geworfen.</p>
<p>Exact der gleiche Quellcode funktioniert aber in diversen anderen Projekten.</p>
<p>Was läuft das falsch ?</p>
<p>Matthias</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192691/setwindowpos-wirft-assertion</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 15:21:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192691.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Sep 2007 15:07:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SetWindowPos wirft Assertion ?? on Mon, 17 Sep 2007 15:07:42 GMT]]></title><description><![CDATA[<p>Ich bekomme in einem CStatic Control indem ich ein SetWindowPos aufrufe</p>
<pre><code>void CGraphCtrl::Resize(const long width, const long height)
{	
	SetWindowPos(NULL, 0, 0, width, height, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
}
</code></pre>
<p>eine Fehlermeldung an folgender Stelle</p>
<pre><code>BOOL CWnd::SetWindowPos(const CWnd* pWndInsertAfter, int x, int y, int cx,
	int cy, UINT nFlags)
{
	ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));
</code></pre>
<p>Anscheint weil m_hWnd==NULL ist. Die gleiche Assertion wird dann an weiteren Stellen noch ein paar mal in anderen Aufrufen geworfen.</p>
<p>Exact der gleiche Quellcode funktioniert aber in diversen anderen Projekten.</p>
<p>Was läuft das falsch ?</p>
<p>Matthias</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1367078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1367078</guid><dc:creator><![CDATA[pospiech]]></dc:creator><pubDate>Mon, 17 Sep 2007 15:07:42 GMT</pubDate></item><item><title><![CDATA[Reply to SetWindowPos wirft Assertion ?? on Mon, 17 Sep 2007 15:26:55 GMT]]></title><description><![CDATA[<p>Das Objekt ist zwar als Instanz existent, aber es existiert eben kein Fenster, bzw. DU hast kein Fenster an diese Objekt gebunden (SubclassWindow) oder eben kein Fenster erzeugt (Create´).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1367090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1367090</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 17 Sep 2007 15:26:55 GMT</pubDate></item><item><title><![CDATA[Reply to SetWindowPos wirft Assertion ?? on Mon, 17 Sep 2007 15:38:21 GMT]]></title><description><![CDATA[<p>Das Fenster ist der Dialog der Applikation und die Funktion wird in OnInitdialog aufgerufen nachdem der Dialog Initialisiert wurde.</p>
<p>Ich sehe daher nicht warum das Objekt noch nicht initialisiert sein sollte.</p>
<p>Matthias</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1367101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1367101</guid><dc:creator><![CDATA[pospiech]]></dc:creator><pubDate>Mon, 17 Sep 2007 15:38:21 GMT</pubDate></item><item><title><![CDATA[Reply to SetWindowPos wirft Assertion ?? on Mon, 17 Sep 2007 15:49:36 GMT]]></title><description><![CDATA[<p>Du meinst Du hast eine Member-Variable in Deinem Dialog.<br />
Wenn dem so ist, dann gibt es folgendes:<br />
1. CDialog::OnInitDialog wurde nicht aufgerufen und damit kein Subclass durchgeführt.<br />
2. Du hast Dein Control in dem Dialog nicht an die Member-Variable gebunden (DDX-COntrol fehlt in DoDataExchange).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1367107</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1367107</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 17 Sep 2007 15:49:36 GMT</pubDate></item></channel></rss>