Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MetaFiles

MetaFiles

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialgraphicsperformancehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    popo84
    wrote on last edited by
    #1

    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 ;)

    B 1 Reply Last reply
    0
    • P popo84

      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 ;)

      B Offline
      B Offline
      badal_akr
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups