Lisp Knowledgebase

Title: How to set the cursor appearance on Windows

ID: 10049


Product: LispWorks for Windows
Version: All
OS: All Windows platforms

Description:


You can set the CAPI:SIMPLE-PANE-CURSOR, e.g.

(defun do-motion (pane x y)
 (if (capi:pinboard-object-at-position pane x y)
     (setf (capi:simple-pane-cursor pane) :crosshair)
   (setf (capi:simple-pane-cursor pane) nil)))

(capi:contain
(make-instance 'capi:pinboard-layout
               :description (list (make-instance 'capi:item-pinboard-object
                                                 :text "foo"
                                                 :x 20
                                                 :y 30))
               :min-width 200
               :min-height 200
               :input-model '((:motion do-motion))))

The possible values for the cursor are:

keyword Win32 constant
----------------------------------------------------------------
:bottom-left-corner IDC_SIZENESW
:bottom-right-corner IDC_SIZENWSE
:bottom-side IDC_SIZENS
:busy IDC_WAIT
:crosshair IDC_CROSS
:h-double-arrow IDC_SIZEWE
:hand IDC_SIZEALL
:i-beam IDC_IBEAM
:left-side IDC_SIZEWE
:move the hand (not a windows built-in)
:right-side IDC_SIZEWE
:top-left-corner IDC_SIZENWSE
:top-right-corner IDC_SIZENESW
:top-side IDC_SIZENS
:v-double-arrow IDC_SIZENS

Note: In LispWorks 6.0 and later versions you can also use a cursor object created by capi:load-cursor.

See Also:
Workaround:
Patch:

Hardware:N/A
Summary:
Bug#:
Patch Enhancement#:
Reported:

Company     Contact     Privacy Policy     Terms of Use