user32: Add support for loading animated cursors/icons from resources.

This commit is contained in:
Alexandre Julliard 2011-04-20 11:16:18 +02:00
parent 8970e29f44
commit 513e5c98a7
1 changed files with 9 additions and 1 deletions

View File

@ -1403,7 +1403,15 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
if (!(hRsrc = FindResourceW( hInstance, name,
(LPWSTR)(fCursor ? RT_GROUP_CURSOR : RT_GROUP_ICON) )))
return 0;
{
/* try animated resource */
if (!(hRsrc = FindResourceW( hInstance, name,
(LPWSTR)(fCursor ? RT_ANICURSOR : RT_ANIICON) ))) return 0;
if (!(handle = LoadResource( hInstance, hRsrc ))) return 0;
bits = LockResource( handle );
return CURSORICON_CreateIconFromANI( bits, SizeofResource( hInstance, handle ),
width, height, depth, !fCursor, loadflags );
}
/* Find the best entry in the directory */