DirectX SDK |
This topic pertains only to application development in C and C++. See DirectInput Visual Basic Samples.
The Scrawl application demonstrates use of the mouse in exclusive mode in a windowed application.
Source: (SDK root)\Samples\Multimedia\DInput\Src\Scrawl
Executable: (SDK root)\Samples\Multimedia\DInput\Bin
The main mouse button is always the left button, and the secondary button is always the right button, regardless of any settings the user may have made in Control Panel.
To scrawl, hold down the left button and move the mouse. Click the right mouse button to invoke a pop-up menu. From the pop-up menu you can clear the client window, set the mouse sensitivity, or close the application.
The Scrawl application demonstrates many aspects of DirectInput programming, including the following: