Methods Added for Visual Studio 2010 SP1

Visual Studio 2010 SP1 is required.

The MFC library now supports animation and Direct 2D (D2D). The following table provides links to the reference documentation for relevant methods that are either global or have been added to pre-existing classes..

Global Methods

Method

Description

AFX_GLOBAL_DATA::D2D1MakeRotateMatrix

Creates a rotation transformation that rotates by a specified angle around a specified point.

AFX_GLOBAL_DATA::GetDirect2dFactory

Returns a pointer to the ID2D1Factory interface that is stored in the global data. If the interface is not initialized, it is created and has the default parameters.

AFX_GLOBAL_DATA::GetWICFactory

Returns a pointer to the IWICImagingFactory interface that is stored in the global data. If the interface is not initialized, it is created and has the default parameters.

AFX_GLOBAL_DATA::GetWriteFactory

Returns a pointer to the IDWriteFactory interface that is stored in the global data. If the interface is not initialized, it is created and has the default parameters.

AFX_GLOBAL_DATA::IsD2DInitialized

Initializes D2D, DirectWrite, and WIC factories. Call this method before the main window is initialized.

AFX_GLOBAL_DATA::IsD2DInitialized

Determines whether the D2D was initialized.

New Methods in Existing Classes

Method

Description

CWnd::EnableD2DSupport

Enables or disables window D2D support. Call this method before the main window is initialized.

CWnd::GetRenderTarget

Gets a render target that is associated with this window.

CWnd::IsD2DSupportEnabled

Determines whether D2D support is enabled.

CWinApp::EnableD2DSupport

Enables application D2D support. Call this method before the main window is initialized.

See Also

Other Resources

MFC Additions for Visual Studio 2010 SP1

MFC Classes Added for Visual Studio 2010 SP1