CWinTraits

template <DWORD t_dwStyle = 0, DWORD t_dwExStyle = 0>
class CWinTraits

Parameters

t_dwStyle

Default window styles.

t_dwExStyle

Default extended window styles.

Remarks

This class provides a simple method of standardizing the traits of an ATL window object. You are able to specify both the standard and extended styles for the ATL window object.

The CWinTraits class can be used, as a template parameter for creating ATL window classes, to specify the styles for the window object.

The class makes use of three predefined types of ATL window styles:

CControlWinTraits

Designed for a standard control window. The following standard styles are used: WS_CHILD, WS_VISIBLE, WS_CLIPCHILDREN, and WS_CLIPSIBLINGS. There are no extended styles.

CFrameWinTraits

Designed for a standard frame window. The standard styles used include: WS_OVERLAPPEDWINDOW, WS_CLIPCHILDREN, and WS_CLIPSIBLINGS. The extended styles used include: WS_EX_APPWINDOW and WS_EX_WINDOWEDGE.

CMDIChildWinTraits

Designed for a standard MDI child window. The standard styles used include: WS_OVERLAPPEDWINDOW, WS_CHILD, WS_VISIBLE, WS_CLIPCHILDREN, and WS_CLIPSIBLINGS. The extended styles used include: WS_EX_MDICHILD.

In addition to CWinTraits, CWinTraitsOR provides the same functionality plus the ability to combine styles using the bitwise OR operator.

#include <atlwin.h>

Class Members