MetaFiles
-
I currently developing a program and it is workable, but somehow when i turn on the program for a long time(15 minutes depends on how big the computer memory is) then it will hang. I check out that when i add a component which is inside my program, for example a bitmap file into my program. The computer memory starts to increase rapidly everytime i add a component. I been using meta files to store this added components but i have no idea how to remove the metafiles that is added, can anyone here help me. I'll be really grateful From: Guibert ;)
-
I currently developing a program and it is workable, but somehow when i turn on the program for a long time(15 minutes depends on how big the computer memory is) then it will hang. I check out that when i add a component which is inside my program, for example a bitmap file into my program. The computer memory starts to increase rapidly everytime i add a component. I been using meta files to store this added components but i have no idea how to remove the metafiles that is added, can anyone here help me. I'll be really grateful From: Guibert ;)
Same problem i faced yesterday and fixed it. In my case i was creating a DISPLAY DC and one Compatible DC and one Bitmap memory through CreateDIBSection API call. hdc = CreateDC("DISPLAY",NULL,NULL,NULL); Bitmap = CreateDIBSection(hdc, pBMI, DIB_RGB_COLORS, (void**)&m_pVideoBits, 0, 0); HDC hSrcDC = CreateCompatibleDC(hdc); SelectObject(hSrcDC, m_hViewfinderBitmap); while Deleting the Bitmap and DC you should follow the following way DeleteDC(hSrcDC); DeleteObject(Bitmap); DeleteDC(hdc); If your code also have some this kind of thing then please take care that, you should not clean a bitmap untill it is attached to the DC Hope i could help you some way. Regards Anil Kumar