FWH 11.05 to FWH 14.06 Upgrade Issues

Jose Dolar
Posts: 52
Joined: Thu Mar 22, 2012 5:43 pm
Location: USA

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Jose Dolar »

Antonio,

Here's the RC file of my application.

Kindly tell me what else is necessary to trace the issue.

Thank you,

Jose

Code: Select all


#include "bitmap.ch"
/// #include "/dev/fw24/include/winapi.ch" for Clippe/Blinker 
#define IDHELP 998

BITMAP_TOP BITMAP "bitmaps/top.bmp"

BITMAP_PREV BITMAP "bitmaps/prev.bmp"

BITMAP_NEXT BITMAP "bitmaps/next.bmp"

BITMAP_BOTTOM BITMAP "bitmaps/bottom.bmp"

BITMAP_NEW BITMAP "bitmaps/new.bmp"

BITMAP_OK BITMAP "bitmaps/oknormal.bmp"

BITMAP_EDIT BITMAP "bitmaps/edit.bmp"

BITMAP_DEL BITMAP "bitmaps/del.bmp"

ICON_PCREG ICON "small.ico"

1 ICON "pcreg.ico"

GetSN DIALOG 5, 17, 222, 85
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION ""
FONT 8, "MS Sans Serif"
{
 EDITTEXT IDC_EDIT1, 113, 10, 100, 15
 EDITTEXT IDC_EDIT2, 113, 35, 41, 15
 DEFPUSHBUTTON "OK", IDOK, 26, 62, 50, 14
 PUSHBUTTON "Cancel", IDCANCEL, 86, 62, 50, 14
 PUSHBUTTON "Help", IDHELP, 146, 62, 50, 14
 LTEXT "Serial Number:", SAY_1, 50, 13, 60, 15, SS_SIMPLE
 LTEXT "Validation code:", SAY_2, 50, 38, 60, 15, SS_SIMPLE
 CONTROL "", IDC_1, "TBitmap", 0 | WS_CHILD | WS_VISIBLE, 9, 14, 28, 30
}


Main MENU
{
 POPUP "&File"
 {
  MENUITEM "&Printer Assignments", CM_FILE_PRINTER
  MENUITEM SEPARATOR
  MENUITEM "P&references", CM_FILE_PREFERENCES
  MENUITEM SEPARATOR
  MENUITEM "&Check OPOS Devices", CM_CHECK_OPOS
  MENUITEM SEPARATOR
  MENUITEM "E&xit", CM_FILE_EXIT
 }

 POPUP "&Options"
 {
  MENUITEM "&Numpad", CM_OPTIONS_NUMPAD
  MENUITEM "&Button Bar", CM_OPTIONS_BTNBAR
  MENUITEM "&Maximized", CM_OPTIONS_MAX
  MENUITEM "&Double click select", CM_OPTIONS_DBLCLICK
  MENUITEM SEPARATOR
  MENUITEM "&Save settings", CM_OPTIONS_SAVE
 }

 MENUITEM "&Lookup", CM_LOOKUP
 MENUITEM "Fu&nction", CM_FUNCTION
 MENUITEM "&Mode", CM_MODE
// MENUITEM "&Cashier", CM_CASHIER
 MENUITEM "Cler&k", CM_CLERK
// MENUITEM "Add &New Option", CM_NEW_OPTION  // Notes: To add new option declare a new unique identifier at Bitmap.ch -- jdd December 17, 2013 
 POPUP "&Help"
 {
  MENUITEM "&Contents", CM_HELP_CONTENTS
  MENUITEM "&Search", CM_HELP_SEARCH
  MENUITEM "Using &Help", CM_HELP_USING_HELP
  MENUITEM "Show help for &next key or button", CM_HELP_SHOW_HELP
  MENUITEM SEPARATOR
  MENUITEM "&About", CM_HELP_ABOUT
 }

}

PrnAssignDlg DIALOG 6, 17, 194, 230
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Printer Assignments"
FONT 8, "MS Sans Serif"
{
 DEFPUSHBUTTON "OK", IDOK, 12, 210, 50, 14
 PUSHBUTTON "Cancel", IDCANCEL, 72, 210, 50, 14
 PUSHBUTTON "Help", IDHELP, 132, 210, 50, 14
 LTEXT "Port", -1, 12, 3, 30, 12
 LTEXT "Printer Name", -1, 44, 3, 55, 12
 LTEXT "LPT1 =", -1, 12, 15, 30, 12
 LTEXT "LPT2 =", -1, 12, 31, 30, 12
 LTEXT "LPT3 =", -1, 12, 47, 30, 12
 LTEXT "COM1 =", -1, 12, 63, 30, 12
 LTEXT "COM2 =", -1, 12, 79, 30, 12
 LTEXT "COM3 =", -1, 12, 95, 30, 12
 LTEXT "COM4 =", -1, 12, 111, 30, 12
 LTEXT "COM5 =", -1, 12, 127, 30, 12
 LTEXT "COM6 =", -1, 12, 143, 30, 12
 LTEXT "COM7 =", -1, 12, 159, 30, 12
 LTEXT "COM8 =", -1, 12, 175, 30, 12
 LTEXT "COM9 =", -1, 12, 191, 30, 12
 EDITTEXT IDC_LPT1, 44, 14, 140, 12
 EDITTEXT IDC_LPT2, 44, 30, 140, 12
 EDITTEXT IDC_LPT3, 44, 46, 140, 12
 EDITTEXT IDC_COM1, 44, 62, 140, 12
 EDITTEXT IDC_COM2, 44, 78, 140, 12
 EDITTEXT IDC_COM3, 44, 94, 140, 12
 EDITTEXT IDC_COM4, 44, 110, 140, 12
 EDITTEXT IDC_COM5, 44, 126, 140, 12
 EDITTEXT IDC_COM6, 44, 142, 140, 12
 EDITTEXT IDC_COM7, 44, 158, 140, 12
 EDITTEXT IDC_COM8, 44, 174, 140, 12
 EDITTEXT IDC_COM9, 44, 190, 140, 12
}



-Joe

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

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Antonio Linares »

Jose,

Please post also the code that you use to redefine it, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Jose Dolar
Posts: 52
Joined: Thu Mar 22, 2012 5:43 pm
Location: USA

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Jose Dolar »

Antonio,

Here's the function that build the menu from resource. I posted the whole function just in case you need more info.

To look for redefinition please find for "Create menu from resources" comment.

Thank you,

Jose

Code: Select all

function BuildMenu()
   local oMenu
   local oError, cText, cAction
   
   local oMportal  // jdolar
   local oMenuItem // jdolar
   local xmenu   // jdd
     
  local oPmenu,oPmItem1,oPmItem2,oPmItem3 //

   if file('menu.dbf')

      // Create menu from menu.dbf
      menu oMenu

      // atotdrive not defined yet OpnFiles( "MENU", 'O', ProcName() )

      use menu index menu new
      if select('MENU') > 0
         select MENU
         go top

         begin sequence

            do while ! eof()
               if MENU->TYPE = 0
                  menu
               elseif MENU->TYPE = 1
                  // menuitem
                  cText := trim(MENU->TEXT)
                  cAction := trim(MENU->ACTION)
                  if empty(cAction)
                     menuitem cText file BitmapFile("BITMAP")
                  else
                     if MENU->V_KEY != 0
                        menuitem cText block OnKeyBlock(cAction) accelerator MENU->KEY_STATE, MENU->V_KEY file BitmapFile("BITMAP")
                     else
                        menuitem cText block OnKeyBlock(cAction) file BitmapFile("BITMAP")
                     endif
                  endif
               elseif MENU->TYPE = 2
                  separator
               elseif MENU->TYPE = 3
                  endmenu
               endif
               skip
            enddo

         recover using oError

            alert(oError:Description)

         endsequence

         use // OpnFiles( "MENU", 'C', ProcName() )
      endif

      endmenu

   else
      // Create menu from resources

      oMenu:=TMenu():ReDefine("Main",.f.)
      redefine menuitem id CM_FILE_PRINTER of oMenu;
         block {|| OnKey(0,{|| PrnAssign()})}
      redefine menuitem id CM_FILE_PREFERENCES of oMenu;
         block {|| OnKey(0,{|| ExpressFile("REGSETUP.EXP")})}
* Windows8 - Check OPOS devices *** JDD 
      redefine menuitem id CM_CHECK_OPOS of oMenu;
         block {|| OnKey(0,{|| CheckOPOSHealth()})}
**** end ***
      redefine menuitem id CM_FILE_EXIT of oMenu;
         block {|| GetWndFrame():End()} ;
         MESSAGE "Exit " + cProgTitle( )

      aObject[AO_OPTION][1]:=TMenuItem():ReDefine(,,alOption(1), .t.,,,,oMenu,;
         {|| alOption(1,!alOption(1)),NumPad()};
         ,CM_OPTIONS_NUMPAD)

      aObject[AO_OPTION][2]:=TMenuItem():ReDefine(,,alOption(2),.t.,,,,oMenu,;
         {|| BuildBar(,.f.),alOption(2,!alOption(2)),BuildBar(,.t.)};
         ,CM_OPTIONS_BTNBAR)

      aObject[AO_OPTION][3]:=TMenuItem():ReDefine(,,alOption(3),.t.,,,,oMenu,;
         {|| alOption(3,!alOption(3)),;
         if(alOption(3),GetWndFrame():Maximize(),GetWndFrame():Restore())};
         ,CM_OPTIONS_MAX)

      aObject[AO_OPTION][4]:=TMenuItem():ReDefine(,,alOption(4),.t.,,,,oMenu,;
         {|| alOption(4,!alOption(4))};
         ,CM_OPTIONS_DBLCLICK)

      redefine menuitem id CM_OPTIONS_SAVE of oMenu block {|| alOption(,,.t.)}
      redefine menuitem id CM_LOOKUP of oMenu block {|| OnKey(0,{|| LW()})}
      redefine menuitem id CM_FUNCTION of oMenu block {|| OnKey(0,{|| FunChoice()})}
      redefine menuitem id CM_MODE of oMenu block {|| OnKey(0,{|| Mode()})}

********* remove cashier (PC/Reg v112106) ***  /jdd - Clip2Harb - Note: edit the RC file to modify options
//  redefine menuitem id CM_CASHIER of oMenu block {|| OnKey(0,{|| Cashier()})}
//    redefine menuitem oMportal Prompt "Test Odbc" id CM_CASHIER of oMenu block {|| OnKey(0,{|| ExpressFile("PORTAL")})}
//      redefine menuitem oMportal Prompt "Reports" id CM_CASHIER of oMenu block {|| OnKey(0,{|| ExpressFile("PORTAL")})}
//      oMportal:destroy()
******************************* pcreg v112106 ***********************************

********** replace Call to clerk() with EXPRESSFILE("CLERK.EXP") (PC/Reg v112106) ***********
//    redefine menuitem id CM_CLERK of oMenu block {|| OnKey(0,{|| Clerk()})}
      redefine menuitem id CM_CLERK of oMenu block {|| OnKey(0,{||ExpressFile("clerk.exp")})}
***************************** (PC/Reg v112106) ***********************************************

      redefine menuitem id CM_HELP_CONTENTS of oMenu block {|| HelpIndex()}
      redefine menuitem id CM_HELP_SEARCH of oMenu block {|| HelpSearch()}
      redefine menuitem id CM_HELP_USING_HELP of oMenu block {|| WinHelp("windows.chm")}
/*
 ***** the following codes add a pulldown menu - jdd (just in case we need it *****
    menu
      MENUITEM oMenuItem prompt "Test" && Block {||alert("here")}
         menu
            MENUITEM "Test odbc" Block {||ls_testODBC()}
            MENUITEM "Test2" Block {||alert("here2")}
         endmenu
    endmenu
    oMenu:insert(oMenuItem,,2)
*****************************************************************************************
*/
#ifdef __HARBOUR__
       aObject[AO_SHOWHELP] := TMenuItem():ReDefine(,, .F.,,,,, oMenu, ;
          {|| aObject[AO_SHOWHELP]:SetCheck(!aObject[AO_SHOWHELP]:lChecked)}, CM_HELP_SHOW_HELP,,,, )
#else
      redefine menuitem aObject[AO_SHOWHELP] prompt id CM_HELP_SHOW_HELP of oMenu;
         block {|| aObject[AO_SHOWHELP]:SetCheck(!aObject[AO_SHOWHELP]:lChecked)}
#endif
      redefine menuitem id CM_HELP_ABOUT of oMenu block ;
         {|| About()}

   endif

return oMenu

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

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Antonio Linares »

All the CM_... defines are missing. Please provide them, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Jose Dolar
Posts: 52
Joined: Thu Mar 22, 2012 5:43 pm
Location: USA

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Jose Dolar »

Antonio,

CM_.. were defined in a file named bitmap.ch. Here I posted all contents of Bitmat.ch

Thanks,

Jose

Code: Select all

#define IDC_COM9    112
#define IDC_COM8    111
#define IDC_COM7    110
#define IDC_COM6    109
#define IDC_COM5    108
#define IDC_COM4    107
#define IDC_COM3    106
#define IDC_COM2    105
#define IDC_COM1    104
#define IDC_LPT3    103
#define IDC_LPT2    102
#define IDC_LPT1    101
#define CM_LOOKUP   106
#define CM_FUNCTION 107
#define CM_CASHIER  108
#define CM_CLERK    109
#define CM_FILE_PREFERENCES 118
#define CM_OPTIONS_DBLCLICK 117
#define CM_HELP_SHOW_HELP   116
#define CM_FILE_PRINTER 115
#define CM_FILE_CHECKHEALTH 115
#define CM_MODE 114
#define CM_HELP_USING_HELP  113
#define CM_HELP_SEARCH  112
#define CM_HELP_CONTENTS    111
#define CM_HELP_ABOUT   110
#define CM_OPTIONS_SAVE 105
#define CM_OPTIONS_MAX  104
#define CM_OPTIONS_BTNBAR   103
#define CM_OPTIONS_NUMPAD   102
#define CM_FILE_EXIT    101
#define IDC_EDIT1   120
#define IDC_EDIT2   121
#define IDC_1   122
#define SAY_2   131
#define SAY_1   130
#define BITMAP_DEL          23
#define BITMAP_EDIT         22
#define BITMAP_OK               21
#define BITMAP_NEW          20
#define BITMAP_BOTTOM       17
#define BITMAP_NEXT         16
#define BITMAP_PREV         15
#define BITMAP_TOP          14
#define BITMAP_PCREG            129
#define ICON_PCREG          130
#define CM_CHECK_OPOS       131
//#define CM_NEW_OPTION     132  Notes: use this #define in the future.  We also need change/update pcreg.rc
 
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Antonio Linares »

Jose,
Harbour 3.2.0dev (r1406271520)
Copyright (c) 1999-2014, http://harbour-project.org/
Compiling 'C:\fwteam\samples\jdolar.prg' and generating preprocessed output to 'C:\fwteam\samples\jdolar.ppo'...

Lines 4406, Functions/Procedures 2
Generating C source output to 'jdolar.c'... Done.

C:\fwteam\samples\jdolar.prg(92) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(92) Warning W0001 Ambiguous reference 'AO_OPTION'
C:\fwteam\samples\jdolar.prg(96) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(96) Warning W0001 Ambiguous reference 'AO_OPTION'
C:\fwteam\samples\jdolar.prg(101) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(101) Warning W0001 Ambiguous reference 'AO_OPTION'
C:\fwteam\samples\jdolar.prg(105) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(105) Warning W0001 Ambiguous reference 'AO_OPTION'
C:\fwteam\samples\jdolar.prg(141) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(141) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(141) Warning W0002 Ambiguous reference, assuming memvar 'AOBJECT'
C:\fwteam\samples\jdolar.prg(141) Warning W0001 Ambiguous reference 'AO_SHOWHELP'
C:\fwteam\samples\jdolar.prg(141) Warning W0001 Ambiguous reference 'AO_SHOWHELP'

C:\fwteam\samples\jdolar.prg(141) Warning W0001 Ambiguous reference 'AO_SHOWHELP'
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
C:\fwteam\samples\jdolar.c:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_BITMAPFILE' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_ONKEYBLOCK' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_ONKEY' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_PRNASSIGN' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_EXPRESSFILE' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_CHECKOPOSHEALTH' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_CPROGTITLE' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_ALOPTION' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_NUMPAD' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_BUILDBAR' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_LW' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_FUNCHOICE' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_MODE' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
Error: Unresolved external '_HB_FUN_ABOUT' referenced from C:\FWTEAM\SAMPLES\JDOLAR.OBJ
* Linking errors *
Please (and this isn't just for you) check your provided examples before posting them, because it takes more time and effort to provide tech support , thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Jose Dolar
Posts: 52
Joined: Thu Mar 22, 2012 5:43 pm
Location: USA

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Jose Dolar »

Dear Antonio,

I regret, I thought that you just want to see the syntax. :(

Anyway, I just sent to your private email the most reduced set of source and data files I can create so you may able to Build and Run our app.

Thank you again for your support,

Regards/saludos

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

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Antonio Linares »

Jose,

You are really welcome, don't worry about it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Jose Dolar
Posts: 52
Joined: Thu Mar 22, 2012 5:43 pm
Location: USA

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Jose Dolar »

Antonio,

Your advice to initialize oMenu:l2007 = .F. and oMenu:l2010 = .F. resolved the error. :D

Thank you for the superb support!

Regards/Saludos

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

Re: FWH 11.05 to FWH 14.06 Upgrade Issues

Post by Antonio Linares »

very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply