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. Close view from OnUpdate?

Close view from OnUpdate?

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

    What is the best way to close (i.e., destroy) a view from its OnUpdate operation? I don't want to close the document. Currently, I am aware of the following options. I am not sure if they'd all work, or which would work best. 1. CDocument::RemoveView() 2. Post WM_CLOSE 3. Post WM_DESTROY Any help is much appreciated. Marc

    M 1 Reply Last reply
    0
    • M Marc Tompkins

      What is the best way to close (i.e., destroy) a view from its OnUpdate operation? I don't want to close the document. Currently, I am aware of the following options. I am not sure if they'd all work, or which would work best. 1. CDocument::RemoveView() 2. Post WM_CLOSE 3. Post WM_DESTROY Any help is much appreciated. Marc

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Post a WM_CLOSE. When the view gets that message, it will handle the rest for you. --Mike-- http://home.inreach.com/mdunn/ #include "buffy_sig"

      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