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. Destroying ModalDialog

Destroying ModalDialog

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 4 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.
  • P Offline
    P Offline
    pix_programmer
    wrote on last edited by
    #1

    I'm opening a Modal Dialog inside a Modal Dialog. While destroying the second Dialog, application crashes at the following assert condition:

    ASSERT(::IsWindow(m_hWnd))

    in the file afxwin2.inl. How to destroy a Modal Dialog which is popped up inside another modal Dialog?

    D A B 3 Replies Last reply
    0
    • P pix_programmer

      I'm opening a Modal Dialog inside a Modal Dialog. While destroying the second Dialog, application crashes at the following assert condition:

      ASSERT(::IsWindow(m_hWnd))

      in the file afxwin2.inl. How to destroy a Modal Dialog which is popped up inside another modal Dialog?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      pix_programmer wrote:

      How to destroy a Modal Dialog which is popped up inside another modal Dialog?

      It typically "destroys" itself by the user clicking the OK or Cancel button, or pressing the Esc key.

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather

      1 Reply Last reply
      0
      • P pix_programmer

        I'm opening a Modal Dialog inside a Modal Dialog. While destroying the second Dialog, application crashes at the following assert condition:

        ASSERT(::IsWindow(m_hWnd))

        in the file afxwin2.inl. How to destroy a Modal Dialog which is popped up inside another modal Dialog?

        A Offline
        A Offline
        Albert Holguin
        wrote on last edited by
        #3

        This ASSERT is telling you the window doesn't exist anymore, like it was already suggested, modal dialogs don't typically get manually destroyed (although they can be).

        1 Reply Last reply
        0
        • P pix_programmer

          I'm opening a Modal Dialog inside a Modal Dialog. While destroying the second Dialog, application crashes at the following assert condition:

          ASSERT(::IsWindow(m_hWnd))

          in the file afxwin2.inl. How to destroy a Modal Dialog which is popped up inside another modal Dialog?

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

          Call EndDialog() method to have the second dialog destroyed properly.

          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