Re: LoadImages fails after X number of loads on same images
"Joseph M. Newcomer" wrote:
HANDLE hBmp=LoadImage(NULL,imagepath,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
****
This loads a bitmap. That's what it is supposed to do. Where you delete the >bitmap? How
big is the bitmap?
****
The bitmap is about 2.3 megs. It's the background for a screen of 1024X768.
I'm not sure where i can delete it. In my CBitmapButton subclass i'm able
to access the private members that holds the bitmaps and delete them. With
SetBitmap i haven't been able to locate anything of the sorts. When i step
into Setbitmap i get this line:
_AFXWIN_INLINE HBITMAP CStatic::SetBitmap(HBITMAP hBitmap)
{ ASSERT(::IsWindow(m_hWnd)); return (HBITMAP)::SendMessage(m_hWnd,
STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap); }
On the next step it returns to my subclass. So i have no idea where i can
try deleting at. Any insight to the workings of this would be appreciated.
Btw, Thanks for the tips.
****
Running out of GDI space is the most likely cause.
Why are you storing images in files instead of in the resource segment?
joe
****
80Megs of images kinda bloats the .exe and this is also so the language
capability of the app is dynamic and just needs a new folder added contaning
the new language. The app runs on a locked down touchscreen pc so the images
are safe in normal folders.
Thanks.