Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- M E W E L - <b>int pascal registerclass(wndclass *pwndclass)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
int pascal RegisterClass(WNDCLASS *pWndClass)

  Allows you to create your own window class. A window class has
several important properties associated with it, including the name
of the class, the default window procedure that all windows in this
class will have, style bits, and the number of bytes which will be
allocated for the window extra area for each window in the class.

Parameters
  pWndClass is a pointer to a WNDCLASS structure. This structure is
defined is the file WINDOW.H. The following fields should be filled
in by the application program :

  DWORD style;      /* the class style bits */
  long  (pascal *lpfnWndProc)();  /* default winproc for the class */
  int   cbWndExtra;   /* # of bytes allocated for the window extra area */
  int   cbClsExtra;   /* # of bytes allocated for the class extra area */
  char  *lpszClassName; /* the name of the class */
  char  *lpszBaseClass; /* the name of the base class */

All other fields will be automatically filled in by the
RegisterClass() function.

Returns
  TRUE if the class was registered, FALSE if not.

Example

  extern int pascal MyClassProc();
  WNDCLASS wndClass;

  wndClass.lpszClassName = "MyClass";
  wndClass.lpszCaseClass = "Edit";
  wndClass.cbWndExtra    = 0;
  wndClass.cbClsExtra    = 0;
  wndClass.style         = 0L;
  wndClass.lpfnWndProc   = MyClassProc;

  if (!RegisterClass(&wndClass))
    ....... /* error */

 Use See Also to find about about the changes for MEWEL 3.1

See Also: WNDCLASS

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson