Visual C++ and MFC Fundamentals Chapter 3: Windows Resources
If you do not want to show a cursor, you can use the Wind32 API ShowCursor()
function. Its syntax is:
int ShowCursor(BOOL bShow);
To hide a cursor, specify the argument as FALSE.
Practical Learning: Creating a Cursor
- To create a new cursor, on the main menu, click Project -> Add Resource
- In the Insert Resource or Add Resource dialog box, click Cursor and click New
- In the Resource View, right-click the name of the cursor and click Properties
- Change its ID to IDC_APP_CURS and its Filename to appcurs.cur
- On the Toolbox, click the Line tool and select the black color
- Design the cursor as follows:
- To define the hot spot, on the toolbar of the editor, click the Set Hot Spot button
. Click the middle of the square: - Save All
- Close the Cursor Properties window.