Preventing Hangs in Windows Applications

Preventing Hangs in Windows Applications

Has anyone else had this sort of problem as described below?

'Preventing Hangs in Windows Applications'
http://msdn.microsoft.com/en-us/library/dd744765%28v=vs.85%29.aspx

This is a problems with Windows7.

I am in the process of changing my program to get it to work - which I'm finding difficult - has anyone else had experiance with this problem?

Thanks

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

As pointed out in the msdn article, the hanging is not a Windows (7) problem, it is an application problem. Although on XP the problem might not have been observed (onther than for unresponsiveness). The recommended cure is to make your User Interface and compute portions of your application run in seperate threads. My preference is to is to have the "console"application use CreateThread to launch the UI. Although you can as easily have a main UI thread use CreateThread to spawn worker thread(s).

Jim Dempsey

www.quickthreadprogramming.com

I'm getting a problem with application hanging on Windows 7 when I block using a message loop to capture mouse messages to enable the user the use the mouse for selection or manipulation of the display. This problem does not occur in XP (it started to appear with Vista). When I'm working within Visual Studio everything works fine but as soon as I start running the application from the desktop the hanging problem starts to occur but in a random way.

As most users are about to upgrade their PC's (operting system) to Win 7 (or 8) solving this problem has become a priority.

I've tried using the Spyxx tool to monitor windows in order to try to debug the problem but it does pick up any messages.

The MSDN article mentions the function DisableProcessWindowsGhosting () but implies that this might have unwanted side effects.

I would greater appreciate any advice on a way forward.

Cita:

dannycat escribió:
I'm getting a problem with application hanging on Windows 7 when I block using a message loop to capture mouse messages to enable the user the use the mouse for selection or manipulation of the display.

If I understand it correctly, you are interrupting window message processing in order to do things in response to mouse messages. I guess you have to have subclassed a window to be able to do this. If so, you must be sure to pass on messages to the correct default window message handler after you have done your own stuff or else if you do not, you can expect to find funny things happening as a result.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya