The desktop composition feature, introduced in Windows Vista, fundamentally changes the way applications display pixels on the screen. When desktop composition is enabled, individual windows no longer draw directly to the screen or primary display device as they did in previous versions of Microsoft Windows. Instead, their drawing is redirected to off-screen surfaces in video memory, which are then rendered into a desktop image and presented on the display.
Desktop composition is performed by the Desktop Window Manager (DWM). Through desktop composition, DWM enables visual effects on the desktop as well as various features such as glass window frames, 3-D window transition animations, Windows Flip and Windows Flip3D , and high resolution support. For more information about the user experience features enabled by the DWM visit the Windows Vista: Features user experience page.
Many of the DWM features can be controlled or accessed by an application through the DWM APIs . The following documentation describes some of the features and requirements of the DWM APIs.
DWM consists of the following APIs. Additional documentation is available by following the associated links.
DWM_SOURCE_FRAME_SAMPLING Specifies the frame sampling type.DWMFLIP3DWINDOWPOLICY Specifies the Flip3D window policy.DWMNCRENDERINGPOLICY Specifies a constant that defines the non-client area rendering policy.DWMWINDOWATTRIBUTE Specifies window attributes for non-client rendering. Some values are used to set attributes and others to retrieve current values.
Specifies the frame sampling type.
Specifies the Flip3D window policy.
Specifies a constant that defines the non-client area rendering policy.
Specifies window attributes for non-client rendering. Some values are used to set attributes and others to retrieve current values.
DwmAttachMilContentDwmDefWindowProc Default window procedure for DWM hit-testing within the non-client area.DwmDetachMilContentDwmEnableBlurBehindWindow Enables the blur effect on the provided window handle.DwmEnableComposition Enables or disables DWM composition.DwmEnableMMCSS Tells the DWM to opt into Multimedia Class Schedule Service (MMCSS) scheduling while the calling process is alive.DwmExtendFrameIntoClientArea Extends the window frame behind the client area.DwmFlushDwmGetColorizationColor Retrieves the current color used for DWM glass composition. This value is based on the current color scheme and is modifiable by the user. Applications can listen for color changes by handling the WM_DWMCOLORIZATIONCOLORCHANGED notification.DwmGetCompositionTimingInfo Retrieves the current composition timing information.DwmGetGraphicsStreamClientDwmGetGraphicsStreamTransformHintDwmGetTransportAttributesDwmGetWindowAttribute Retrieves the current value of a specified attribute applied to the window.DwmInvalidateIconicBitmaps Called by a source application to indicate that all previously provided iconic bitmaps from a window, both thumbnails and peek representations, should be refreshed.DwmIsCompositionEnabled Obtains a value that indicates whether DWM composition is enabled. Applications can listen for composition state changes by handling the WM_DWMCOMPOSITIONCHANGED notification.DwmModifyPreviousDxFrameDuration Changes the number of refreshes the previous frame will be displayed.DwmQueryThumbnailSourceSize Returns the source size of the DWM thumbnail.DwmRegisterThumbnail Creates a DWM thumbnail relationship between the destination and source windows.DwmSetDxFrameDuration Sets the number of refreshes to display the presented frame.DwmSetIconicLivePreviewBitmap Called by a source application to provide a static, iconic bitmap to use as a peek preview for a window. This bitmap can be used by the taskbar to show a full-sized preview of a window or tab.DwmSetIconicThumbnail Called by a source application to set an iconic bitmap on a window for use as a thumbnail representation. This is a static bitmap. This bitmap can be used by the taskbar as a thumbnail switch target for the window or tab.DwmSetPresentParameters Sets the present parameters for frame composition.DwmSetWindowAttribute Sets the value of the specified attributes for non-client rendering to apply to the window.DwmUnregisterThumbnail Removes a DWM thumbnail relationship created by DwmRegisterThumbnail.DwmUpdateThumbnailProperties Updates the properties for a given DWM thumbnail.
Default window procedure for DWM hit-testing within the non-client area.
Enables the blur effect on the provided window handle.
Enables or disables DWM composition.
Tells the DWM to opt into Multimedia Class Schedule Service (MMCSS) scheduling while the calling process is alive.
Extends the window frame behind the client area.
Retrieves the current color used for DWM glass composition. This value is based on the current color scheme and is modifiable by the user. Applications can listen for color changes by handling the WM_DWMCOLORIZATIONCOLORCHANGED notification.
Retrieves the current composition timing information.
Retrieves the current value of a specified attribute applied to the window.
Called by a source application to indicate that all previously provided iconic bitmaps from a window, both thumbnails and peek representations, should be refreshed.
Obtains a value that indicates whether DWM composition is enabled. Applications can listen for composition state changes by handling the WM_DWMCOMPOSITIONCHANGED notification.
Changes the number of refreshes the previous frame will be displayed.
Returns the source size of the DWM thumbnail.
Creates a DWM thumbnail relationship between the destination and source windows.
Sets the number of refreshes to display the presented frame.
Called by a source application to provide a static, iconic bitmap to use as a peek preview for a window. This bitmap can be used by the taskbar to show a full-sized preview of a window or tab.
Called by a source application to set an iconic bitmap on a window for use as a thumbnail representation. This is a static bitmap. This bitmap can be used by the taskbar as a thumbnail switch target for the window or tab.
Sets the present parameters for frame composition.
Sets the value of the specified attributes for non-client rendering to apply to the window.
Removes a DWM thumbnail relationship created by DwmRegisterThumbnail.
Updates the properties for a given DWM thumbnail.
DWM_BLURBEHIND Specifies DWM blur behind properties.DWM_PRESENT_PARAMETERS Contains DWM video frame parameters for frame composition.DWM_THUMBNAIL_PROPERTIES Specifies DWM thumbnail properties.DWM_TIMING_INFO Contains DWM composition timing information.MilMatrix3x2DUNSIGNED_RATIO A ratio used with the DWM timing API.
Specifies DWM blur behind properties.
Contains DWM video frame parameters for frame composition.
Specifies DWM thumbnail properties.
Contains DWM composition timing information.
A ratio used with the DWM timing API.
Mikey, Sorry to hear about your game lock-up. Aero relies on the fancy features that DWMAPI.DLL provides. Try disabling Aero, if you have not already.
How do I reference the dwmapi component so i can control DWM. I am using C# and VS2010[tfl - 03 08 09] Hi - and thanks for your post. You should post questions like this to the MSDN Forums at http://forums.microsoft.com/msdn or the MSDN Newsgroups at
http://www.microsoft.com/communities/newsgroups/en-us/ . You are much more likely get a quicker response using the forums than through the Community Content. For specific help about:Visual Studio : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.vstudio%2C &SQL Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.sqlserver%2C &.NET Framework : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.dotnet.framework PowerShell : http://groups.google.com/group/microsoft.public.windows.powershell/topics?pli=1 All Public : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public%2C &
[out of date tech support query - removed]