共用方式為


CAtlWinModule Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CAtlWinModule Class.

This class provides support for ATL windowing components.

Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

Syntax

class CAtlWinModule : public _ATL_WIN_MODULE

Members

Public Constructors

Name Description
CAtlWinModule::CAtlWinModule The constructor.
CAtlWinModule::~CAtlWinModule The destructor.

Public Methods

Name Description
CAtlWinModule::AddCreateWndData Adds a data object.
CAtlWinModule::ExtractCreateWndData Returns a pointer to the window module data object.

Remarks

This class provides support for all ATL classes which require windowing features.

Inheritance Hierarchy

_ATL_WIN_MODULE

CAtlWinModule

Requirements

Header: atlbase.h

CAtlWinModule::AddCreateWndData

This method initializes and adds an _AtlCreateWndData structure.

void AddCreateWndData(_AtlCreateWndData* pData, void* pObject);

Parameters

pData
Pointer to the _AtlCreateWndData structure to be initialized and added to the current module.

pObject
Pointer to an object's this pointer.

Remarks

This method calls AtlWinModuleAddCreateWndData which initializes an _AtlCreateWndData structure. This structure will store the this pointer, used to obtain the class instance in window procedures.

CAtlWinModule::CAtlWinModule

The constructor.

CAtlWinModule();

Remarks

If initialization fails, an EXCEPTION_NONCONTINUABLE exception is raised.

CAtlWinModule::~CAtlWinModule

The destructor.

~CAtlWinModule();

Remarks

Frees all allocated resources.

CAtlWinModule::ExtractCreateWndData

This method returns a pointer to an _AtlCreateWndData structure.

void* ExtractCreateWndData();

Return Value

Returns a pointer to the _AtlCreateWndData structure previously added with CAtlWinModule::AddCreateWndData, or NULL if no object is available.

See Also

_ATL_WIN_MODULE
Class Overview
Module Classes