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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Handling Close View event

Handling Close View event

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

    I am searching for a good way to inform an object which paints into a CView window if the user tries to close the view. It's very important for me that my paint object first stops its painting and then do an deinitialization before the view can be closed. So I must catch the close event, send an information to the paint object and then send the close message again to the view. Any good ideas? Thanks in advance.

    B 1 Reply Last reply
    0
    • C CodeBrain

      I am searching for a good way to inform an object which paints into a CView window if the user tries to close the view. It's very important for me that my paint object first stops its painting and then do an deinitialization before the view can be closed. So I must catch the close event, send an information to the paint object and then send the close message again to the view. Any good ideas? Thanks in advance.

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

      Try adding a handler for OnDestroy() to your view. Call your deinit routine, and then call the base class CView::OnDestroy().  onwards and upwards...

      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