[win32 API] Load & Show Images from Resource

Hi,

I want to create "loading" animation, I have 4 images in resource, how can I show one of them at selected 'point' and then delete it?

Thanks!
The way you ask the question reveals that you haven't explored animation in Windows. You should start there.

A summary: After you load your 4 images, you run a timer. On timer, you blit the next image in the animation. If the images are not of the same size, you might need to clear the background, but if they are the same size, usually the background needs no cleaning.

Are you familiar with GDI or GDI+?
After you load your 4 images, you run a timer. On timer, you blit the next image in the animation.
how can I show one of them at selected 'point' and then delete it?


you blit the next image
how can I show one of them


u got it? :)
Yeah, I think I get it: You don't know the basics about graphics. You need to start there.

The function called BitBlt() is the one used to show images on screen. Study that one. Animating would be the combination of this function plus the processing of a timer. If you don't know about times, study SetTimer()/KillTimer(). This generates a windows message (WM_TIMER). If you don't know about windows messages, then study about the basics of Windows programming.
and if I'll use thread to show one picture and after 0,5 sec (Sleep(500)) it will show another one? will it work?
Using another thread is complex and sometimes impossible because UI objects should only be accessed by the thread that created them. Ideally, you don't mess with UI objects like this. Stick with timers.
ok, but I have another problem, I can't show image with BitBlt() in one window but I can show it with SAME code in another window (I'm using dialogboxes, one is created with DialogBox and second with CreateDialog, is this because of I have another command to create dialog?)
Topic archived. No new replies allowed.