anchor.diff:  (defcfun ("RegisterClassExA" %register-class-ex) :int16
     (wndclass-ex :pointer))
   
  +(defcfun ("GetClassInfoA" %get-class-info) bool
  +  (instance hinstance) (class-name :string) (wndclass :pointer))
   
   (defcfun ("UnregisterClassA" unregister-class) bool
     (class-name :string) (instance hinstance))
   
  +(defun class-exists-p (module-instance name)
  +  (with-foreign-object (class 'wndclass)
  +	(%get-class-info module-instance name class)))
  +
   (defun create-and-register-class (module-instance name)
  -  (with-foreign-object (class 'wndclass)
  -    (with-foreign-slots ((style wndproc cls-extra wnd-extra instance icon cursor
  -                                br-background menu-name class-name) class wndclass)
  -      (setf style (foreign-bitfield-value 'class-style-flags
  -                                          '(:cs-hredraw :cs-vredraw :cs-own-dc))
  -            wndproc (callback window-proc)
  -            cls-extra 0
  -            wnd-extra 0
  -            instance module-instance
  -            icon  (null-pointer)
  -            cursor (null-pointer)
  -            br-background (null-pointer)
  -            menu-name (null-pointer)
  -            class-name name))
  -    (when (zerop (%register-class class))
  -      (format t "Error registering class ~S: ~S~%" name (get-last-error)))))
  +  (unless (class-exists-p module-instance name)
  +	(with-foreign-object (class 'wndclass)
  +	  (with-foreign-slots ((style wndproc cls-extra wnd-extra instance icon cursor
  +								  br-background menu-name class-name) class wndclass)
  +		(setf style (foreign-bitfield-value 'class-style-flags
  +											'(:cs-hredraw :cs-vredraw :cs-own-dc))
  +			  wndproc (callback window-proc)
  +			  cls-extra 0
  +			  wnd-extra 0
  +			  instance module-instance
  +			  icon	(null-pointer)
  +			  cursor (null-pointer)
  +			  br-background (null-pointer)
  +			  menu-name (null-pointer)
  +			  class-name name))
  +	  (when (zerop (%register-class class))
  +		(format t "Error registering class ~S: ~S~%" name (get-last-error))))))
   
   (defcfun ("SetWindowTextA" set-window-text) bool
     (wnd hwnd) (title :string))
  
positive.code: (defctype lparam :int32)
  
  (defctype word :int16)
  (defctype dword  :int32)
  
  (defctype bool :int) ;; XXX: Win32 BOOL isn't used as a boolean (e.g.: see GetMessage)
  
  
negative.code:   (panning-height dword))
  
  (define-foreign-library user32
    (t (:default "user32")))
  (use-foreign-library user32)
  
  (defcfun ("ShowCursor" show-cursor) :int
  