<?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[Validate und Invalidate (leicht)]]></title><description><![CDATA[<p>Mein Programm funktioniert bis auf ein sehr Interessantes Detail.</p>
<p>Viele haben sich sicher schon in manchen WIN32 gefragt:<br />
Kann man das häßliche mitverschieben des Fensterinhaltes beim Fensterziehen verhindern ?<br />
JA, ich verwende ein SetBackgroundBlack mit <strong>FLAG_avoidflicker</strong>.</p>
<p>Doch damit funktioniert das Present() in OnRender manchmal nicht mehr.</p>
<p>Es liegt garantiert an den Kontrollanweisungen Validate() und Invalidate().</p>
<p>Aber wie funktionieren diese, wo sollten sie stehen, oder besser wie Löse ich das Problem ?</p>
<pre><code class="language-cpp">//  ONTIMER
void CoreApp::OnTimer()
{	
	//  Was genau fehlt ?
}

//  ONRESIZE
void CoreApp::OnResize()
{	
	window_IsResized= TRUE;
	if ( FLAG_avoidflicker )
	{	
		Rendertarget[0]-&gt;BeginDraw();
		Rendertarget[0]-&gt;Clear(D2D1::ColorF(D2D1::ColorF::Black));
		Rendertarget[0]-&gt;EndDraw(); 
		SwapChain-&gt;Present(1, 0 );
	}
	DiscardDeviceResources();
}

//  MESSAGE THREAD
		switch(message)
		{	
			case WM_SIZE:
				{	
					pCoreApp-&gt;OnResize();
					//  Was genau fehlt ?
				}

			case WM_PAINT:
				{
					pCoreApp-&gt;OnRender();
					//  Was genau fehlt ?
				}

			case WM_TIMER:
				{
					pCoreApp-&gt;OnTimer( pCoreApp );
				}
		}
</code></pre>
<p>( P.S.: Da die msdn-Doku in engl. ist und ich selbst Parameter für Parameter schon ausgewechselt habe. )</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/251346/validate-und-invalidate-leicht</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 11:11:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/251346.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 03 Oct 2009 14:12:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Validate und Invalidate (leicht) on Sat, 03 Oct 2009 14:26:44 GMT]]></title><description><![CDATA[<p>Mein Programm funktioniert bis auf ein sehr Interessantes Detail.</p>
<p>Viele haben sich sicher schon in manchen WIN32 gefragt:<br />
Kann man das häßliche mitverschieben des Fensterinhaltes beim Fensterziehen verhindern ?<br />
JA, ich verwende ein SetBackgroundBlack mit <strong>FLAG_avoidflicker</strong>.</p>
<p>Doch damit funktioniert das Present() in OnRender manchmal nicht mehr.</p>
<p>Es liegt garantiert an den Kontrollanweisungen Validate() und Invalidate().</p>
<p>Aber wie funktionieren diese, wo sollten sie stehen, oder besser wie Löse ich das Problem ?</p>
<pre><code class="language-cpp">//  ONTIMER
void CoreApp::OnTimer()
{	
	//  Was genau fehlt ?
}

//  ONRESIZE
void CoreApp::OnResize()
{	
	window_IsResized= TRUE;
	if ( FLAG_avoidflicker )
	{	
		Rendertarget[0]-&gt;BeginDraw();
		Rendertarget[0]-&gt;Clear(D2D1::ColorF(D2D1::ColorF::Black));
		Rendertarget[0]-&gt;EndDraw(); 
		SwapChain-&gt;Present(1, 0 );
	}
	DiscardDeviceResources();
}

//  MESSAGE THREAD
		switch(message)
		{	
			case WM_SIZE:
				{	
					pCoreApp-&gt;OnResize();
					//  Was genau fehlt ?
				}

			case WM_PAINT:
				{
					pCoreApp-&gt;OnRender();
					//  Was genau fehlt ?
				}

			case WM_TIMER:
				{
					pCoreApp-&gt;OnTimer( pCoreApp );
				}
		}
</code></pre>
<p>( P.S.: Da die msdn-Doku in engl. ist und ich selbst Parameter für Parameter schon ausgewechselt habe. )</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1787664</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1787664</guid><dc:creator><![CDATA[zodX]]></dc:creator><pubDate>Sat, 03 Oct 2009 14:26:44 GMT</pubDate></item><item><title><![CDATA[Reply to Validate und Invalidate (leicht) on Sat, 03 Oct 2009 14:49:00 GMT]]></title><description><![CDATA[<blockquote>
<p>Viele haben sich sicher schon in manchen <strong>WIN32</strong> gefragt:</p>
</blockquote>
<p>falsches forum... (und wenn wir schon bei falsch sind: der satz macht so auch nicht wirklich viel Sinn^^)</p>
<p>warte einfach, bis dich jmd ins richtige verschiebt^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1787680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1787680</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sat, 03 Oct 2009 14:49:00 GMT</pubDate></item><item><title><![CDATA[Reply to Validate und Invalidate (leicht) on Sat, 03 Oct 2009 14:50:07 GMT]]></title><description><![CDATA[<p>Mal noch der Crosslink:<br />
<a href="http://www.spieleprogrammierer.de/phpBB2/viewtopic.php?p=147144#147144" rel="nofollow">http://www.spieleprogrammierer.de/phpBB2/viewtopic.php?p=147144#147144</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1787681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1787681</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sat, 03 Oct 2009 14:50:07 GMT</pubDate></item><item><title><![CDATA[Reply to Validate und Invalidate (leicht) on Sat, 03 Oct 2009 14:56:27 GMT]]></title><description><![CDATA[<p>unskilled schrieb:</p>
<blockquote>
<blockquote>
<p>Viele haben sich sicher schon in manchen <strong>WIN32</strong> gefragt:</p>
</blockquote>
<p>und wenn wir schon bei falsch sind: der satz macht so auch nicht wirklich viel Sinn^^</p>
</blockquote>
<p>Hast du noch nie in machen WIN32 gefragt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1787686</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1787686</guid><dc:creator><![CDATA[ach]]></dc:creator><pubDate>Sat, 03 Oct 2009 14:56:27 GMT</pubDate></item><item><title><![CDATA[Reply to Validate und Invalidate (leicht) on Tue, 06 Oct 2009 19:40:23 GMT]]></title><description><![CDATA[<p>Vielen Dank !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1788911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1788911</guid><dc:creator><![CDATA[zodX]]></dc:creator><pubDate>Tue, 06 Oct 2009 19:40:23 GMT</pubDate></item></channel></rss>