In a Windows Mobile app, pressing OK usually means you are actually closing something. Pressing an X icon is minimizing. When Microsoft went from Windows Mobile 6.1 to Windows Mobile 6.5.3 (now known as Windows Embedded Handheld 6.5.3), they made some UI changes that broke some apps. I suspect that this is what you are seeing. Your app was probably written for a Windows Mobile 6.5 or earlier device. See the last page of the attached doc for an explanation. If you have access to the code, you can adjust the dialog boxes to fix this. If not, the only workaround I've seen is the one you found, use the hardware OK button.
WM65Brief.doc 1.5 MB
First of all, thank you very much for your answer!
It is true, that the program is written for Windows Mobile 6.5. But the Error occures on 6.5, too.
Nevertheless I tried to add "SHIDIF_EMPTYMENU" but unfortunately it still doesn't work to reopen the application.
Daniel Silva schrieb:
If not, the only workaround I've seen is the one you found, use the hardware OK button.
It is not the problem to get OUT of the App. The problem is to get IN after i used the hardware-ok-button. But this ONLY occures if I leave the app during a messagebox.
I found the solution to my problem. I write it in here, in case somebody have the same problem.
The message-boxes stopped the main-loop and created a "side-loop" to process the incoming messages on the window. The side-loops "::GetMessage(..)"-Funktion got called with a "HWND" instead of "NULL". So the Funktion only listened to THIS hwnd and doesn't care about leaving and reopen the application.