Board index » Visual Studio » Receiving windows message after mainframe is destroyed
|
metrueblood
|
Receiving windows message after mainframe is destroyed
Visual Studio259
Hi I am posting this again - not having heard anything in several days. Please let me know if there is another group I shoudl post this to. ------ I am stuck and could use any suggestion. My application (MSVC 6 & MFC) uses a mainframe that is hidden soon after it is created & uses a tray icon for user interactions. I have had no problem for quite some time - till I upgraded from WinXP home - SP1 to WinXP rpo XP2. The application crashes on exit in the debug mode. The error is an ASSERT in CWnd::WalkPretranslateTree. This function is checking if any windows wants to translate the message and the last window being checked is my mainframe which has been destroyed by now (the problem occurs after OnNcDestroy in my CMainFrame which calls CFrameWnd::OnNcDestroy. The message itself is a registered window message. My application registers many Windows messages and this message is NOT in the range of the messages that my application registers - and it is not one that my application registers (are there messages that is registered on behalf of my application that I do no know about?). Is there anything I can do to check/clear all the messages in the queue before I call CFrameWnd::OnNcDestroy? This problem does not occur in my other XP machine which is yet to be upgraded to SP2. How can I track this problem? How can I find out where this registered message is coming from? I am not familiar with SPY++ - perhaps someone can tell me how I can use it or some other tool to track the source of this message & see where my problem is? - |
