Microsoft KB Archive/135047

= How To Use Resource Editor for 16-Color 32x32 Mouse Pointers =

Article ID: 135047

Article Last Modified on 7/13/2004

-

APPLIES TO

 The Resource Editor, when used with:  Microsoft Visual C++ 2.0 Professional Edition

 Microsoft Visual C++ 2.1

 Microsoft Visual C++ 2.2

 Microsoft Visual C++ 4.0 Standard Edition</li></ul>

 Microsoft Visual C++ 4.1 Subscription</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q135047

<div class="summary_section">

SUMMARY
This article gives the steps necessary to use the Visual C++ Resource Editor to create 16-color, 32x32 mouse pointers (cursors) in Windows NT and Windows 95.

If Visual C++ version 2.x does not contain a Cursor Devices key in the system registry, the cursor editor uses the monochrome device description that you can use to create two-color, 32x32 mouse pointers.

To create colored mouse pointers (cursors), you need to have color display drivers. This article illustrates how you can add a display device entry to the system registry for Visual C++ in order to create 16 color, 32x32 pointers.

<div class="moreinformation_section">

MORE INFORMATION
You can have colored pointers only in Windows NT and Windows 95.

When creating a new pointer image using the Visual C++ Resource Editor, you first need to designate the target display device such as Monochrome, CGA, or EGA/VGA. When the pointer resource is opened, the image most closely matching the current display device is opened by default. In Visual C++, you can only select the Monochrome device when there is no Cursor Devices key entry in the system registry. This is the default case.

To create a colored pointer, you need to specify a color display device such as EGA/VGA as the target device in the Device list box of the Cursor Editor. If only the monochrome device is listed in the list box, you need to add other display devices to the list. You can do this by adding additional entries in the system Registry.

Perform the following steps to add the EGA/VGA display device in the system Registry as an example.

Windows NT

 * 1) Run \WindowsNT_diretory\System32\Regedt32.exe if you are running Visual C++ with Windows NT.
 * 2) If you have Visual C++ 4.0:

In the HKEY_CURRENT_USER, select Software\Microsoft\DEVELOPER.

If you have Visual C++ 2.0:

In the HKEY_CURRENT_USER, select Software\Microsoft\Visual 2.0.
 * 1) Add a key called "Cursor Devices" if you don't have one already. Leave the Class: field empty.
 * 2) Add the value EGA/VGA (32x32) in the Value Name field.
 * 3) Select REG_SZ as the data type.
 * 4) When prompted with a String Editor dialog box, specify 16,32,32.
 * 5) Finally the entry for the Cursor Devices should look like this:

EGA/VGA:REG_SZ:16,32,32.
 * 1) Close the Registry Editor.
 * 2) Restart Visual C++.

Windows 95

 * 1) Run \Windows95_directory\Regedit.exe (the Registry Editor) if you are running Visual C++ with Windows 95.
 * 2) If you have Visual C++ 4.0:

In the HKEY_CURRENT_USER, select Software\Microsoft\DEVELOPER.

If you have Visual C++ 2.0:

In the HKEY_CURRENT_USER, select Software\Microsoft\Visual 2.0.
 * 1) Add a key called "Cursor Devices" if you don't have one already. On the Edit menu, click New and then key. Then in the editor control, type Cursor Devices.
 * 2) Add the value EGA/VGA (32x32). On the Edit menu, click String and then Value. Then add the value.
 * 3) Specify the color and the dimension. On the Edit menu, click Modify when the String Value has the focus. Type 16,32,32 in the String Editor dialog box.
 * 4) Close the Registry Editor.
 * 5) Restart Visual C++.

Now, you can add the EGA/VGA device to the Device list box of the Cursor Editor. To do this:

On the Resource menu, click New and then Cursor to open the Cursor Graphic editor. Then on the Resource menu, click New Device Image, and select EGA/VGA (32x32) as the target device from the New Device Image dialog box. This will add EGA/VGA (32x32) to the Device list box. Selecting EGA/VGA as the device allows you to create color pointers.

By default, the Graphic Editor supports the creation of images for the following devices: <pre class="fixed_text">Device      Colors   Width   Height EGA/VGA     16       32      32 Monochrome  2        32      32 CGA         2        32      16

<div class="references_section">