I am using Microsoft visual C++ 8 for development. In this i am loading 72 images into application.
I am trying to show a progress bar while my process is going on.i.e loading images.., while this progress is under process minimize the current application and maximize the progress bar is not working properly that means application shows blank area.
For this you need to understand multi-threading and how it effects your program.
Without knowing your code and from what you posted I take it that you are loading the images in your main or UI thread. visual C++ will make a new thread for you application to run in, this means your code and the UI will run in this thread. Your UI is updated when the program is not doing anything, this is a complicated but very efficient system build in to windows that tests if your interface needs to be updated (redrawn to the screen). But a thread (any thread) can only do one thing at a time. Your code has priority over lower functions like updating so when you start loading the images all resource of your thread go to doing so, and the UI will 'frees' and not update since something else (the loading function) is using it. To fix this you need to run your loading function in a new thread and make callbacks to the UI or main thread updating the progressbar. This is not so simple if you don't know multi-threading and needs invocations from the UI back to your thread to avoid that the UI uses data that is already outdated or still being used by the other thread.
To make it simpler to do this .net has a build in class that handles all this threading stuff you don't want to be thinking of when doing something as simple as a loading screen. This is called a BackgroundWorker, This allows you to simply execute a function in a different thread and has a build-in event to make callbacks to update your progressbar or any outer UI element that needs updating.
What you need to do is run your loading function inside a BackGroundWorker by using the backgroundWorker->DoWork event.
Then need to listen to the backgroundWorker->ProgressChanged event every time this event is raised it will pass a int or a int and object that you'll use to update your progressbar.
This will be raised every time the ProgressChanged(int, object) or ProgressChanged(int) function is called, the int will be your progress (in percentages or whatever you like) and the optional object can be used to pass along more information.
In your loading code you need to call the BackGroundWorker->ProgressChanged(int, object) or BackGroundWorker->ProgressChanged(int) function, this will raise the backgroundWorker->ProgressChanged event for you.