Solved

Resource Dll

Posted on 1998-12-17
1
235 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
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

828 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