Share via


DECLARE_WND_SUPERCLASS

DECLARE_WND_SUPERCLASS( WndClassName**,** OrigWndClassName )

Parameters

WndClassName

[in] The name of the window class that will superclass OrigWndClassName. If NULL, ATL will generate a window class name.

OrigWndClassName

[in] The name of an existing window class.

Remarks

Place this macro in an ATL ActiveX control's control class. This macro allows you to specify the name of a window class that will superclass an existing window class. CWndClassInfo manages the information of the superclass.

DECLARE_WND_SUPERCLASS implements the following static function:

static CWndClassInfo& GetWndClassInfo();

By default, CWindowImpl uses the DECLARE_WND_CLASS macro to create a window based on a new window class. By specifying the DECLARE_WND_SUPERCLASS macro in a CWindowImpl-derived class, the window class will be based on an existing class but will use your window procedure. This technique is called superclassing.

Besides using the DECLARE_WND_CLASS and DECLARE_WND_SUPERCLASS macros, you can override the GetWndClassInfo function with your own implementation.

For more information about superclassing, see in the Win32 SDK. For more information about using windows in ATL, see the article ATL Window Classes.

ATL Macros and Global Functions