Example: Mouse Cursor Definition

The MCdemo program shows how to use the solid cross-shaped mouse cursor created earlier in this section. The 32-element Cross array holds the mouse cursor's screen mask, followed by its cursor mask. The WM_CREATE handler first calls fg_mouseini() to initialize Fastgraph's mouse environment. It then calls fg_mouseptr() to create the new mouse cursor with a hot spot in the center of the cursor.

Note that Windows restores the default mouse cursor shapes whenever we move the mouse cursor outside the MCdemo client area. Also, note that fg_mouseptr() and fg_mousecur() behave differently in Fastgraph for Windows than they do in Fastgraph for DOS. Under DOS, fg_mouseptr() activates the new mouse cursor immediately and has no return value, while fg_mousecur() performs the completely different task of defining a mouse cursor in text video modes.

C/C++ version

C++Builder version

Delphi version

<< Prev

Next >>

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.