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. Exception in ~CFrameWnd

Exception in ~CFrameWnd

Scheduled Pinned Locked Moved C / C++ / MFC
help
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.
  • N Offline
    N Offline
    nutkase
    wrote on last edited by
    #1

    Can anyone please tell me .... how the m_pPushRoutingFrame member of CThreadState be NULL. i mean i have an application when i close the ChidlFrame in it... i get an execption the reason is that the m_pPushRoutingFrame member of CThreadState in the destructor of CFrameWnd is NULL.... :( if anyone know anything about it please help... thankx in advance. P.S there are no threading in my application. shoaib.

    N 1 Reply Last reply
    0
    • N nutkase

      Can anyone please tell me .... how the m_pPushRoutingFrame member of CThreadState be NULL. i mean i have an application when i close the ChidlFrame in it... i get an execption the reason is that the m_pPushRoutingFrame member of CThreadState in the destructor of CFrameWnd is NULL.... :( if anyone know anything about it please help... thankx in advance. P.S there are no threading in my application. shoaib.

      N Offline
      N Offline
      Nick Nougat
      wrote on last edited by
      #2

      Probably MFC tries to delete your CFrameWnd on application exit, but you have allocated it on the stack. MFC expects that frame windows are 'automatically allocated' by the framework, as they are when you use the 'normal' MDI/SDI approach with the wizards. They get automatically deleted when the application shuts down. Therefore, if you create a CFrameWnd manually, you have to allocate it via new and must not delete it on application exit. The framework does this for you... This is one of the more obscure "features" of MFC, for which I never found any documentation... Hope this helps, Nick EDIT: some typos

      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