The Examples/Tutorials/Tutorial2 folder contains an MSVC project called tutorial2_win.dsp and a GNU makefile.
tutorial2_win.dsp project and select a configuration that you wish to build. Choose "Win32 D3D8 Debug" if you are unsure. Build the application. It is identical to the code that you wrote in the first tutorial.
In the previous tutorial we saw how the keyboard handler could be established to catch keyboard events. In order to catch mouse events we need to set up a mouse handler.
win/events.c file, and locate the HandleMouseMove() function. This is called (via the MouseHandler() function) any time that the mouse moves in the application window. Put a breakpoint on this function and debug the application. Confirm that this function gets called when the mouse moves. The other mouse event handling routines will work in an identical manner.
© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:46:57 2004.
Send Feedback