3 Replies Latest reply on Jul 24, 2014 3:09 AM by Benedict Boemmerl

    Reopen Application Problem

    Benedict Boemmerl

      Hello all,

       

      I'm new to windows mobile and I have a problem to reopen my application during a message box.

       

      If I press the hardware-ok-button to minimize the app during normal forms, it works perfectly fine to reopen the app in the window "Running Programs". But if the app shows a message box (created by "CreateWindow(..)") and then I minimize it, it can't get reopened. Only the title of the messagebox is shown in the upper left corner. If I want to open the app again, i have to shut down the task and start it from the beginning.

       

      Of course there is something wrong with the code and it's not a general problem. It's a huge app and I didn't write it, so my question is: Did somebody experienced similar behaviour or/and know where to search for the mistake in the code?

       

      I hope somebody can help me with this problem.

       

      regards,

      Benedict Bömmerl

        • Re: Reopen Application Problem
          Daniel Silva

          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.

            • Re: Reopen Application Problem
              Benedict Boemmerl

              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.

            • Re: Reopen Application Problem
              Benedict Boemmerl

              Hello all,

               

              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.