Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Resource Dll

Posted on 1998-12-17
1
Medium Priority
?
240 Views
Last Modified: 2011-09-20
I have a resource dll of bmps that I am using to hold the frames of an animation sequence.  When the dll is first loaded the animation plays slowly on the first pass.  After that the animation plays much quicker...
Is there a way to somehow preload the resource to speed the initial pass through?
0
Comment
Question by:gpaige
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 200 total points
ID: 1180427
Yes and you already have the answer your hands....

Make a dummy pass of LoadBitmaps and retain the handles, say in an array)

Re-use these handles each time you play the animation (rather than doing LoadBitmap each time you play a frame, which of course is the cause of your variable speed).

Another solution is to call a (dummy) function in the DLL or access a dummy resource, before playing the animation.  This is not as good.  If the DLL is large, it will tend to get swapped out, again cause variable speed.

Finally one suggestion I think you  should consider is to use an AVI and the animation control (CAnimateCtrl in MFC, but you can also use these in non-MFC programs).  This seems to rarely suffer from this kind of problem
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question