Welcome to MSDN Blogs Sign in | Join | Help

A Couple of Cool Uses of the DWM Thumbnail APIs

I've seen a couple of cool uses in the past week of the DWM Thumbnail API (described in my previous post) and wanted to share them here.

"Simon on the .NET" wrote a great-looking Exposé-like mini-app that, when you press F12, shows a representation of all the desktop windows in a grid.  The original desktop is shown behind the grid.  The thumbnails are, as expected, live and updating (though they don't accept input, as is true with DWM thumbnails in general).

Douglas Stockwell wrote a cool WPF application that PInvoke's to the thumbnail APIs and populates a WPF ItemsControl with thumbnails of windows as you click on them.  As it stands, it has no particular purpose, but it shows some interesting integration between WPF and DWM thumbnails.

 

Published Wednesday, September 27, 2006 11:34 PM by Greg Schechter
Filed under: ,

Comments

Thursday, September 28, 2006 3:42 AM by Thomas Lebrun

# [WPF] Exposé sous Windows Vista

Un petit message pour faire de la pub à un ami développeur, Simon (qui n'arrete pas de me harceler pour...
Thursday, September 28, 2006 6:19 AM by Arno Schoedl

# re: A Couple of Cool Uses of the DWM Thumbnail APIs

I started exploring interactions between DirectDraw and DWM. Two effects of DirectDraw going straight to the write-only video buffer seem to be that WM_NCCALCSIZE must return WVR_REDRAW and ScrollWindowEx cannot be used in DirectDraw windows.
Thursday, September 28, 2006 7:42 AM by Imran

# re: A Couple of Cool Uses of the DWM Thumbnail APIs

Super duper cool and it works.
Monday, October 02, 2006 2:09 PM by Tim

# re: A Couple of Cool Uses of the DWM Thumbnail APIs

The thumbnail API uses HWNDs.  Is there any way to render a static image of a window as a 32-bit HBITMAP, including the alpha values for that specific window, without using an HWND?

Tuesday, October 03, 2006 5:37 AM by kiwiblue

# re: A Couple of Cool Uses of the DWM Thumbnail APIs

> There any way to render a static image

> of a window as a 32-bit HBITMAP, including

> the alpha values for that specific window,

> without using an HWND?

Probably not, due to implementation details. See http://blogs.msdn.com/greg_schechter/archive/2006/09/14/753605.aspx for more info.

[quote]

The way thumbnails are implemented is effectively via the same VisualBrush mechanism that we have in WPF.  The DwmRegisterThumbnail API effectively creates a link into a node representing a window in the visual tree that makes up the desktop (discussed in this post), and references that node from the thumbnail target HWND.  Thus when the thumbnail source is a live video, the target HWND is rendered by rendering that live video there as well.  So these thumbnails are very much "live". I should also point out here that things like Flip3D cannot be built using the thumbnail API.  That's because thumbnails are always rendered head on in their target window in 2D

[/quote]

Thursday, November 30, 2006 1:53 AM by Infosys | Microsoft

# Application Thumbnails in Vista

Using Application Thumbnails in Vista

# My Expos?? : A Mac OS X Expos?? implementation for Windows VISTA [Update] | World of Warcraft

New Comments to this post are disabled
 
Page view tracker