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. Working with WM_DESTROY

Working with WM_DESTROY

Scheduled Pinned Locked Moved C / C++ / MFC
c++comjsonquestionlearning
5 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.
  • A Offline
    A Offline
    Axonn Echysttas
    wrote on last edited by
    #1

    Hi people ::- ). I'm working at a wrapper over the Win32 API that will be able to create lots of types of windows, some with tons of special behaviors. This component will be open source and I'll post it here when it's going to be ready. One of the things I'm trying to do is to override how the window gets destroyed. To do this, I got to play a little with the close button of the window. When one presses this button, the window dies directly. I want to integrate a special behavior which will give me total control of when the window should be destroyed completely. Of course, as you might have already guessed, since this is a Win32 API, I got full control of all messages BUT NO MFC. So how do you think I could override those WM_DESTROY messages? Thank you in advance ::- D. -= E C H Y S T T A S =- The Greater Mind Balance Blending C++ with COM ^

    M L C 3 Replies Last reply
    0
    • A Axonn Echysttas

      Hi people ::- ). I'm working at a wrapper over the Win32 API that will be able to create lots of types of windows, some with tons of special behaviors. This component will be open source and I'll post it here when it's going to be ready. One of the things I'm trying to do is to override how the window gets destroyed. To do this, I got to play a little with the close button of the window. When one presses this button, the window dies directly. I want to integrate a special behavior which will give me total control of when the window should be destroyed completely. Of course, as you might have already guessed, since this is a Win32 API, I got full control of all messages BUT NO MFC. So how do you think I could override those WM_DESTROY messages? Thank you in advance ::- D. -= E C H Y S T T A S =- The Greater Mind Balance Blending C++ with COM ^

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

      Handle the WM_CLOSE message.

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

      A 1 Reply Last reply
      0
      • A Axonn Echysttas

        Hi people ::- ). I'm working at a wrapper over the Win32 API that will be able to create lots of types of windows, some with tons of special behaviors. This component will be open source and I'll post it here when it's going to be ready. One of the things I'm trying to do is to override how the window gets destroyed. To do this, I got to play a little with the close button of the window. When one presses this button, the window dies directly. I want to integrate a special behavior which will give me total control of when the window should be destroyed completely. Of course, as you might have already guessed, since this is a Win32 API, I got full control of all messages BUT NO MFC. So how do you think I could override those WM_DESTROY messages? Thank you in advance ::- D. -= E C H Y S T T A S =- The Greater Mind Balance Blending C++ with COM ^

        L Offline
        L Offline
        Le Thanh Cong
        wrote on last edited by
        #3

        Use function callback WindowProc and check parameter uMsg is WM_DESTROY ------------------ conglt

        1 Reply Last reply
        0
        • M Michael Dunn

          Handle the WM_CLOSE message.

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          A Offline
          A Offline
          Axonn Echysttas
          wrote on last edited by
          #4

          Thank you Mike, that worked. You're in the "Thanks to..." list *laugh* ::- D. No, really, you are ::- ). -= E C H Y S T T A S =- The Greater Mind Balance Blending C++ with COM ^

          1 Reply Last reply
          0
          • A Axonn Echysttas

            Hi people ::- ). I'm working at a wrapper over the Win32 API that will be able to create lots of types of windows, some with tons of special behaviors. This component will be open source and I'll post it here when it's going to be ready. One of the things I'm trying to do is to override how the window gets destroyed. To do this, I got to play a little with the close button of the window. When one presses this button, the window dies directly. I want to integrate a special behavior which will give me total control of when the window should be destroyed completely. Of course, as you might have already guessed, since this is a Win32 API, I got full control of all messages BUT NO MFC. So how do you think I could override those WM_DESTROY messages? Thank you in advance ::- D. -= E C H Y S T T A S =- The Greater Mind Balance Blending C++ with COM ^

            C Offline
            C Offline
            CodeVarma
            wrote on last edited by
            #5

            Handel WM_DESTROY in ur Button or use PostMessage() call in your button. Fly Like An Eagle With MIGHTY POWER.

            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