Windows mobile 6.1 build SO CE 5.2.20764

Post Reply
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

the combobox in windows mobile 6.1 build SO CE 5.2.20764 not open with FWPPC
I want to work in the window and not in dialg.

the example ... \ samples \ tutor08.prg does not work but work ...\samples\combos.prg


Version SO CE 5.2.20764 is the last build OF WM6.1

in the previous version everything works ok, the problem is my client uses this version of windows mobile in HTC Touch Dimond

best regards
Sérgio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by Antonio Linares »

Sérgio,

Please test this example:

Code: Select all

#include "FWCE.ch"   
 
function Main()         
 
   local oDlg, cValue, aData := { "one", "two", "three" }         
 
   DEFINE WINDOW oWnd
 
   @ 2, 2 COMBOBOX cValue ITEMS aData SIZE 80, 80
 
   ACTIVATE WINDOW oWnd   
 
return nil 
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

this example not open the combobox, in Windows Mobile 6.1 build SO CE 5.2.20764

the previous version works fine


this bug is true only in the last version of windows 6.1
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

Example 1 -> in dialog works well in all versions of windows mobile
#include "FWCE.ch"
function Main()
local oDlg, cValue :="One"
DEFINE DIALOG oDlg TITLE "Combos" SIZE 200, 100
@ 1, 1 COMBOBOX cValue ITEMS { "One", "Two", "Three" } OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil


Example 2
this version SO CE 5.2.20764 does not work the combobox do not open :( Why?

in version SO CE 5.2.19965 works ok

#include "FWCE.ch"
function Main()
local oWnd, cValue :="One"
DEFINE window oWnd TITLE "Combos"
@ 1, 1 COMBOBOX cValue ITEMS { "One", "Two", "Three" } OF oWnd
ACTIVATE window oWnd
return nil

finally the bug is in the window "DEFINE WINDOW", in the DIALOG Class works fine..
My program has thousands der lines please analize the bug, my client has the 35 PDA's in standby

any idea?, thank you
Best Regards
Sérgio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by Antonio Linares »

Sérgio,

WM 6.1 5.2.20764 may have changed a notification value. Its simple to locate it and fix it :-)

Please copy the entire source\classes\window.prg contents at the bottom of the example that I provided you. Then, move these lines to the top of the PRG:

Code: Select all

static oWndMain, oWndDefault, oToolTip
static aWindows := {}
 
Comment this line in FiveWin.ch:

Code: Select all

      // static bError
 
Now we need to modify Method Command() as it is the one that receives the notifications:

Code: Select all

METHOD Command( nWParam, nLParam ) CLASS TWindow

   local nNotifyCode := nHiWord( nWParam )
   local nID := nLoWord( nWParam )
   local hWndCtl := nLParam

   LogFile( CurDir() + "\notify.txt", { nNotifyCode, nWParam, nLParam } )

   if nNotifyCode == 0 // MenuItem command
      if ::oMenu != nil
         ::oMenu:Command( nId )
      endif
   endif      

   if nID == 1 .and. nNotifyCode == BN_DONEBUTTON
      ::End( 1 )
   endif   
   
   if hWndCtl != 0
      do case
         case nNotifyCode == BN_CLICKED
              SendMessage( hWndCtl, FM_CLICK, 0, 0 )
          
         case nNotifyCode == CBN_SELCHANGE
              LogFile( CurDir() + "\notify.txt", { "it is a CBN_SELCHANGE notification" } )
              SendMessage( hWndCtl, FM_CHANGE, 0, 0 )
      endcase
   endif   
   
return nil   
 
Run the example and check the created notify.txt. You should see values like these:

Code: Select all

01/01/03 12:02:00: 3    196709  2080462944  
01/01/03 12:02:01: 7    458853  2080462944  
01/01/03 12:02:31: 1    66536   2080463168  
01/01/03 12:02:31: it is a CBN_SELCHANGE notification   
01/01/03 12:02:31: 9    589925  2080462944  
01/01/03 12:02:31: 8    524389  2080462944  
01/01/03 12:02:31: 1    65637   2080462944  
01/01/03 12:02:31: it is a CBN_SELCHANGE notification   
 
Please post here the values that you get. Thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

Linares
thanks for reply

two tests: for this example:

#include "FWCE.ch"
function Main()
local oWnd, cValue :="One"
DEFINE window oWnd TITLE "Combos"
@ 1, 1 COMBOBOX cValue ITEMS { "One", "Two", "Three" } OF oWnd
ACTIVATE window oWnd
return nil


1 - For HTC touch Diamond with windows mobile 6.1 SO CE 5.2.20764
the combobox not open:

the result file notify:
04/29/09 12:55:39: 3 196709 2080952368
04/29/09 12:55:40: 7 458853 2080952368
04/29/09 12:55:41: 10 655461 2080952368
04/29/09 12:55:41: 8 524389 2080952368
04/29/09 12:55:41: 7 458853 2080952368
04/29/09 12:55:42: 10 655461 2080952368
04/29/09 12:55:42: 8 524389 2080952368
04/29/09 12:55:42: 7 458853 2080952368
--------------------------------------------------------------------

2 - For HTC touch Diamond with windows mobile 6.1 SO CE 5.2.19965
the combobox works Fine and open normally

the result file notify:
04/29/09 12:52:56: 3 196709 2080963472
04/29/09 12:52:57: 7 458853 2080963472
04/29/09 12:53:06: 1 66536 2080963696
04/29/09 12:53:06: it is a CBN_SELCHANGE notification
04/29/09 12:53:06: 9 589925 2080963472
04/29/09 12:53:07: 8 524389 2080963472
04/29/09 12:53:07: 1 65637 2080963472
04/29/09 12:53:07: it is a CBN_SELCHANGE notification
04/29/09 12:53:07: 7 458853 2080963472
04/29/09 12:53:08: 1 66536 2080963696
04/29/09 12:53:08: it is a CBN_SELCHANGE notification
04/29/09 12:53:08: 9 589925 2080963472
04/29/09 12:53:08: 8 524389 2080963472
04/29/09 12:53:08: 1 65637 2080963472
04/29/09 12:53:08: it is a CBN_SELCHANGE notification
04/29/09 12:53:09: 10 655461 2080963472
04/29/09 12:53:09: 4 262245 2080963472


Best regards
Sérgio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by Antonio Linares »

Sergio,

These are the ComboBox notifications from the Windows API:

Code: Select all

/*
 * Combo Box Notification Codes
 */
#define CBN_ERRSPACE        (-1)
#define CBN_SELCHANGE       1
#define CBN_DBLCLK          2
#define CBN_SETFOCUS        3
#define CBN_KILLFOCUS       4
#define CBN_EDITCHANGE      5
#define CBN_EDITUPDATE      6
#define CBN_DROPDOWN        7
#define CBN_CLOSEUP         8
#define CBN_SELENDOK        9
#define CBN_SELENDCANCEL    10
 
It looks that your application receives a CBN_SELENDCANCEL instead of a CBN_SELCHANGE.
regards, saludos

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

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by Antonio Linares »

Sérgio,

Please try this fix in the previous example:

Code: Select all

#define CB_SHOWDROPDOWN 335

METHOD Command( nWParam, nLParam ) CLASS TWindow
   ...
         case nNotifyCode == 10
                MsgBeep()
                ::SendMsg( CB_SHOWDROPDOWN, 1 ) 
  ...
 
Or

Code: Select all

::PostMsg( CB_SHOWDROPDOWN, 1 ) 
 
instead of ::SendMsg()
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

Linares?

codes are included in the combobox example, and nothing happens;
not open the combobox. in windows mobile 6.1 Build SO CE 5.2.20764
why?,

how do I solve this problem ?
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

Wmobile 6.1 build SO CE 5.2.20764
the notify File:
04/30/09 11:02:15: 3 196709 2080956976
04/30/09 11:02:16: 7 458853 2080956976
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by Antonio Linares »

Sérgio,

> Wmobile 6.1 build SO CE 5.2.20764

We need to locate an image file of such WM version for the emulator to be able to test it here.

Please help us to locate it. Once we have it, then we will be able to test it here and do more tests to check it.
regards, saludos

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

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by Antonio Linares »

Sérgio,

Please do this test in the initial example (the one including Class TWindow):

METHOD Command() VIRTUAL

and try it again, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: Windows mobile 6.1 build SO CE 5.2.20764

Post by rasptty »

METHOD Command() VIRTUAL

i try and not open the combobox. in windows mobile 6.1 Build SO CE 5.2.20764

best regards
Sérgio
Post Reply