Share via


CWndClassInfo::Register

Called by CWindowImpl::Create to register the window class if it has not yet been registered.

ATOM Register( 
   WNDPROC* pProc  
);

Parameters

  • pProc
    [out] Specifies the original window procedure of an existing window class.

Return Value

If successful, an atom that uniquely identifies the window class being registered. Otherwise, 0.

Remarks

If you have specified the DECLARE_WND_CLASS (the default in CWindowImpl) or the DECLARE_WND_CLASS_EX macro, Register registers a new window class. In this case, the pProc parameter is not used.

If you have specified the DECLARE_WND_SUPERCLASS macro, Register registers a superclass — a window class that is based on an existing class but uses a different window procedure. The existing window class's window procedure is returned in pProc.

Requirements

Header: atlwin.h

See Also

Reference

CWndClassInfo Class

CWndClassInfo::m_atom

CWndClassInfo::m_wc

CWndClassInfo::pWndProc