RegisterClass

This function registers a window class for subsequent use in calls to the CreateWindow or CreateWindowEx function.

ATOM RegisterClass(
const WNDCLASS *lpWndClass); 

Parameters

  • lpWndClass
    Long pointer to a WNDCLASS structure. You must fill the structure with the appropriate class attributes before passing it to the function.

Return Values

An atom that uniquely identifies the class being registered indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

If you register the window class by using RegisterClassA, the application tells the system that the windows of the created class expect messages with text or character parameters to use the ANSI character set; if you register it by using RegisterClassW, the application requests that the system pass text parameters of messages as Unicode.

All window classes that an application registers are unregistered when it terminates.

The WNDCLASS structure pointed to by the lpWndClass parameter does not support the lpszMenuName field because Windows CE does not support default menus.

Unless you are using the Windows CE Iconcurs component, which provides mouse cursor support on appropriate target platforms, you cannot use the hCursor field in the WNDCLASS structure pointed to by lpWndClass.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CreateWindow, CreateWindowEx, GetClassInfo, GetClassName, GetLastError, UnregisterClass, WindowProc, WNDCLASS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.