<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx</link><description>So mostly I blog about WPF, which is where I’ve spent most of my time the last few years. But I also work on USER and GDI, along with many full-time USER &amp;amp; GDI'ers, and wanted to spend a little time talking about compatibility. We put a lot of effort</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#609474</link><pubDate>Sun, 28 May 2006 22:35:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:609474</guid><dc:creator>jeff</dc:creator><description>&amp;lt;&amp;lt;Rubber bands, custom shadows, and other special effects – these are often done using GetDC(NULL),...&lt;br&gt;&lt;br&gt;...(but we do support XOR). &amp;gt;&amp;gt;&lt;br&gt;&lt;br&gt;Nick,&lt;br&gt;&lt;br&gt;I just did a little testing of my GDI based app on Vista Beta 2, and I have an XOR'd rubberband that's drawn on the desktop DC for a certain UI effect. It's very slow as you say, but it also does not draw correctly (leaves traces).&lt;br&gt;&lt;br&gt;However, I was very pleased to see that the performance of good ol' GDI BitBlit with a DIBSECTION seems as fast as it was on XP. Is it mapped somehow to DirectX? &lt;br&gt;&lt;br&gt;--jeff&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=609474" width="1" height="1"&gt;</description></item><item><title>USER &amp;amp;amp; GDI Compatibility in Windows Vista, wrapup</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#582366</link><pubDate>Mon, 24 Apr 2006 22:17:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:582366</guid><dc:creator>Nick on Windows Presentation Foundation (Avalon)</dc:creator><description>This content will make it into the master compatibility document in the next month or so, but in the...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=582366" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#579184</link><pubDate>Wed, 19 Apr 2006 21:04:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:579184</guid><dc:creator>kokorozashi</dc:creator><description>I just remembered another point about the way Apple did this. They made it possible for an&lt;br&gt;application to determine whether windows are automagically double-buffered, and they made&lt;br&gt;it possible to do this on systems which never automagically double-buffer windows. To put&lt;br&gt;it in more specific terms, Mac OS 9 does not automagically double-buffer windows, but Mac&lt;br&gt;OS X does, yet a single app may run on either system and perform an identical test at runtime&lt;br&gt;to determine whether it should do its own double-buffering. This would make it easier and safer&lt;br&gt;for existing apps to avoid triple-buffering on Vista but still avoid flicker on XP. To make&lt;br&gt;this possible in an elegant way, don't add a function to Vista. Find some mechanism which&lt;br&gt;already exists in XP (are there any HWND extended style bits left?) and describe the code&lt;br&gt;a developer could write to determine that some existing bit is clear or at least determine&lt;br&gt;that the bit does not exist to be tested. Then, in Vista, you'd define the bit and set it,&lt;br&gt;so the same code would not only find the bit but see that it is set. Defining a bit like&lt;br&gt;this decouples the test from the version of the operating system, which is advantageous for&lt;br&gt;a number of reasons.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=579184" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#572939</link><pubDate>Tue, 11 Apr 2006 04:14:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:572939</guid><dc:creator>Nick Kramer [MSFT]</dc:creator><description>kokorozashi -- thanks for the suggestion!&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=572939" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#570524</link><pubDate>Fri, 07 Apr 2006 06:18:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:570524</guid><dc:creator>kokorozashi</dc:creator><description>Hmmm. That link showed up in a pretty obscure place. Here it is again:&lt;br&gt; &lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://developer.apple.com/documentation/Performance/Conceptual/Drawing/Articles/CarbonDrawing.html"&gt;http://developer.apple.com/documentation/Performance/Conceptual/Drawing/Articles/CarbonDrawing.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=570524" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#570522</link><pubDate>Fri, 07 Apr 2006 06:14:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:570522</guid><dc:creator>kokorozashi</dc:creator><description>Read the linked page for clues to how Apple solved these same problems some years ago. They require developer intervention, but that may be the only way.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=570522" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#569852</link><pubDate>Thu, 06 Apr 2006 16:31:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:569852</guid><dc:creator>Raymond Chen - MSFT</dc:creator><description>&amp;quot;Since there was no response my guess is that there isn't.&amp;quot;&lt;br&gt;&lt;br&gt;Or I didn't understand the question and didn't feel like pursuing it. WindowFromDC will tell you if you have the DC for a window but that's still the wrong question. Even if you decide you have a memory DC, double-buffering is wrong if the result is going to be BLTed to a remote DC when you're done.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=569852" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#569458</link><pubDate>Thu, 06 Apr 2006 02:58:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:569458</guid><dc:creator>Nick Kramer [MSFT]</dc:creator><description>You can detect if the DWM is on (and thus your application is double buffer) by calling DwmIsCompositionEnabled(), and listening for WM_DWMCOMPOSITIONCHANGED messages to see if the DWM is turned on/off while your application is running.&lt;br&gt;&lt;br&gt;I don't believe we have any logic to detect applications doing double buffering and bypass that, every application does it a little differently...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=569458" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#569425</link><pubDate>Thu, 06 Apr 2006 02:11:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:569425</guid><dc:creator>asdf</dc:creator><description>In:&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/oldnewthing/archive/2006/01/03/508694.aspx"&gt;http://blogs.msdn.com/oldnewthing/archive/2006/01/03/508694.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;Raymond Chen had an example where he detected if the program was running on a remote desktop so he could turn off double buffering. I asked if there was a way to detect something like this in general given an HDC. Since there was no response my guess is that there isn't.&lt;br&gt;&lt;br&gt;Now, it's pretty clear that Vista will double buffer GDI apps for you. My assumption is that you can turn this on or off (dynamically and at runtime). In any event, in the WM_PAINT message how can you detect if Windows is double buffering for you so apps can disable their own double buffering code to save time blitting and space from a large bitmap allocated?&lt;br&gt;&lt;br&gt;Ideally what I would want you to tell me is that whoever wrote this was smart enough to recognize this usage pattern so it occurs automatically but my app uses a DIB (not a DIBSECTION) so it can access the pixels so I doubt this case is covered.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=569425" width="1" height="1"&gt;</description></item><item><title>re: USER &amp; GDI Compatibility in Windows Vista (part 1)</title><link>http://blogs.msdn.com/b/nickkramer/archive/2006/04/04/567769.aspx#569112</link><pubDate>Wed, 05 Apr 2006 19:57:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:569112</guid><dc:creator>Joe Reader</dc:creator><description>Based on what you say, I'm looking forward to running the Lotus Notes client on Vista. Ought to be fun to see what that quirky beast looks like :-)&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=569112" width="1" height="1"&gt;</description></item></channel></rss>