|Microsoft DirectX 9.0|
The Scrawl application demonstrates using the mouse in exclusive mode in a windowed application. It functions in the same way as a pencil tool in a paint program.
Source: (SDK root )\Samples\C++\DirectInput\Scrawl
Executable: (SDK root )\Samples\C++\DirectInput\Bin\Scrawl.exe
To draw, hold down the left mouse button and move the mouse. Click the right mouse button to invoke a shortcut menu. From the shortcut menu you can clear the client window, set the mouse sensitivity, or close the application. If the mouse buttons have been switched through Control Panel settings, Scrawl will detect and mimic this behavior. Note that Microsoft?DirectInput?ignores Control Panel settings and the application itself must make the switch.
The Scrawl sample program demonstrates many aspects of DirectInput programming, including the following: