overview.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Using Window Classes (1.2)
◄About Section►  ◄Function Group►  ◄Control Classes►  ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
 
                            Using Window Classes
 
This section explains how to register and use window classes in your
applications.
 
Registering a Private Window Class
 
You can register a private window class at any time by using the
WinRegisterClass function. You must define the window procedure in your
application, choose a unique name, and set the window class styles for the
class. The following code fragment shows how to register the window class
name "MyPrivateName".
 
WinRegisterClass(hab,    /* anchor-block handle      */
    "MyPrivateName",     /* class name               */
    MyWindowProc,        /* far pointer to procedure */
    CS_SIZEREDRAW,       /* class style              */
    0);                  /* window data              */
 
Registering an Imported Window Procedure
 
You do not have to limit window procedures to your application's code
segments. You can also register a window procedure that is imported from a
dynamic-link library. You can do this in several ways. The easiest way is to
import the window-procedure name by using either the IMPORTS statement in
the application's module-definition file or by linking with an import
library that contains an import record for the function.
 
 
                                      ♦