Menu doesn't work CE 6.0

Menu doesn't work CE 6.0

Postby anas » Thu Sep 06, 2018 12:54 pm

Hi,
we are migrating our procedure from a terminal with windows ce 4.20 to a new terminal with windows ce 6.0
we have upgrade the FWPPC to the last version.
Now, we have a problem displaying the menu. We can see the main item of menu, but when we click on it don't display the popup with the sub-item.

We have the problem only with windows CE 6.0 because the same program works fine on old terminal.

Code: Select all  Expand view


 RESOURCE

#ifdef _CE
   #include "c:\fwppc\vce\include\windows.h"
   #include "c:\fwppc\vce\include\commctrl.h"
#endif
 
#define I_IMAGENONE     (-2)

#ifdef _CE
102 RCDATA  
{
   102, 4,
   I_IMAGENONE, 100, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 100, 0, 0,  
   I_IMAGENONE, 200, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 200, 0, 1,  
   I_IMAGENONE, 300, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 300, 0, 2,  
   I_IMAGENONE, 400, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 400, 0, 3  
}
#endif

STRINGTABLE DISCARDABLE
{
100, "File"
200, "Inserimento"
300, "Lista"
400, "?"
}

102 MENU DISCARDABLE
{
  POPUP ""
  {
    MENUITEM "&Esci", 110
    MENUITEM "&Reindicizza", 120
  }
  POPUP ""
  {
    MENUITEM "&Salette Per Sogg.", 210
    MENUITEM "S&alette Per Gabbia", 220
    MENUITEM "&Porcilaie", 230
  }
  POPUP ""
  {
    MENUITEM "&Salette", 310
    MENUITEM "&Porcilaie", 320
  }
  POPUP "?"
  {
    MENUITEM "&Informazioni", 410
  }
}


// PRG
FUNCTION fMenu()
   LOCAL oItem, oWnd, oMenu, oBmp
 

   DEFINE BITMAP oBmp FILENAME SH_RISORSE+"SFONDO.BMP"

   DEFINE MENU oMenu RESOURCE 102
   REDEFINE MENUITEM oItem ID 110 OF oMenu ACTION (dbcloseall(), oWnd:end()) //File/Esci
   REDEFINE MENUITEM oItem ID 120 OF oMenu ACTION (dbcloseall(), fReindi(VERO))  //File/Reindicizza
   IF cCentro=="AR"
      REDEFINE MENUITEM oItem ID 210 OF oMenu ACTION ( GSA03AR(oWnd, SALETTA) )   //Inserimento/Salette Per Sogg.
   ELSE
      REDEFINE MENUITEM oItem ID 210 OF oMenu ACTION ( GSA03RE(oWnd, SALETTA) )   //Inserimento/Salette Per Sogg.
   ENDIF  
   REDEFINE MENUITEM oItem ID 220 OF oMenu ACTION ( GSA05(oWnd, SALETTA) )   //Inserimento/Salette Per Gabbia
   IF cCentro=="AR"
      REDEFINE MENUITEM oItem ID 230 OF oMenu ACTION ( GSA03AR(oWnd, PORCILAIA) ) //Inserimento/Porcilaie
      REDEFINE MENUITEM oItem ID 310 OF oMenu ACTION ( GSA04AR(oWnd, SALETTA) )   //Lista/Salette
      REDEFINE MENUITEM oItem ID 320 OF oMenu ACTION ( GSA04AR(oWnd, PORCILAIA) ) //Lista/Porcilaie
   ELSE
      REDEFINE MENUITEM oItem ID 230 OF oMenu ACTION ( GSA03RE(oWnd, PORCILAIA) ) //Inserimento/Porcilaie
      REDEFINE MENUITEM oItem ID 310 OF oMenu ACTION ( GSA04RE(oWnd, SALETTA) )   //Lista/Salette
      REDEFINE MENUITEM oItem ID 320 OF oMenu ACTION ( GSA04RE(oWnd, PORCILAIA) ) //Lista/Porcilaie
   ENDIF
   REDEFINE MENUITEM oItem ID 410 OF oMenu ACTION  fAbout()                  //?

   
   DEFINE WINDOW oWnd TITLE "Giro Sanitario" ;
      MENU oMenu
   
   oWnd:bKeyChar:={|nKey| fCtrlEsc(oWnd, nKey) }

   
   ACTIVATE WINDOW oWnd;
   ON PAINT oWnd:SayBitmap( 80, 9, oBmp ) //ON INIT fReindi()

   DbCloseAll()  

   oBmp:End()

RETURN NIL


 
anas
 
Posts: 8
Joined: Wed Sep 05, 2018 8:11 am

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Thu Sep 06, 2018 3:36 pm

Have you tested your EXE with the Windows CE emulator that we provide with FWPPC ?

https://bitbucket.org/fivetech/fivewin-contributions/downloads/wce_wm_emulator.zip
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Thu Sep 06, 2018 3:38 pm

Could you please email me your EXE compressed as a ZIP file (renamed as .zop) ? thanks
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby anas » Fri Sep 07, 2018 7:39 am

We have tested our program with emulator and it works fine.

We have noticed that the emulator is Win CE 5.0 and our terminal are Win CE 6.0

We have sent you a copy of the exe
anas
 
Posts: 8
Joined: Wed Sep 05, 2018 8:11 am

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Fri Sep 07, 2018 8:22 am

Please try your EXE on this Windows CE 6 emulator:

https://bitbucket.org/fivetech/fivewin-contributions/downloads/WinCE6_Emulator.rar

I have not received your EXE (probably is being blocked by the email service). Please provide me a URL to download it, thanks
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby anas » Fri Sep 07, 2018 8:48 am

Also with Win CE 6.0 emulator it doesn't work.

We have send you a link with the exe program
anas
 
Posts: 8
Joined: Wed Sep 05, 2018 8:11 am

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Fri Sep 07, 2018 9:37 am

I can't download the EXE if you don't authorize my request to download it :-)
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Fri Sep 07, 2018 11:23 am

In the resource file, please modify the menu this way:

Code: Select all  Expand view
102 MENU DISCARDABLE
{
  POPUP "File"
  {
    MENUITEM "&Esci", 110
    MENUITEM "&Reindicizza", 120
  }
  POPUP "Inserimento"
  {
    MENUITEM "&Salette Per Sogg.", 210
    MENUITEM "S&alette Per Gabbia", 220
    MENUITEM "&Porcilaie", 230
  }
  POPUP "Lista"
  {
    MENUITEM "&Salette", 310
    MENUITEM "&Porcilaie", 320
  }
  POPUP "?"
  {
    MENUITEM "&Informazioni", 410
  }
}
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby anas » Fri Sep 07, 2018 11:41 am

Hi,
we try this change but it doesn't work with both emulators

regards


Code: Select all  Expand view


RESOURCE

#ifdef _CE
   #include "c:\fwppc\vce\include\windows.h"
   #include "c:\fwppc\vce\include\commctrl.h"
#endif
 
#define I_IMAGENONE     (-2)

#ifdef _CE
102 RCDATA  
{
   102, 4,
   I_IMAGENONE, 100, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 100, 0, 0,  
   I_IMAGENONE, 200, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 200, 0, 1,  
   I_IMAGENONE, 300, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 300, 0, 2,  
   I_IMAGENONE, 400, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 400, 0, 3  
}
#endif

STRINGTABLE DISCARDABLE
{
100, "File"
200, "Inserimento"
300, "Lista"
400, "?"
}


102 MENU DISCARDABLE
{
  POPUP "File"
  {
    MENUITEM "&Esci", 110
    MENUITEM "&Reindicizza", 120
  }
  POPUP "Inserimento"
  {
    MENUITEM "&Salette Per Sogg.", 210
    MENUITEM "S&alette Per Gabbia", 220
    MENUITEM "&Porcilaie", 230
  }
  POPUP "Lista"
  {
    MENUITEM "&Salette", 310
    MENUITEM "&Porcilaie", 320
  }
  POPUP "?"
  {
    MENUITEM "&Informazioni", 410
  }
}

 
anas
 
Posts: 8
Joined: Wed Sep 05, 2018 8:11 am

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Fri Sep 07, 2018 11:56 am

Does it fail with Windows CE 6 ?
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Fri Sep 07, 2018 12:03 pm

Please try to create the menu from source code without using resources:

Code: Select all  Expand view

DEFINE WINDOW oWnd TITLE "Giro Sanitario" ;
      MENU BuildMenu()

...

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "File"
      MENU
         MENUITEM "&Esci" ACTION (dbcloseall(), oWnd:end())
         MENUITEM "&Reindicizza" ACTION (dbcloseall(), fReindi(VERO))
      ENDMENU
      MENUITEM "Inserimento"
      MENU
         MENUITEM "&Salette Per Sogg." ACTION ...
         MENUITEM "S&alette Per Gabbia" ACTION ...
      ENDMENU
   ENDMENU

return oMenu
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby anas » Mon Sep 10, 2018 7:42 am

Hi Antonio,

we tried to change the program as you indicated, but during compilation it returns the following errors:
E0022 and E0030

Are we wrong?

regards

Code: Select all  Expand view

#include "FWCE.ch"

FUNCTION Main

local oWnd

   DEFINE WINDOW oWnd TITLE "Giro Sanitario" ;
      MENU BuildMenu()

   ACTIVATE WINDOW oWnd ;
      ON CLICK MsgInfo( "Click!" )
 
RETURN NIL

FUNCTION BuildMenu()

   LOCAL oItem, oMenu
 
   MENU oMenu
      MENUITEM "File"
      MENU
         MENUITEM "&Esci"        ACTION (MsgInfo( "esci" ))
         MENUITEM "&Reindicizza" ACTION (MsgInfo( "reindicizza" ))
      ENDMENU
      MENUITEM "Inserimento"
      MENU
         MENUITEM "&Salette Per Sogg." ACTION (MsgInfo( "soggetto" ))
         MENUITEM "S&alette Per Gabbia" ACTION (MsgInfo( "gabbia" ))
      ENDMENU
   ENDMENU

RETURN oMenu

 
anas
 
Posts: 8
Joined: Wed Sep 05, 2018 8:11 am

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Mon Sep 10, 2018 8:25 am

Please copy here those errors descriptions

Copy here the compiler output, thanks
regards, saludos

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

Re: Menu doesn't work CE 6.0

Postby anas » Mon Sep 10, 2018 8:37 am

Hi,
here the output.

regards

Code: Select all  Expand view

┌────────────────────────────────────────────────────────────────────────────┐
?FiveWin for Pocket PC - February 2010            Harbour development power │▄
?(c) FiveTech Software, 1993-2010           for Microsoft Windows Pocket PC │█
└────────────────────────────────────────────────────────────────────────────┘?ECHO   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀?
Compiling...
gsa00.prg(20) Error E0030  Syntax error "syntax error at 'OMENU'"
gsa00.prg(21) Error E0030  Syntax error "syntax error at 'File'"
gsa00.prg(22) Error E0020  Incomplete statement or unbalanced delimiters
gsa00.prg(23) Error E0030  Syntax error "syntax error at '&Esci'"
gsa00.prg(24) Error E0030  Syntax error "syntax error at '&Reindicizza'"
gsa00.prg(25) Error E0020  Incomplete statement or unbalanced delimiters
gsa00.prg(26) Error E0030  Syntax error "syntax error at 'Inserimento'"
gsa00.prg(27) Error E0020  Incomplete statement or unbalanced delimiters
gsa00.prg(28) Error E0030  Syntax error "syntax error at '&Salette Per Sogg.'"
gsa00.prg(29) Error E0030  Syntax error "syntax error at 'S&alette Per Gabbia'"
gsa00.prg(30) Error E0020  Incomplete statement or unbalanced delimiters
gsa00.prg(31) Error E0020  Incomplete statement or unbalanced delimiters
Harbour 3.4.0dev () (2014-09-28 23:40)
Copyright (c) 1999-2014, https://github.com/vszakats/harbour-core/
Compiling 'gsa00.prg' and generating preprocessed output to 'gsa00.ppo'...
12 errors

No code generated.
* Compile errors *

C:\fwppc\samples>
 
anas
 
Posts: 8
Joined: Wed Sep 05, 2018 8:11 am

Re: Menu doesn't work CE 6.0

Postby Antonio Linares » Mon Sep 10, 2018 8:48 am

My mistake, that MENU command that I told you is not available for FWPPC, sorry

Here we have a working example for Windows Mobile 6, lets compare it with yours:

https://stackoverflow.com/questions/5540745/creating-menu-bar-in-mobile-6-x
regards, saludos

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

Next

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 6 guests