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. DestroyWindow Issues

DestroyWindow Issues

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

    I'm using CFormView in my program, and in one of my handlers, I open a new view and attempt to close the current. I call DestroyWindow() to kill the window. When I run it, the new form opens and the old one ends up behind it, but doesn't close. Everything inside the form turns to white, but the frame around it stays and can be repositioned as it normally does. It's as if the form itself has closed, but it has left the frame behind. Has anyone seen this? I've also tried posting a WM_CLOSE message, but that does nothing at all. Can someone please help?

    T 1 Reply Last reply
    0
    • T tjkrz

      I'm using CFormView in my program, and in one of my handlers, I open a new view and attempt to close the current. I call DestroyWindow() to kill the window. When I run it, the new form opens and the old one ends up behind it, but doesn't close. Everything inside the form turns to white, but the frame around it stays and can be repositioned as it normally does. It's as if the form itself has closed, but it has left the frame behind. Has anyone seen this? I've also tried posting a WM_CLOSE message, but that does nothing at all. Can someone please help?

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Are you destroying the view, or its frame? Tomasz Sowinski -- http://www.shooltz.com

      What is "scratch" and why can everything be made from it?

      T 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Are you destroying the view, or its frame? Tomasz Sowinski -- http://www.shooltz.com

        What is "scratch" and why can everything be made from it?

        T Offline
        T Offline
        tjkrz
        wrote on last edited by
        #3

        I guess it's the View. How can i destroy the Frame?

        T 1 Reply Last reply
        0
        • T tjkrz

          I guess it's the View. How can i destroy the Frame?

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          GetParentFrame()->DestroyWindow(); Tomasz Sowinski -- http://www.shooltz.com

          What is "scratch" and why can everything be made from it?

          T 1 Reply Last reply
          0
          • T Tomasz Sowinski

            GetParentFrame()->DestroyWindow(); Tomasz Sowinski -- http://www.shooltz.com

            What is "scratch" and why can everything be made from it?

            T Offline
            T Offline
            tjkrz
            wrote on last edited by
            #5

            Ahhh...excellent. Thank you very much.

            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