<?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[Problem bei CWnd Objekt und CDC... absturtz hilfe!!!??]]></title><description><![CDATA[<p>Mein Programm stürtzt ab wenn ich mein dialog Schliesse, welches dee folgende Graik CWnd Objekt enhält! Kann mir jemand helfen... irgendwie hat es was mit dem CDC zu tun ... wenn ich das Dilaog schliesse wird nichmal der destrukter des dialogs aufgerufenm in dem das CWnd objekt gelsöcht wird...</p>
<p>Habe Grafik- Klasse (CWnd) Objekt mit in dem ich meine Grafik mal:</p>
<pre><code class="language-cpp">class CWorkflowGraphic : public CWnd{

public:
	CMyVisDiagramm *m_Graphic;
	CWorkflow *m_Workflow;

	CWorkflowGraphic(CWnd *m_Hw,CRect &amp;m_rc,CWorkflow *m) : CWnd(){

		m_Workflow=m;
	   Create(_T(&quot;STATIC&quot;), &quot;Hi&quot;, WS_CHILD | WS_VISIBLE,m_rc, m_Hw, 1234);

            //Grafik erzeugen und dne CDC des CWnd verwenden!
	   m_Graphic= new CMyVisDiagramm(this-&gt;GetWindowDC(),	
				CPoint(1,1),
				m_rc.right-m_rc.left-1,
				m_rc.bottom-m_rc.top-1);

	   m_Graphic-&gt;getData(m_Workflow);
	}

	virtual ~CWorkflowGraphic(){ 
		if(m_Graphic)
			delete m_Graphic; 
	}

	//void Invalidate();

	inline CMyVisDiagramm* getGraphic(){
		return m_Graphic;
	}
	//inline virtual BOOL Create() : Create( 

};
</code></pre>
<p>Hier strützt das Programm ab:</p>
<pre><code class="language-cpp">BOOL CGdiObject::DeleteObject()
{
	if (m_hObject == NULL)
		return FALSE;
	return ::DeleteObject(Detach());
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/167029/problem-bei-cwnd-objekt-und-cdc-absturtz-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 21:44:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/167029.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Dec 2006 19:04:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem bei CWnd Objekt und CDC... absturtz hilfe!!!?? on Tue, 05 Dec 2006 19:04:11 GMT]]></title><description><![CDATA[<p>Mein Programm stürtzt ab wenn ich mein dialog Schliesse, welches dee folgende Graik CWnd Objekt enhält! Kann mir jemand helfen... irgendwie hat es was mit dem CDC zu tun ... wenn ich das Dilaog schliesse wird nichmal der destrukter des dialogs aufgerufenm in dem das CWnd objekt gelsöcht wird...</p>
<p>Habe Grafik- Klasse (CWnd) Objekt mit in dem ich meine Grafik mal:</p>
<pre><code class="language-cpp">class CWorkflowGraphic : public CWnd{

public:
	CMyVisDiagramm *m_Graphic;
	CWorkflow *m_Workflow;

	CWorkflowGraphic(CWnd *m_Hw,CRect &amp;m_rc,CWorkflow *m) : CWnd(){

		m_Workflow=m;
	   Create(_T(&quot;STATIC&quot;), &quot;Hi&quot;, WS_CHILD | WS_VISIBLE,m_rc, m_Hw, 1234);

            //Grafik erzeugen und dne CDC des CWnd verwenden!
	   m_Graphic= new CMyVisDiagramm(this-&gt;GetWindowDC(),	
				CPoint(1,1),
				m_rc.right-m_rc.left-1,
				m_rc.bottom-m_rc.top-1);

	   m_Graphic-&gt;getData(m_Workflow);
	}

	virtual ~CWorkflowGraphic(){ 
		if(m_Graphic)
			delete m_Graphic; 
	}

	//void Invalidate();

	inline CMyVisDiagramm* getGraphic(){
		return m_Graphic;
	}
	//inline virtual BOOL Create() : Create( 

};
</code></pre>
<p>Hier strützt das Programm ab:</p>
<pre><code class="language-cpp">BOOL CGdiObject::DeleteObject()
{
	if (m_hObject == NULL)
		return FALSE;
	return ::DeleteObject(Detach());
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1187495</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1187495</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Tue, 05 Dec 2006 19:04:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei CWnd Objekt und CDC... absturtz hilfe!!!?? on Tue, 05 Dec 2006 19:34:13 GMT]]></title><description><![CDATA[<p>ich habs hingekriegt... juhuuu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1187515</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1187515</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Tue, 05 Dec 2006 19:34:13 GMT</pubDate></item></channel></rss>