FWH 26.03 betatesters wanted

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

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Dear Anton,

Fix dialog titles with accented characters (German, Spanish, Portuguese)

  • strings.prg: convert from UTF-8 to CP1252 encoding so accented
    characters (ä, ü, ó, ã, é, etc.) are single bytes matching the
    code page expected by the dialog template builder.
  • dlg2chr.c, ctrl2chr.c: change MultiByteToWideChar from CP_OEMCP
    to CP_ACP. PRG strings are ANSI (CP1252), not OEM (CP850).
    CP_OEMCP was a Clipper/DOS legacy that misinterpreted byte values
    above 127 on modern Windows.
  • testlang.prg: updated to test accented dialog titles.

there are many warnings and errors with unresolved external __Sinx in fiveh.lib

These are side effects of combining bcc32 and bcc32c (clang). A module compiled with bcc32c was left in fiveh.lib by mistake. Fixing it.

Fivedbu compiled with Harbour and MSVC 32-bit and 64-bit now produces the errors described above for buttons and combo boxes.

Could you please describe them again ? How to reproduce them ?

Many thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

compile with bcc770 32 is now ok

german language on dialogs
fivedbu compile with bcc 32 or msvc32 or 64Bit
say text on dialogs is ok but on buttons and combobox not ok

fivedbu: Look at Setup, Preference, Language Espanol, or Buttonbar New, Database, Structure Buttons right side

Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Dear Anton,

Bug located and fixed!

Fix: Accented characters on buttons, comboboxes and checkboxes in dialogs
On applications with a Windows XP manifest (comctl32 v6), common controls
like BUTTON, COMBOBOX and CHECKBOX are created as Unicode windows.
When SetWindowText() or SendMessage(CB_ADDSTRING) detected a Unicode window
via IsWindowUnicode(), it called fw_parWide() to convert the text from
multibyte to UTF-16. fw_parWide() delegates to strtowidestr() which calls
hbcdp_to_wincdp() to determine the conversion codepage. The bug was in
hbcdp_to_wincdp() (fwunicode.c): when bAnsiOnly was TRUE (non-UTF-8 text),
it was supposed to skip OEM codepages (< 1250) and keep the default CP_ACP.
But the else branch at line 119 unconditionally assigned the OEM codepage:
if ( bAnsiOnly && v >= 1250 ) { icdp = v; }
else { icdp = v; } // <-- BUG: defeats the bAnsiOnly check
This caused CP1252 strings (e.g. "Añadir" with ñ=0xF1) to be converted
using CP437 where 0xF1 is ± instead of ñ, producing garbled text.
Fixed by changing the condition to: if ( !bAnsiOnly || v >= 1250 ) { icdp = v; }
so OEM codepages are skipped when the caller expects ANSI-only text.
SAY controls were unaffected because they paint their own text via
DrawTextExA which interprets bytes using the font's ANSI charset.
See samples/test/testlang.prg.

Preparing new FWH.exe and FWH64.exe

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

fwh 26.03 Beta 4
It looks good, but:

german translation
when I compile with BCC770 32-bit, "Setup" is correctly translated as "Einstellungen" but when I compile with MSVC 32-bit, "Setup" is translated as "Drucker" It seems that MSVC 32-bit uses a different strings.prg file. It works correctly with MSVC 64-bit.

Code: Select all | Expand

#include "FiveWin.ch"

static oWnd
static lDummy1 := .f.

//----------------------------------------------------------------------------//

function Main()

   local oBar

   FWSetLanguage( 5 )  // German

   DEFINE WINDOW oWnd TITLE "Testing Accented Characters - " + FWString( "Attention" ) ;
      MDI ;
      MENU BuildMenu()

   DEFINE BUTTONBAR oBar OF oWnd STYLEBAR SIZE 70, 70

   DEFINE BUTTON OF oBar PROMPT FWString( "Add" )      RESOURCE "new"  ACTION TestDlg()
   DEFINE BUTTON OF oBar PROMPT FWString( "Edit" )     RESOURCE "new"  ACTION TestDlg()
   DEFINE BUTTON OF oBar PROMPT FWString( "Search" )   RESOURCE "new"  ACTION TestDlg()
   DEFINE BUTTON OF oBar PROMPT FWString( "Delete" )   RESOURCE "new"  ACTION TestDlg()
   DEFINE BUTTON OF oBar PROMPT FWString( "Setup" )    RESOURCE "new"  ACTION TestDlg()
   DEFINE BUTTON OF oBar PROMPT FWString( "Exit" )     RESOURCE "new"  ACTION oWnd:End()

   SET MESSAGE OF oWnd TO "ButtonBar: " + ;
      FWString("Add") + " | " + FWString("Edit") + " | " + ;
      FWString("Search") + " | " + FWString("Delete") + " | " + FWString("Setup") + ;
      "  [GetACP=" + AllTrim( Str( GetACP() ) ) + ;
      " HBCDP=" + AllTrim( Str( HbCDP() ) ) + "]"

   ACTIVATE WINDOW oWnd MAXIMIZED ;
      VALID MsgYesNo( FWString( "Want to end ?" ), FWString( "Attention" ) )

return nil

//----------------------------------------------------------------------------//

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&Test"
      MENU
         MENUITEM FWString( "Attention" ) + " - Dialog Test" ACTION TestDlg()
         SEPARATOR
         MENUITEM "Language &1: English"    ACTION ( FWSetLanguage( 1 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )
         MENUITEM "Language &2: Spanish"    ACTION ( FWSetLanguage( 2 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )
         MENUITEM "Language &3: French"     ACTION ( FWSetLanguage( 3 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )
         MENUITEM "Language &4: Portuguese" ACTION ( FWSetLanguage( 4 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )
         MENUITEM "Language &5: German"     ACTION ( FWSetLanguage( 5 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )
         MENUITEM "Language &6: Italian"    ACTION ( FWSetLanguage( 6 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )
         SEPARATOR
         MENUITEM "&Exit" ACTION oWnd:End()
      ENDMENU
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

static function TestDlg()

   local oDlg, oSay1, oSay2, oBtn1, oBtn2, oBtn3, oBtn4, oChk1, oCbx1
   local cAdd, cEdit, cSearch, cDelete, cSetup, cAttention, cPrintErr
   local aLangs, nSelLang

   cAdd       := FWString( "Add" )
   cEdit      := FWString( "Edit" )
   cSearch    := FWString( "Search" )
   cDelete    := FWString( "Delete" )
   cSetup    :=  FWString( "Setup" )
   cAttention := FWString( "Attention" )
   cPrintErr  := FWString( "Printing Error" )

   aLangs     := { FWString( "English" ), FWString( "Spanish" ), FWString( "French" ), ;
                   FWString( "Portuguese" ), FWString( "German" ), FWString( "Italian" ) }
   nSelLang   := FWSetLanguage()

   DEFINE DIALOG oDlg TITLE cAttention + " / " + cPrintErr SIZE 520, 450

   // --- SAY controls ---
   @ 0.5, 1 SAY "=== SAY Controls ===" OF oDlg
   @ 1.5, 1 SAY "Add: "       + cAdd       OF oDlg
   @ 2.3, 1 SAY "Edit: "      + cEdit      OF oDlg
   @ 3.1, 1 SAY "Search: "    + cSearch    OF oDlg
   @ 3.9, 1 SAY "Delete: "    + cDelete    OF oDlg
   @ 4.7, 1 SAY "Setup: "     + cSetup     OF oDlg
   @ 5.5, 1 SAY oSay1 PROMPT "Attention: " + cAttention OF oDlg
   @ 6.3, 1 SAY oSay2 PROMPT "PrintErr: "  + cPrintErr  OF oDlg

   // --- BUTTON controls ---
   @ 0.5, 16 SAY "=== BUTTON Controls ===" OF oDlg
   @ 1.5, 16 BUTTON oBtn1 PROMPT cAdd      OF oDlg SIZE 55, 12 ACTION MsgInfo( cAdd )
   @ 3.0, 16 BUTTON oBtn2 PROMPT cEdit     OF oDlg SIZE 55, 12 ACTION MsgInfo( cEdit )
   @ 4.5, 16 BUTTON oBtn3 PROMPT cSearch   OF oDlg SIZE 55, 12 ACTION MsgInfo( cSearch )

   // --- More buttons with accented text ---
   @ 0.5, 26 SAY "=== More Buttons ===" OF oDlg
   @ 1.5, 26 BUTTON cAttention OF oDlg SIZE 60, 12 ACTION MsgInfo( cAttention )
   @ 3.0, 26 BUTTON cPrintErr  OF oDlg SIZE 60, 12 ACTION MsgInfo( cPrintErr )
   @ 4.5, 26 BUTTON oBtn4 PROMPT cDelete   OF oDlg SIZE 55, 12 ACTION MsgInfo( cDelete )
   
// --- CHECKBOX controls --- @ 7.5, 1 SAY "=== CHECKBOX ===" OF oDlg @ 9.5, 1.5 CHECKBOX oChk1 VAR lDummy1 PROMPT cAdd OF oDlg SIZE 50, 11 // --- COMBOBOX control --- @ 7.5, 16 SAY "=== COMBOBOX ===" OF oDlg @ 9.5, 16 COMBOBOX oCbx1 VAR nSelLang ITEMS aLangs OF oDlg SIZE 120, 150 // --- Debug info --- @ 10.5, 1 SAY "=== Debug Info ===" OF oDlg @ 11.3, 1 SAY 'Add="' + cAdd + '" hex=' + StrToHex( cAdd ) OF oDlg @ 12.1, 1 SAY 'Attention="' + cAttention + '" hex=' + StrToHex( cAttention ) OF oDlg @ 12.9, 1 SAY "GetACP()=" + AllTrim( Str( GetACP() ) ) + ; " GetOEMCP()=" + AllTrim( Str( GetOEMCP() ) ) + ; " HbCDP=" + AllTrim( Str( HbCDP() ) ) OF oDlg // Show IsWindowUnicode info after dialog is created @ 14.2, 1 BUTTON "&Diagnose" OF oDlg SIZE 50, 13 ; ACTION DiagnoseControls( oDlg, oSay1, oBtn1, oChk1, oCbx1 ) @ 14.2, 15 BUTTON "&Ok" OF oDlg SIZE 45, 13 ACTION oDlg:End() @ 14.2, 26 BUTTON "&Cancel" OF oDlg SIZE 45, 13 ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED ; ON INIT DiagnoseControls( oDlg, oSay1, oBtn1, oChk1, oCbx1 ) return nil //----------------------------------------------------------------------------// static function DiagnoseControls( oDlg, oSay, oBtn, oChk, oCbx ) local cInfo := "" cInfo += "Dialog hWnd Unicode: " + cYesNo( IsWindowUnicode( oDlg:hWnd ) ) + CRLF if oSay != nil cInfo += "SAY hWnd Unicode: " + cYesNo( IsWindowUnicode( oSay:hWnd ) ) + ; " lUnicode=" + cYesNo( oSay:lUnicode ) + CRLF endif if oBtn != nil cInfo += "BUTTON hWnd Unicode: " + cYesNo( IsWindowUnicode( oBtn:hWnd ) ) + ; " lUnicode=" + cYesNo( oBtn:lUnicode ) + CRLF endif if oChk != nil cInfo += "CHECKBOX hWnd Unicode: " + cYesNo( IsWindowUnicode( oChk:hWnd ) ) + ; " lUnicode=" + cYesNo( oChk:lUnicode ) + CRLF endif if oCbx != nil cInfo += "COMBOBOX hWnd Unicode: " + cYesNo( IsWindowUnicode( oCbx:hWnd ) ) + ; " lUnicode=" + cYesNo( oCbx:lUnicode ) + CRLF endif cInfo += CRLF cInfo += "GetACP() = " + AllTrim( Str( GetACP() ) ) + CRLF cInfo += "GetOEMCP() = " + AllTrim( Str( GetOEMCP() ) ) + CRLF cInfo += "HbCDP() = " + AllTrim( Str( HbCDP() ) ) + CRLF cInfo += "FW_SetUnicode() = " + cYesNo( FW_SetUnicode() ) + CRLF cInfo += CRLF cInfo += "FWString('Add') = " + FWString("Add") + " hex=" + StrToHex( FWString("Add") ) + CRLF cInfo += "FWString('Attention') = " + FWString("Attention") + " hex=" + StrToHex( FWString("Attention") ) + CRLF cInfo += "FWString('Printing Error') = " + FWString("Printing Error") + " hex=" + StrToHex( FWString("Printing Error") ) MsgInfo( cInfo, "Diagnostic Info" ) return nil //----------------------------------------------------------------------------// static function cYesNo( l ) return If( l, "YES", "NO" ) //----------------------------------------------------------------------------// static function StrToHex( cStr ) local n, cHex := "" for n := 1 to Min( Len( cStr ), 20 ) cHex += PadL( hb_NumToHex( Asc( SubStr( cStr, n, 1 ) ) ), 2, "0" ) if n < Min( Len( cStr ), 20 ) cHex += " " endif next return cHex

good work! :)

Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Dear Anton,

Working fine. hb + msvc32 was not recompiled.

Now it is tested and ok and saved as a "slash" command so it will not be missed again :wink:

many thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
karinha
Posts: 8720
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: FWH 26.03 betatesters wanted

Post by karinha »

Buenas tardes, Maestro Antônio. Utilizando el código del ing. Anton Lerchster, he notado que el TÍTULO DEL DIÁLOGO no acepta los caracteres traducidos por el comando FwString(). El código modificado se muestra a continuación:

Good afternoon, Master Antônio. Using the code from Ing. Anton Lerchster, I've noticed that the TITLE OF THE DIALOGUE doesn't accept the characters translated by the FwString() command. Modified code below:

Code: Select all | Expand

// C:\FWH2603\SAMPLES\SETLANG2.PRG - BCC77 y XHBBCC77 - ERROR EN EL TITULO DEL DIALOGO.

#include "FiveWin.ch"

EXTERNAL HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850

#ifNdef __XHARBOUR__     // Somente para HARBOUR, XHARBOUR nao tem isso ainda.
   REQUEST HB_CODEPAGE_UTF8
   REQUEST HB_CODEPAGE_UTF8EX
#endif

STATIC oWnd, lDummy1 := .f.

function Main()

   LOCAL oBar

   /*
   HB_LANGSELECT( 'PT' )
   HB_SETCODEPAGE( "UTF8" )
   HB_CDPSELECT( "UTF8EX" )
   HB_SETCODEPAGE( "PT850" )
   HB_CDPSELECT( "PTISO" )
   */

   // FWSetLanguage( 5 ) // German
   FWSetLanguage( 4 )  // Portuguese

   DEFINE WINDOW oWnd TITLE FWString( "Testing Accented Characters - " ) +    ;
                            FWString( "Attention" )                           ;
      MENU BuildMenu() MDI

   DEFINE BUTTONBAR oBar BUTTONSIZE 70, 70 _3DLOOK TOP OF oWnd 2007

   DEFINE BUTTON OF oBar PROMPT FWString( "Add" )    ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\new.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Edit" )   ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\open.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Search" ) ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Delete" ) ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\delete.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Setup" )  ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\open32.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Exit" )   ACTION oWnd:End()        ;
      FILENAME "..\bitmaps\16x16\exit.bmp" FLAT

   SET MESSAGE OF oWnd TO "ButtonBar: " + ;
      FWString("Add") + " | " + FWString("Edit") + " | " + ;
      FWString("Search") + " | " + FWString("Delete") + " | " + FWString("Setup") + ;
      "  [GetACP=" + AllTrim( Str( GetACP() ) ) + ;
      " HBCDP=" + AllTrim( Str( HbCDP() ) ) + "]" 2007

   ACTIVATE WINDOW oWnd MAXIMIZED ;
      VALID MsgYesNo( FWString( "Want to end ?" ), FWString( "Attention" ) )

RETURN NIL

function BuildMenu()

   LOCAL oMenu

   MENU oMenu 2007

  MENUITEM FWString( "&Test" ) // no funciona

  MENU

     MENUITEM FWString( "Attention" ) + " - Dialog Test" ACTION TestDlg() ;
        FILENAME "..\bitmaps\16x16\info.bmp"

     SEPARATOR
     MENUITEM "Language &1: English"    ACTION ( FWSetLanguage( 1 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\faces.bmp"

     SEPARATOR
     MENUITEM "Language &2: Spanish"    ACTION ( FWSetLanguage( 2 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )  ;
     FILENAME "..\bitmaps\edit.bmp"

     SEPARATOR
     MENUITEM "Language &3: French"     ACTION ( FWSetLanguage( 3 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\delete.bmp"

     SEPARATOR
     MENUITEM "Language &4: Portuguese" ACTION ( FWSetLanguage( 4 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\browse.bmp"

     SEPARATOR
     MENUITEM "Language &5: German"     ACTION ( FWSetLanguage( 5 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\calc.bmp"

     SEPARATOR
     MENUITEM "Language &6: Italian"    ACTION ( FWSetLanguage( 6 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\explorer.bmp"

     SEPARATOR
     MENUITEM "&Exit" ACTION oWnd:End() ;
        FILENAME "..\bitmaps\16x16\exit.bmp"

  ENDMENU

   ENDMENU

RETURN( oMenu )

STATIC FUNCTION TestDlg()

   local oDlg, oSay1, oSay2, oBtn1, oBtn2, oBtn3, oBtn4, oChk1, oCbx1
   local cAdd, cEdit, cSearch, cDelete, cSetup, cAttention, cPrintErr
   local aLangs, nSelLang, cTitle, cAtt, cPr

   cAdd       := FWString( "Add" )
   cEdit      := FWString( "Edit" )
   cSearch    := FWString( "Search" )
   cDelete    := FWString( "Delete" )
   cSetup     :=  FWString( "Setup" )
   cAttention := FWString( "Attention" )
   cPrintErr  := FWString( "Printing Error" )

   aLangs     := { FWString( "English" ), FWString( "Spanish" ), FWString( "French" ), ;
                   FWString( "Portuguese" ), FWString( "German" ), FWString( "Italian" ) }
   nSelLang   := FWSetLanguage()

   // ASI, FUNCIONA EN EL BUTTON, NO COMPRENDO ??? jajajaja.
   cAtt := cAttention + SPACE( 02 ) // + " Error" // ERROR IN BUTTON: Attention

   // ASI, NO FUNCIONA EN EL DIALOGO DE FORMA NINGUNA.
   cPr  := cPrintErr  + SPACE( 02 ) // Erro de impressao... con ~

   // no funciona en el titulo del dialogo. ???
   cTitle := "FWH: " + cAtt + " - " + cPr

   // ? cTitle  // Esta correcto, pero no muestra en el dialogo ?

   // ? OemToansi( cAttention ) // error
   // ? AnsiToOem( cAttention ) // error

   //    cTitle := "FWH: titulo do dialogo nao esta funcionando"
   // DEFINE DIALOG oDlg TITLE cAttention + " / " + cPrintErr SIZE 520, 450

   //-> TITLE CON ERROR. EN PORTUGUES.
   DEFINE DIALOG oDlg TITLE cTitle SIZE 550, 450 // TRANSPARENT

   oDlg:lHelpIcon := .F.

   // --- SAY controls ---
   @ 0.5, 1 SAY "=== SAY Controls ===" OF oDlg
   @ 1.5, 1 SAY "Add: "       + cAdd       OF oDlg
   @ 2.3, 1 SAY "Edit: "      + cEdit      OF oDlg
   @ 3.1, 1 SAY "Search: "    + cSearch    OF oDlg
   @ 3.9, 1 SAY "Delete: "    + cDelete    OF oDlg
   @ 4.7, 1 SAY "Setup: "     + cSetup     OF oDlg
   @ 5.5, 1 SAY oSay1 PROMPT "Attention: " + cAttention OF oDlg
   @ 6.3, 1 SAY oSay2 PROMPT "Print Error: "  + cPrintErr  OF oDlg

   // --- BUTTON controls ---
   @ 0.5, 16 SAY "=== BUTTON Controls ===" OF oDlg
   @ 1.5, 16 BUTTON oBtn1 PROMPT cAdd      OF oDlg SIZE 50, 12 ACTION MsgInfo( cAdd )

   @ 3.0, 16 BUTTON oBtn2 PROMPT cEdit     OF oDlg SIZE 50, 12 ACTION MsgInfo( cEdit )

   @ 4.5, 16 BUTTON oBtn3 PROMPT cSearch   OF oDlg SIZE 50, 12 ACTION MsgInfo( cSearch )

   // --- More buttons with accented text ---
   @ 0.5, 26 SAY "=== More Buttons ===" OF oDlg

   // AQUI, TAMBIEN MUESTRA cAttention CON ERROR EN PORTUGUES. CON SPACE(02), FUNCIONA.
   //   @ 1.5, 26 BUTTON cAttention OF oDlg SIZE 50, 12 ACTION MsgInfo( cAttention )
   @ 1.5, 26 BUTTON cAtt       OF oDlg SIZE 50, 12 ACTION MsgInfo( cAttention )

   @ 3.0, 26 BUTTON cPrintErr  OF oDlg SIZE 50, 12 ACTION MsgInfo( cPrintErr )
   @ 4.5, 26 BUTTON oBtn4 PROMPT cDelete OF oDlg SIZE 50, 12 ACTION MsgInfo( cDelete )
   
// --- CHECKBOX controls --- @ 7.5, 1 SAY "=== CHECKBOX ===" OF oDlg @ 9.5, 1.5 CHECKBOX oChk1 VAR lDummy1 PROMPT cAdd OF oDlg SIZE 50, 12 // --- COMBOBOX control --- @ 7.5, 16 SAY "=== COMBOBOX ===" OF oDlg @ 9.5, 16 COMBOBOX oCbx1 VAR nSelLang ITEMS aLangs OF oDlg SIZE 120, 150 // --- Debug info --- @ 10.5, 1 SAY "=== Debug Info ===" OF oDlg @ 11.3, 1 SAY 'Add="' + cAdd + '" hex=' + StrToHex( cAdd ) OF oDlg @ 12.1, 1 SAY 'Attention="' + cAttention + '" hex=' + StrToHex( cAttention ) OF oDlg @ 12.9, 1 SAY "GetACP()=" + AllTrim( Str( GetACP() ) ) + ; " GetOEMCP()=" + AllTrim( Str( GetOEMCP() ) ) + ; " HbCDP=" + AllTrim( Str( HbCDP() ) ) OF oDlg // Show IsWindowUnicode info after dialog is created @ 14.2, 1 BUTTON "&Diagnose" OF oDlg SIZE 50, 13 ; ACTION DiagnoseControls( oDlg, oSay1, oBtn1, oChk1, oCbx1 ) @ 14.2, 15 BUTTON "&Ok" OF oDlg SIZE 45, 13 ACTION oDlg:End() @ 14.2, 26 BUTTON "&Cancel" OF oDlg SIZE 45, 13 ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED ; ON INIT DiagnoseControls( oDlg, oSay1, oBtn1, oChk1, oCbx1 ) return nil static function DiagnoseControls( oDlg, oSay, oBtn, oChk, oCbx ) local cInfo := "" cInfo += "Dialog hWnd Unicode: " + cYesNo( IsWindowUnicode( oDlg:hWnd ) ) + CRLF if oSay != nil cInfo += "SAY hWnd Unicode: " + cYesNo( IsWindowUnicode( oSay:hWnd ) ) + ; " lUnicode=" + cYesNo( oSay:lUnicode ) + CRLF endif if oBtn != nil cInfo += "BUTTON hWnd Unicode: " + cYesNo( IsWindowUnicode( oBtn:hWnd ) ) + ; " lUnicode=" + cYesNo( oBtn:lUnicode ) + CRLF endif if oChk != nil cInfo += "CHECKBOX hWnd Unicode: " + cYesNo( IsWindowUnicode( oChk:hWnd ) ) + ; " lUnicode=" + cYesNo( oChk:lUnicode ) + CRLF endif if oCbx != nil cInfo += "COMBOBOX hWnd Unicode: " + cYesNo( IsWindowUnicode( oCbx:hWnd ) ) + ; " lUnicode=" + cYesNo( oCbx:lUnicode ) + CRLF endif cInfo += CRLF cInfo += "GetACP() = " + AllTrim( Str( GetACP() ) ) + CRLF cInfo += "GetOEMCP() = " + AllTrim( Str( GetOEMCP() ) ) + CRLF cInfo += "HbCDP() = " + AllTrim( Str( HbCDP() ) ) + CRLF cInfo += "FW_SetUnicode() = " + cYesNo( FW_SetUnicode() ) + CRLF cInfo += CRLF cInfo += "FWString('Add') = " + FWString("Add") + " hex=" + StrToHex( FWString("Add") ) + CRLF cInfo += "FWString('Attention') = " + FWString("Attention") + " hex=" + StrToHex( FWString("Attention") ) + CRLF cInfo += "FWString('Printing Err') = " + FWString("Printing Error") + " hex=" + StrToHex( FWString("Printing Error") ) MsgInfo( cInfo, "Diagnostic Info" ) return nil static function cYesNo( l ) return If( l, "YES", "NO" ) static function StrToHex( cStr ) local n, cHex := "" for n := 1 to Min( Len( cStr ), 20 ) cHex += PadL( hb_NumToHex( Asc( SubStr( cStr, n, 1 ) ) ), 2, "0" ) if n < Min( Len( cStr ), 20 ) cHex += " " endif next return cHex // FIN / END

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
richard-service
Posts: 868
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: FWH 26.03 betatesters wanted

Post by richard-service »

Dear Antonio,

I use FWH64 and compile error below:

Compiling...
Harbour 3.2.0dev (r2503251254)
Copyright (c) 1999-2024, https://harbour.github.io/
Compiling 'testime.prg' and generating preprocessed output to 'testime.ppo'...
Lines 6239, Functions/Procedures 2
Generating C source output to 'testime.c'... Done.
testime.prg(6) Warning W0002 Redefinition or duplicate definition of #define WM_CHAR
Embarcadero C++ 7.70 for Win64 Copyright (c) 2012-2023 Embarcadero Technologies, Inc.
testime.c:
Turbo Incremental Link64 6.98 Copyright (c) 1997-2023 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'LIBMARIADB64_BCC64.A'

  • Linking errors *
Best Regards,

Richard

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit
MySQL v8.0
Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
User avatar
kajot
Posts: 375
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: FWH 26.03 betatesters wanted

Post by kajot »

I also can test it.

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

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

karinha wrote: Sat Mar 28, 2026 4:18 pm

Buenas tardes, Maestro Antônio. Utilizando el código del ing. Anton Lerchster, he notado que el TÍTULO DEL DIÁLOGO no acepta los caracteres traducidos por el comando FwString(). El código modificado se muestra a continuación:

Good afternoon, Master Antônio. Using the code from Ing. Anton Lerchster, I've noticed that the TITLE OF THE DIALOGUE doesn't accept the characters translated by the FwString() command. Modified code below:

Code: Select all | Expand

// C:\FWH2603\SAMPLES\SETLANG2.PRG - BCC77 y XHBBCC77 - ERROR EN EL TITULO DEL DIALOGO.

#include "FiveWin.ch"

EXTERNAL HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850

#ifNdef __XHARBOUR__     // Somente para HARBOUR, XHARBOUR nao tem isso ainda.
   REQUEST HB_CODEPAGE_UTF8
   REQUEST HB_CODEPAGE_UTF8EX
#endif

STATIC oWnd, lDummy1 := .f.

function Main()

   LOCAL oBar

   /*
   HB_LANGSELECT( 'PT' )
   HB_SETCODEPAGE( "UTF8" )
   HB_CDPSELECT( "UTF8EX" )
   HB_SETCODEPAGE( "PT850" )
   HB_CDPSELECT( "PTISO" )
   */

   // FWSetLanguage( 5 ) // German
   FWSetLanguage( 4 )  // Portuguese

   DEFINE WINDOW oWnd TITLE FWString( "Testing Accented Characters - " ) +    ;
                            FWString( "Attention" )                           ;
      MENU BuildMenu() MDI

   DEFINE BUTTONBAR oBar BUTTONSIZE 70, 70 _3DLOOK TOP OF oWnd 2007

   DEFINE BUTTON OF oBar PROMPT FWString( "Add" )    ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\new.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Edit" )   ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\open.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Search" ) ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Delete" ) ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\delete.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Setup" )  ACTION TestDlg()         ;
      FILENAME "..\bitmaps\16x16\open32.bmp" FLAT

   DEFINE BUTTON OF oBar PROMPT FWString( "Exit" )   ACTION oWnd:End()        ;
      FILENAME "..\bitmaps\16x16\exit.bmp" FLAT

   SET MESSAGE OF oWnd TO "ButtonBar: " + ;
      FWString("Add") + " | " + FWString("Edit") + " | " + ;
      FWString("Search") + " | " + FWString("Delete") + " | " + FWString("Setup") + ;
      "  [GetACP=" + AllTrim( Str( GetACP() ) ) + ;
      " HBCDP=" + AllTrim( Str( HbCDP() ) ) + "]" 2007

   ACTIVATE WINDOW oWnd MAXIMIZED ;
      VALID MsgYesNo( FWString( "Want to end ?" ), FWString( "Attention" ) )

RETURN NIL

function BuildMenu()

   LOCAL oMenu

   MENU oMenu 2007

  MENUITEM FWString( "&Test" ) // no funciona

  MENU

     MENUITEM FWString( "Attention" ) + " - Dialog Test" ACTION TestDlg() ;
        FILENAME "..\bitmaps\16x16\info.bmp"

     SEPARATOR
     MENUITEM "Language &1: English"    ACTION ( FWSetLanguage( 1 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\faces.bmp"

     SEPARATOR
     MENUITEM "Language &2: Spanish"    ACTION ( FWSetLanguage( 2 ), oWnd:SetMenu( BuildMenu() ), TestDlg() )  ;
     FILENAME "..\bitmaps\edit.bmp"

     SEPARATOR
     MENUITEM "Language &3: French"     ACTION ( FWSetLanguage( 3 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\delete.bmp"

     SEPARATOR
     MENUITEM "Language &4: Portuguese" ACTION ( FWSetLanguage( 4 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\browse.bmp"

     SEPARATOR
     MENUITEM "Language &5: German"     ACTION ( FWSetLanguage( 5 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\calc.bmp"

     SEPARATOR
     MENUITEM "Language &6: Italian"    ACTION ( FWSetLanguage( 6 ), oWnd:SetMenu( BuildMenu() ), TestDlg() ) ;
        FILENAME "..\bitmaps\16x16\explorer.bmp"

     SEPARATOR
     MENUITEM "&Exit" ACTION oWnd:End() ;
        FILENAME "..\bitmaps\16x16\exit.bmp"

  ENDMENU

   ENDMENU

RETURN( oMenu )

STATIC FUNCTION TestDlg()

   local oDlg, oSay1, oSay2, oBtn1, oBtn2, oBtn3, oBtn4, oChk1, oCbx1
   local cAdd, cEdit, cSearch, cDelete, cSetup, cAttention, cPrintErr
   local aLangs, nSelLang, cTitle, cAtt, cPr

   cAdd       := FWString( "Add" )
   cEdit      := FWString( "Edit" )
   cSearch    := FWString( "Search" )
   cDelete    := FWString( "Delete" )
   cSetup     :=  FWString( "Setup" )
   cAttention := FWString( "Attention" )
   cPrintErr  := FWString( "Printing Error" )

   aLangs     := { FWString( "English" ), FWString( "Spanish" ), FWString( "French" ), ;
                   FWString( "Portuguese" ), FWString( "German" ), FWString( "Italian" ) }
   nSelLang   := FWSetLanguage()

   // ASI, FUNCIONA EN EL BUTTON, NO COMPRENDO ??? jajajaja.
   cAtt := cAttention + SPACE( 02 ) // + " Error" // ERROR IN BUTTON: Attention

   // ASI, NO FUNCIONA EN EL DIALOGO DE FORMA NINGUNA.
   cPr  := cPrintErr  + SPACE( 02 ) // Erro de impressao... con ~

   // no funciona en el titulo del dialogo. ???
   cTitle := "FWH: " + cAtt + " - " + cPr

   // ? cTitle  // Esta correcto, pero no muestra en el dialogo ?

   // ? OemToansi( cAttention ) // error
   // ? AnsiToOem( cAttention ) // error

   //    cTitle := "FWH: titulo do dialogo nao esta funcionando"
   // DEFINE DIALOG oDlg TITLE cAttention + " / " + cPrintErr SIZE 520, 450

   //-> TITLE CON ERROR. EN PORTUGUES.
   DEFINE DIALOG oDlg TITLE cTitle SIZE 550, 450 // TRANSPARENT

   oDlg:lHelpIcon := .F.

   // --- SAY controls ---
   @ 0.5, 1 SAY "=== SAY Controls ===" OF oDlg
   @ 1.5, 1 SAY "Add: "       + cAdd       OF oDlg
   @ 2.3, 1 SAY "Edit: "      + cEdit      OF oDlg
   @ 3.1, 1 SAY "Search: "    + cSearch    OF oDlg
   @ 3.9, 1 SAY "Delete: "    + cDelete    OF oDlg
   @ 4.7, 1 SAY "Setup: "     + cSetup     OF oDlg
   @ 5.5, 1 SAY oSay1 PROMPT "Attention: " + cAttention OF oDlg
   @ 6.3, 1 SAY oSay2 PROMPT "Print Error: "  + cPrintErr  OF oDlg

   // --- BUTTON controls ---
   @ 0.5, 16 SAY "=== BUTTON Controls ===" OF oDlg
   @ 1.5, 16 BUTTON oBtn1 PROMPT cAdd      OF oDlg SIZE 50, 12 ACTION MsgInfo( cAdd )

   @ 3.0, 16 BUTTON oBtn2 PROMPT cEdit     OF oDlg SIZE 50, 12 ACTION MsgInfo( cEdit )

   @ 4.5, 16 BUTTON oBtn3 PROMPT cSearch   OF oDlg SIZE 50, 12 ACTION MsgInfo( cSearch )

   // --- More buttons with accented text ---
   @ 0.5, 26 SAY "=== More Buttons ===" OF oDlg

   // AQUI, TAMBIEN MUESTRA cAttention CON ERROR EN PORTUGUES. CON SPACE(02), FUNCIONA.
   //   @ 1.5, 26 BUTTON cAttention OF oDlg SIZE 50, 12 ACTION MsgInfo( cAttention )
   @ 1.5, 26 BUTTON cAtt       OF oDlg SIZE 50, 12 ACTION MsgInfo( cAttention )

   @ 3.0, 26 BUTTON cPrintErr  OF oDlg SIZE 50, 12 ACTION MsgInfo( cPrintErr )
   @ 4.5, 26 BUTTON oBtn4 PROMPT cDelete OF oDlg SIZE 50, 12 ACTION MsgInfo( cDelete )
   
// --- CHECKBOX controls --- @ 7.5, 1 SAY "=== CHECKBOX ===" OF oDlg @ 9.5, 1.5 CHECKBOX oChk1 VAR lDummy1 PROMPT cAdd OF oDlg SIZE 50, 12 // --- COMBOBOX control --- @ 7.5, 16 SAY "=== COMBOBOX ===" OF oDlg @ 9.5, 16 COMBOBOX oCbx1 VAR nSelLang ITEMS aLangs OF oDlg SIZE 120, 150 // --- Debug info --- @ 10.5, 1 SAY "=== Debug Info ===" OF oDlg @ 11.3, 1 SAY 'Add="' + cAdd + '" hex=' + StrToHex( cAdd ) OF oDlg @ 12.1, 1 SAY 'Attention="' + cAttention + '" hex=' + StrToHex( cAttention ) OF oDlg @ 12.9, 1 SAY "GetACP()=" + AllTrim( Str( GetACP() ) ) + ; " GetOEMCP()=" + AllTrim( Str( GetOEMCP() ) ) + ; " HbCDP=" + AllTrim( Str( HbCDP() ) ) OF oDlg // Show IsWindowUnicode info after dialog is created @ 14.2, 1 BUTTON "&Diagnose" OF oDlg SIZE 50, 13 ; ACTION DiagnoseControls( oDlg, oSay1, oBtn1, oChk1, oCbx1 ) @ 14.2, 15 BUTTON "&Ok" OF oDlg SIZE 45, 13 ACTION oDlg:End() @ 14.2, 26 BUTTON "&Cancel" OF oDlg SIZE 45, 13 ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED ; ON INIT DiagnoseControls( oDlg, oSay1, oBtn1, oChk1, oCbx1 ) return nil static function DiagnoseControls( oDlg, oSay, oBtn, oChk, oCbx ) local cInfo := "" cInfo += "Dialog hWnd Unicode: " + cYesNo( IsWindowUnicode( oDlg:hWnd ) ) + CRLF if oSay != nil cInfo += "SAY hWnd Unicode: " + cYesNo( IsWindowUnicode( oSay:hWnd ) ) + ; " lUnicode=" + cYesNo( oSay:lUnicode ) + CRLF endif if oBtn != nil cInfo += "BUTTON hWnd Unicode: " + cYesNo( IsWindowUnicode( oBtn:hWnd ) ) + ; " lUnicode=" + cYesNo( oBtn:lUnicode ) + CRLF endif if oChk != nil cInfo += "CHECKBOX hWnd Unicode: " + cYesNo( IsWindowUnicode( oChk:hWnd ) ) + ; " lUnicode=" + cYesNo( oChk:lUnicode ) + CRLF endif if oCbx != nil cInfo += "COMBOBOX hWnd Unicode: " + cYesNo( IsWindowUnicode( oCbx:hWnd ) ) + ; " lUnicode=" + cYesNo( oCbx:lUnicode ) + CRLF endif cInfo += CRLF cInfo += "GetACP() = " + AllTrim( Str( GetACP() ) ) + CRLF cInfo += "GetOEMCP() = " + AllTrim( Str( GetOEMCP() ) ) + CRLF cInfo += "HbCDP() = " + AllTrim( Str( HbCDP() ) ) + CRLF cInfo += "FW_SetUnicode() = " + cYesNo( FW_SetUnicode() ) + CRLF cInfo += CRLF cInfo += "FWString('Add') = " + FWString("Add") + " hex=" + StrToHex( FWString("Add") ) + CRLF cInfo += "FWString('Attention') = " + FWString("Attention") + " hex=" + StrToHex( FWString("Attention") ) + CRLF cInfo += "FWString('Printing Err') = " + FWString("Printing Error") + " hex=" + StrToHex( FWString("Printing Error") ) MsgInfo( cInfo, "Diagnostic Info" ) return nil static function cYesNo( l ) return If( l, "YES", "NO" ) static function StrToHex( cStr ) local n, cHex := "" for n := 1 to Min( Len( cStr ), 20 ) cHex += PadL( hb_NumToHex( Asc( SubStr( cStr, n, 1 ) ) ), 2, "0" ) if n < Min( Len( cStr ), 20 ) cHex += " " endif next return cHex // FIN / END

Regards, saludos.

Fixed. New beta available :wink:

regards, saludos

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

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

kajot wrote: Sat Mar 28, 2026 7:19 pm

I also can test it.

Please send me a whatsapp msg

regards, saludos

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

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

richard-service wrote: Sat Mar 28, 2026 6:30 pm

Dear Antonio,

I use FWH64 and compile error below:

Compiling...
Harbour 3.2.0dev (r2503251254)
Copyright (c) 1999-2024, https://harbour.github.io/
Compiling 'testime.prg' and generating preprocessed output to 'testime.ppo'...
Lines 6239, Functions/Procedures 2
Generating C source output to 'testime.c'... Done.
testime.prg(6) Warning W0002 Redefinition or duplicate definition of #define WM_CHAR
Embarcadero C++ 7.70 for Win64 Copyright (c) 2012-2023 Embarcadero Technologies, Inc.
testime.c:
Turbo Incremental Link64 6.98 Copyright (c) 1997-2023 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'LIBMARIADB64_BCC64.A'

  • Linking errors *

Fixed, included in new beta :wink:

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

Dear Antonio

fwh 26.03 beta 6
Any programm compiled with Harbour and BCC 770 32Bit many Errors in fivehc.

fivedbu or testlang compiled with Harbour and MSVC 32 and 64Bit
All problems with language are visible.

Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Dear Anton,

Yes, bcc32 and bcc32c was mixed. Now it is ok.

I am building a new beta, many thanks 🙏🏻

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
alerchster
Posts: 154
Joined: Mon Oct 22, 2012 4:43 pm

Re: FWH 26.03 betatesters wanted

Post by alerchster »

fivedbu or testlang, compiled with Harbour and MSVC 32- and 64-bit.

All language problems are back and visible!

Regards

Ing. Anton Lerchster
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 26.03 betatesters wanted

Post by Antonio Linares »

Dear Anton,

It is fixed and should not happen again, sorry :wink: When strings.prg was edited, the encoding changed.

I am sending you a new beta :idea:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply