For DirectInput mouse access a client machine must have
DirectInput 3.0 or greater installed. Cpw's DirectInput interface for
mice will 'fall through' to Windows base services if
the required DirectInput software is not available on the
client machine.
Cpw's DirectInput mouse interface is intended for use with
fullscreen single windowed games. DirectInput has some
unique behavior which developers should be aware of:
No mouse cursors
The DirectInput mouse interface is a low level 'direct to
driver' interface which bypasses standard Windows mouse
input processing. As such, mouse cursors are not diplayed in
a window which uses direct mouse input.
No mouse events
Mouse positional information is only available through the
mouse polling interface. (cpwMouseState) Mouse callback
events are not supported when DirectInput mouse
access is enabled.
Relative mouse movement values only
The DirectInput mouse interface only supports relative
mouse movement. There is no 'absolute cursor position' -
mouse x, y, and z (wheel) positional values are negaitve or
positive values which are relative to the last time the
mouse's position was requested via cpwMouseState.
Window attachment
DirectInput requires that DirectInput mouse access be
associated with a window. On the first call to
cpwMouseState, Cpw will initialize the DI mouse interface
and attach it to the current foreground window.
You may create as many windows as you like, but only
one window will be DirectInput enabled.
To enable the DirectInput for mouse access interface in Cpw,
un-comment the following win32 specific compile directive in
cpw_config.h and compile the library:
/* #define CPW_DIRECTINPUT_MOUSEACCESS */
|