PRB: Using Animation Resources with the Animation Control

Last reviewed: April 11, 1996
Article ID: Q149688
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) version 4.0
  • Microsoft Win32s version 1.3

SYMPTOMS

When sending the ACM_OPEN message to an animation control, you have the option of using an ANI file or an ANI resource. When you specify a resource, you cannot specify which module to load that resource from.

CAUSE

When loading an animation resource, the control uses the hInstance that it was created with (the hInstance passed to CreateWindow, DialogBox, or CreateDialog).

RESOLUTION

Use an animation file or store the animation resource in the same module from which the animation control was created. One other alternative, which is probably not a good idea, is to retrieve the resource by using FindResource, LoadResource, and LockResource, and then save that to a temporary animation file. The drawback to this method is that you need to make sure that the temporary file is deleted.

STATUS

This behavior is by design.


Additional reference words: 1.30 4.00
KBCategory: kbprg kbui kbprb
KBSubcategory: UsrCtl w32s


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 11, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.