INF: Considerations For CreateCursor And CreateIcon Functions

ID Number: Q73667

3.00 3.10

WINDOWS

Summary:

An application can use the CreateCursor and CreateIcon functions

to create icons and cursors on the fly. The application determines

the shape at run time.

When the shape of the icons and the cursors is known in advance, an

application should use the LoadIcon and LoadCursor functions.

An application that uses the CreateIcon function must call the

DestroyIcon function to free the memory used by the icon when it is

no longer needed. An application that uses the CreateCursor function

must call the DestroyCursor function to release the memory used by

the cursor when it is no longer needed.

An application can call the DestroyIcon and DestroyCursor functions

only when the icon or the cursor is not in use. For example, if the

cursor created by the CreateCursor function has been specified in a

SetCursor call, it must not be destroyed until it has been released

by another SetCursor call.

An application can only use the DestroyIcon and DestroyCursor

functions to destroy icons and cursors created by the CreateIcon and

CreateCursor functions. It should not try to destroy icons and

cursors loaded with the LoadIcon and LoadCursor functions.

Additional reference words: 3.00 3.10 3.x