Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: VC++ Application Crash in Windows-7

23 Mar 2011   #1

Windows 7 Ultimate 32 Bit
VC++ Application Crash in Windows-7

We have a legacy application that was developed in MFC/VC++ in Visual Studio 6 Compiler. This application works perfectly in Windows XP. But in Windows 7 it crashes.
Actually the Application has a MultiSelect MFC Treeview. While clicking on the nodes of the treeview, the application crashes. Same scenario in WinXP works well

We tried installing both Microsoft Visual C++ 2005 Redistributable Package and Microsoft Visual C++ 2008 Redistributable Package on our machine as mentioned in the post The application developed by VC++ 6.0 but crashed in Windows 7 , but nothing worked.

We did some analysis and found that in the TVN_SELCHANGED event of the treeview, we were sending a custom message to its parent using the call

AgCFunctionalPortsInfo *address = (AgCFunctionalPortsInfo*)m_tree.GetItemData(item);
GetParent()->SendMessage(AG_PORT_CLICKED, (DWORD)address, 0);

But no where in our code, we were handling the custom message AG_PORT_CLICKED. When we commented the following line, it stopped crashing in Windows 7 also

GetParent()->SendMessage(AG_PORT_CLICKED, (DWORD)address, 0);

Now we would like to know the reason for this behavior. Is there any API change happened in windows 7 in this area that is causing the application to crash when there is no handling of custom message sent to a window?

My System SpecsSystem Spec


 VC++ Application Crash in Windows-7

Thread Tools

Similar help and support threads for2: VC++ Application Crash in Windows-7
Thread Forum
How does kernelbase.dll crash an application? General Discussion
Application Crash Without Reason? BSOD Help and Support
Solved Application Crash BSOD Help and Support
Application crash Software
Application crash on Window 7 BSOD Help and Support
Crash when printing from a certain application BSOD Help and Support
Application crash attempting to run it Software

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:42 AM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33