MessageBox not shown when opened processing WM_CLOSE from taskbar thumbnail close button

Posted by Katana on Stack Overflow See other posts from Stack Overflow or by Katana
Published on 2010-05-26T09:08:29Z Indexed on 2010/05/26 9:11 UTC
Read the original article Hit count: 146

Filed under:
|
|
|
|

Trying to put up a "Do you want to save"-dialog when trying to close window with close-button in taskbar thumbnail in windows 7(with aero peek active).

Using MessageBox() when processing WM_CLOSE does not work. MessageBox won't show until you move mouse cursor outside thumbnail so aero peek is disabled.

Lots of applications have this buggy behaviour so it's probably a design flaw in Windows 7, but for some programs it works (Word, Notepad, Visual Studio, ...), so I'm wondering what trick they are using(or what it takes to "exit" aero peek-mode programmatically).

The small "Sound Recorder" application that comes with Windows 7 has the same problem (if you have recorded something without saving and try to close it using thumbnail close-button)...

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows