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. ATL / WTL / STL
  4. how to close document handle

how to close document handle

Scheduled Pinned Locked Moved ATL / WTL / STL
tutorial
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.
  • V Offline
    V Offline
    VCsamir
    wrote on last edited by
    #1

    hi friends, i have have a MDI Application. when i close a document using onclosedocument. my document handle remains active though the members used in document are set to null. so i cannot check this condition if(doc) as it returns true. whereas in the if block it cannot access the members so app crashes eg.

    if(doc) //handle =FAEX000
    {
    doc->getprivatevariable_or_functions(); // the application crashes here
    }

    thanking in anticipation REgards Samir

    L 1 Reply Last reply
    0
    • V VCsamir

      hi friends, i have have a MDI Application. when i close a document using onclosedocument. my document handle remains active though the members used in document are set to null. so i cannot check this condition if(doc) as it returns true. whereas in the if block it cannot access the members so app crashes eg.

      if(doc) //handle =FAEX000
      {
      doc->getprivatevariable_or_functions(); // the application crashes here
      }

      thanking in anticipation REgards Samir

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      When you close your document set the variable to NULL to indicate that it no longer exists.

      I must get a clever new signature for 2011.

      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