Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Desktop Window Manager

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 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.

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 Overviews
• DWM Reference
• DWM Sample Code

Desktop Window Manager API

DWM consists of the following APIs. Additional documentation is available by following the associated links.

• DWM Functions
• DWM Structures
• DWM Messages
• DWM Constants and Enumerations

DWM Functions

Name Description
DwmAttachMilContent Not implemented.
DwmDefWindowProc Default window procedure for DWM hit testing within the non-client area.
DwmDetachMilContent Not implemented.
DwmEnableBlurBehindWindow Enables the blur effect on a specified window.
DwmEnableComposition Enables or disables DWM composition.
DwmEnableMMCSS Tells DWM to opt into Multimedia Class Schedule Service (MMCSS) schedu
process is alive.
DwmExtendFrameIntoClientArea Extends the window frame behind the client area.
DwmFlush Issues a flush call that blocks the caller until the next present, when all of the
surface updates that are currently outstanding have been made. This compens
scenes or very low priority calling processes.
DwmGetColorizationColor Retrieves the current color used for DWM glass composition. This value is ba
scheme and is modifiable by the user. Applications can listen for color chang
the WM_DWMCOLORIZATIONCOLORCHANGED notification.
DwmGetCompositionTimingInfo Retrieves the current composition timing information.
DwmGetGraphicsStreamClient Not implemented.
DwmGetGraphicsStreamTransformHint Not implemented.
DwmGetTransportAttributes Retrieves transport attributes.
DwmGetWindowAttribute 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
both thumbnails and peek representations, should be refreshed.
DwmIsCompositionEnabled Obtains a value that indicates whether DWM composition is enabled. Applica
composition state changes by handling the WM_DWMCOMPOSITIONCH
DwmModifyPreviousDxFrameDuration Changes the number of monitor refreshes through which the previous frame w
DwmQueryThumbnailSourceSize Returns the source size of the DWM thumbnail.
DwmRegisterThumbnail Creates a DWM thumbnail relationship between the destination and source w
DwmSetDxFrameDuration Sets the number of monitor refreshes through which to display the presented
DwmSetIconicLivePreviewBitmap Called by a source application to provide a static, iconic bitmap to use as a pe
This bitmap can be used by the taskbar to show a full-sized preview of a wind
DwmSetIconicThumbnail Called by a source application to set an iconic bitmap on a window for use as
representation. This is a static bitmap. This bitmap can be used by the taskbar
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 t
DwmUnregisterThumbnail Removes a DWM thumbnail relationship created by DwmRegisterThumbna
DwmUpdateThumbnailProperties Updates the properties for a given DWM thumbnail.

DWM Structures

Name Description
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.
MilMatrix3x2D
UNSIGNED_RATIO A ratio used with the DWM timing API.

DWM Messages

Name Description
WM_DWMCOLORIZATIONCOLORCHANGED Sent to all top-level windows when the colorization color has ch
WM_DWMCOMPOSITIONCHANGED Sent to all top-level windows when Desktop Window Manager (
been enabled or disabled.
WM_DWMNCRENDERINGCHANGED Sent when the non-client area rendering policy has changed.
WM_DWMSENDICONICLIVEPREVIEWBITMAP Instructs a window to provide a static bitmap for use as a peek re
window.
WM_DWMSENDICONICTHUMBNAIL Instructs a window to provide a static bitmap for use as a thumb
window.
WM_DWMWINDOWMAXIMIZEDCHANGE Sent when a Desktop Window Manager (DWM) composed wind

DWM Constants and Enumerations

Name Description
DWM Blur Behind Constants Flags used by DWM_BLURBEHIND to indicate which members have been
DWM Enable Composition Constants Flags used by DwmEnableComposition to change the state of DWM compo
DWM_SOURCE_FRAME_SAMPLING Specifies the frame sampling type.
DWM_TNP Constants Flags used by the DWM_THUMBNAIL_PROPERTIES structure to indica
have been set.
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
to retrieve current values.

You might also like