Windows non modal behaviour ???

Windows non modal behaviour ???

Postby Richard Chidiak » Thu Dec 28, 2006 8: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Windows non modal behaviour ???

Postby Richard Chidiak » Thu Dec 28, 2006 9: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Fri Dec 29, 2006 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Richard Chidiak » Fri Dec 29, 2006 7: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Fri Dec 29, 2006 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Richard Chidiak » Sat Jan 06, 2007 3: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Sat Jan 06, 2007 7: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:
Code: Select all  Expand view
// 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Pier Luigi » Sun Jan 07, 2007 4: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).

Code: Select all  Expand view
// 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
User avatar
Pier Luigi
 
Posts: 58
Joined: Fri Oct 07, 2005 6:30 am
Location: Rome - Italy

Postby Richard Chidiak » Sun Jan 07, 2007 8: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Sun Jan 07, 2007 9:49 am

Richard, Pier,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Richard Chidiak » 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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Pier Luigi » Sun Jan 07, 2007 4:51 pm

Antonio,

now work fine :D

Regards.
Pier Luigi
User avatar
Pier Luigi
 
Posts: 58
Joined: Fri Oct 07, 2005 6:30 am
Location: Rome - Italy


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 14 guests