Originally Posted by
Salem
I would say that you're not freeing some resource or other as you move from one picture to the next.
If you load more pictures on 2K/XP, no doubt the same problem will appear.
I agree with that assessment.
However, what is this "LoadFromFile" function? It does not seem to exist in MSDN?
Can you observe the memory usage of your program as you load successive images and tell us if there is anything unexpected?
Other than that, you can try:
Code:
m_hImage = LoadImage(GetModuleHandle(0), filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);