Working with WM_DESTROY
-
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 ^
-
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 ^
Handle the
WM_CLOSE
message.--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
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 ^
Use function callback WindowProc and check parameter uMsg is WM_DESTROY ------------------ conglt
-
Handle the
WM_CLOSE
message.--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
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 ^
-
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 ^