FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC Windows non modal behaviour ???
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Windows non modal behaviour ???
Posted: Thu Dec 28, 2006 08:21 PM

Hello Antonio,

My ppc app behaves very strange since i recompiled it with latest fwppc. It behaves exactly as if there was a nowait clause ... While it was waiting at each window for the control with the appropriated buttons.

any significant change in this area ? :?

Thanks

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Windows non modal behaviour ???
Posted: Thu Dec 28, 2006 09:08 PM
Richard Chidiak wrote:Hello Antonio,

My ppc app behaves very strange since i recompiled it with latest fwppc. It behaves exactly as if there was a nowait clause ... While it was waiting at each window for the control with the appropriated buttons.

any significant change in this area ? :-)

Thanks

Richard


Antonio

Modal is the default behaviour and should be the default behaviour in ppc.

I had to change all my Activate window to make them Modal

The default value is false (non modal) and i think it is wrong to define it this way.

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Windows non modal behaviour ???
Posted: Fri Dec 29, 2006 06:58 AM

Richard,

We implemented it this way to keep a similarity with FW for PC behavior and also because it is the default Windows API windows behavior.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Windows non modal behaviour ???
Posted: Fri Dec 29, 2006 07:20 AM

Antonio

The default Fw behaviour is SDI not MDI , You specify MDI To make it MDI.

FWPPC is going the reverse way.

Not a problem for me now, just not logical.

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Windows non modal behaviour ???
Posted: Fri Dec 29, 2006 08:47 AM

Richard,

There is no standard MDI in Windows Mobile.

In FWH the command ACTIVATE WINDOW is modal for the main window, same as in FWPPC, and in others windows it is non modal.

Traditionally dialog boxes are modal, and windows are non modal, except the main window.

Due to a design error in previous FWPPC builds the ACTIVATE WINDOW command was modal (for windows different from the main one), and recently we have changed it to non modal, and we added a clause to force it modal and provide backwards compatibility.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Windows non modal behaviour ???
Posted: Sat Jan 06, 2007 03:38 PM

Antonio

I do understand this, nevertheless the Modal Clausus is not working properly. My app uses exclusively windows (i have no dialogs in it). Adding the Modal clause make the app work again correctly but only once. When you quit the app now, you can not start the app again. You have to reset the computer to make it work again ....

I use windows and folders.

Any idea ?

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Windows non modal behaviour ???
Posted: Sat Jan 06, 2007 07:37 PM
Richard,

Please test this sample, here it works fine and you can run the app again and again with no problems. Please notice that the main window does not uses the MODAL clause, as it is modal by default:
// Using nested MODAL windows

#include "FWCE.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd TITLE "1"

   @ 2, 2 BUTTON "Another" OF oWnd SIZE 80, 20 ;
      ACTION Another()

   ACTIVATE WINDOW oWnd

return nil

function Another()

   local oWnd

   static nWindow := 2

   DEFINE WINDOW oWnd TITLE Str( nWindow++ )

   @ 2, 2 BUTTON "Another" OF oWnd  SIZE 80, 20 ;
      ACTION Another()

   ACTIVATE WINDOW oWnd MODAL

   nWindow--

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 58
Joined: Fri Oct 07, 2005 06:30 AM
Windows non modal behaviour ???
Posted: Sun Jan 07, 2007 04:44 AM
The problem is the folder.
If I add the folder, the program work fine only the first time.
When I close the application, the task remains active (I must kill the process with Task Manager).

// Using nested MODAL windows

#include "FWCE.ch"

function Main()

   local oWnd

   IF IsExeRunning( cFileName( HB_ArgV( 0 ) ) )
      MsgInfo( "The application is already running" )
      RETURN ( nil )
   ENDIF

   DEFINE WINDOW oWnd TITLE "1"

   @ 2, 2 BUTTON "Another" OF oWnd SIZE 80, 20 ;
      ACTION Another()

   ACTIVATE WINDOW oWnd

return nil

function Another()

   local oWnd, oFld

   static nWindow := 2

   DEFINE WINDOW oWnd TITLE Str( nWindow++ )

      @ 0,-0.5 FOLDER oFld PROMPTS "One","Two" ;
                           DIALOGS "ONE","TWO" SIZE 247, 270 BOTTOM

      REDEFINE BUTTON ID 101 OF oFld:aDialogs[1] ACTION Another()

      oFld:aDialogs[1]:Move(0,0)
      oFld:aDialogs[2]:Move(0,0)

      oFld:InitDialogs()

      //@ 2, 2 BUTTON "Another" OF oWnd  SIZE 80, 20 ;
      //ACTION Another()

   ACTIVATE WINDOW oWnd MODAL

   nWindow--

return nil

#ifdef _CE
   #include "c:\vce\include\arm\windows.h"
   #include "c:\vce\include\arm\commctrl.h"
#endif

ONE DIALOG 174, 80, 140, 142
STYLE 0x4L | WS_CHILD
{
 PUSHBUTTON "Another", 101, 35, 49, 50, 14
}

TWO DIALOG 178, 88, 140, 142
STYLE 0x4L | WS_CHILD
{
}


Regards
Pier Luigi
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Windows non modal behaviour ???
Posted: Sun Jan 07, 2007 08:42 AM

Antonio

As pier Luigi said, the problem is the folder.

When just windows, no problem.

Please advice when it is fixed,

Thanks and best regards

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Windows non modal behaviour ???
Posted: Sun Jan 07, 2007 09:49 AM
Richard, Pier,

In class TFolder please remove these two lines:
   if ::oWnd == WndMain()  // THIS!
      PostQuitMessage( 0 ) // Keep this one !
   endif // THIS!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Windows non modal behaviour ???
Posted: Sun Jan 07, 2007 10:14 AM

Antonio :D

Thanks

it works ok now

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 58
Joined: Fri Oct 07, 2005 06:30 AM
Windows non modal behaviour ???
Posted: Sun Jan 07, 2007 04:51 PM

Antonio,

now work fine :D

Regards.
Pier Luigi

Continue the discussion