A version of this page is also available for
This function enables an application to define and load a customized, animated wait cursor.
WINUSERAPI HCURSOR WINAPI LoadAnimatedCursor( HINSTANCE hInstance, DWORD ResourceId, int cFrames, int FrameTimeInterval );
[in] Handle to the instance of the module for which the executable file contains the bitmap that you want to load. You should use bitmaps that are 48 x 48 pixels only.
[in] DWORD that specifies the resource identifier of the first bitmap that you want to use for the animated wait cursor. You must create the resource identifier by calling the MAKEINTRESOURCE macro.
[in] Integer that specifies the number of bitmaps that you want to use in the animation. You must order the bitmaps consecutively in the resource file, starting with the one identified by ResourceId. For example, if you created ResourceId by calling MAKEINTRESOURCE with a value of 300, you must create identifiers for the subsequent frames by calling MAKEINTRESOURCE with values of 301, 302, and so on.
[in] Integer that specifies the amount of time, in milliseconds, that you want to display a frame before the next frame replaces it.
If hInstance is NULL and you set ResourceId to IDC_WAIT, this function loads the default system wait cursor and ignores FrameTimeInterval.
You should only use a bitmap with a width and height of 48 pixels. If you use a bitmap of a different size, this function aligns the top-left pixel of the bitmap with the top-left pixel of the wait cursor window and draws only the portion of the bitmap that fits within a 48 x 48 pixel area.
This function is supported only if the OEM includes the Mouse catalog item in the OS image. If the function is not supported, the function fails and returns the ERROR_CALL_NOT_IMPLEMENTED error.
|Windows Embedded CE||Windows CE .NET 4.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|