GRID_IMPLEMENT_REGISTER

GRID_IMPLEMENT_REGISTER(class_name, _style, icon, cursor, background)

class

nameThe actual name of the class (not enclosed in quotation marks).

_

tyleSpecifies the class style (e.g., CS_DBLCLKS). See WNDCLASS for more information.

icon

Identifies the class icon. Normally, it should be 0.

cursor

Identifies the cursor. Normally, it should be 0.

background

Identifies the class background brush. Normally, it should be 0.

Remarks

Inserts implementation code in the implementation file to enable dialog control functionality for your CWnd-derived class.

In your header file, you have to insert GRID_DECLARE_REGISTER.

By using the macros GRID_DECLARE_REGISTER and GRID_IMPLEMENT_REGISTER,you can easily create your own dialog controls. In Visual Studio you can drag the user control-icon into the dialog template. Visual Studio shows a property window for the user control. In class you have to specify your C++-class name. Style specifies your window style. The style must be expressed as a 32-bit hexadecimal number, where the system (WS_) styles are in the upper 16 bits and control-specific styles are in the lower 16 bits. For example, 0x50810000 is WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP. To find these values, you must consult the windows.h file.

Note:

If you are using the control in an extension DLL, you should specify CS_GLOBALCLASS for the class style. See WNDCLASS in the 32-Bit SDK Reference for further information.

Example

This example shows the usage of GRID_IMPLEMENT_REGISTER.

// CMyWnd Implementation

GRID_IMPLEMENT_REGISTER(CMyWnd, CS_DBLCLKS, 0, 0, 0)

CMyWnd::CMyWnd( )

{

}

...

See Also

 Macros::GRID_DECLARE_REGISTER

Macros

 Class Overview |  Class Members