Solved

Resource Dll

Posted on 1998-12-17
1
238 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 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

627 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