# Class

The Class structure contains functions to register custom classes as well as the definitions for the standard Windows classes.

    structure Class:
    sig
        type HWND and Message and HINSTANCE and HBRUSH and HICON and HCURSOR and HGDIOBJ

        datatype LRESULT = LRESINT of int | LRESHANDLE of HGDIOBJ

        datatype 'a ATOM =
            Registered of {proc: HWND * Message * 'a -> LRESULT option * 'a, className: string}
          | SystemClass of string

        val Button : unit ATOM
        val ComboBox : unit ATOM
        val ComboLBox : unit ATOM
        val DDEMLEvent : unit ATOM
        val Edit : unit ATOM
        val ListBox : unit ATOM
        val MDIClient : unit ATOM
        val ScrollBar : unit ATOM
        val Static : unit ATOM

        structure Style :
          sig
    	include BIT_FLAGS

            val CS_BYTEALIGNCLIENT : flags
            val CS_BYTEALIGNWINDOW : flags
            val CS_CLASSDC : flags
            val CS_DBLCLKS : flags
            val CS_GLOBALCLASS : flags
            val CS_HREDRAW : flags
            val CS_KEYCVTWINDOW : flags
            val CS_NOCLOSE : flags
            val CS_NOKEYCVT : flags
            val CS_OWNDC : flags
            val CS_PARENTDC : flags
            val CS_SAVEBITS : flags
            val CS_VREDRAW : flags
          end

        type 'a WNDCLASSEX =
            {style: Style.flags,
             wndProc: HWND * Message * 'a -> LRESULT option * 'a,
             hInstance: HINSTANCE,
             hIcon: HICON option,
             hCursor: HCURSOR option,
             hbrBackGround: HBRUSH option,
             menuName: Resource.RESID option,
             className: string,
             hIconSm: HICON option}

        val RegisterClassEx : 'a WNDCLASSEX -> 'a ATOM

        val UnregisterClass : string * HINSTANCE -> unit
        val GetClassName : HWND -> string
        val GetClassInfoEx: HINSTANCE * string -> 'a WNDCLASSEX
      end