New FTDN September/Septiembre 2015 (FWH 15.09)

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby karinha » Thu Oct 01, 2015 4:35 pm

No Master. Puede compilar con el BRC32.EXE


Code: Select all  Expand view

// Testing Unicode Chinese Language

#include "fivewin.ch"
#include "Report.ch"
#include "print.ch"

REQUEST DBFCDX
REQUEST DBFFPT

//----------------------------------------------------------------------------//
Function Main()

LOCAL oApp

      InitApp()

      oApp := TUnicodeChinese():New()

RETURN NIL

FUNCTION InitApp()

   RddSetDefault("DBFCDX")

   SET DATE FORMAT "YYYY-MM-DD"
   SET DELETE ON

RETURN NIL

//
//
CLASS TUnicodeChinese

   DATA oWnd
   DATA oBar
 
   METHOD New() CONSTRUCTOR
   METHOD MenuBuild()
   METHOD DrawBar()
   METHOD DrawMsgBar()
   
   METHOD TestChinese_Code()
   METHOD TestChinese_Resource()
      METHOD PrnDataResource()    
     
ENDCLASS

METHOD New() CLASS TUnicodeChinese

      DEFINE WINDOW ::oWnd TITLE "測試 Unicode 繁體中文(Traditional Chinese)-例如堃,叙" ;
             MENU ::MenuBuild()  
                         
             ::DrawBar()  
             ::DrawMsgBar()            
                 
      ACTIVATE WINDOW ::oWnd MAXIMIZED
     
RETURN Self

//
METHOD MenuBuild() CLASS TUnicodeChinese
LOCAL oMenu

      MENU oMenu 2007
        MENUITEM "測試-例如堃,叙"
        MENU
            MENUITEM "測試CODE-例如堃,叙"     ACTION ::TestChinese_Code()
            SEPARATOR
            MENUITEM "測試RESOURCE-例如堃,叙" ACTION ::TestChinese_Resource()
            SEPARATOR
            MENUITEM "離開"                   ACTION ::oWnd:End()            
        ENDMENU
       
        MENUITEM "編輯" WHEN .F.
     
        oMenu:AddHelp()
                 
      ENDMENU

RETURN oMenu

//
METHOD DrawBar() CLASS TUnicodeChinese

   DEFINE BUTTONBAR ::oBar OF ::oWnd SIZE 60, 60 2007

   DEFINE BUTTON OF ::oBar ACTION ::TestChinese_Code();
      RESOURCE "new" TOOLTIP "測試中文輸入-Code/-例如堃,叙" PROMPT "å ƒ-C"

   DEFINE BUTTON OF ::oBar ACTION ::TestChinese_Resource();
      RESOURCE "new" TOOLTIP "測試中文輸入-Resource/-例如堃,叙" PROMPT "叙-R"

   DEFINE BUTTON OF ::oBar ACTION ::oWnd:End() ;
      RESOURCE "quit" TOOLTIP "離開系統" PROMPT "離開"
   
RETURN NIL

//
METHOD DrawMsgBar() CLASS TUnicodeChinese

SET MESSAGE OF ::oWnd TO "測試 Unicode 繁體中文(Traditional Chinese)-例如堃,叙" CENTERED 2007 CLOCK KEYBOARD

RETURN NIL

//
METHOD TestChinese_Code() CLASS TUnicodeChinese

LOCAL oDlg
LOCAL oSay2 , cSay2 := "地址-例如堃,叙"
LOCAL oSay  , cSay  := "姓名-例如堃,叙"
LOCAL oGet1 , cGet1 := SPACE( 100 )
LOCAL oGet2 , cGet2 := SPACE( 100 )
LOCAL oBut1 , oBut2

USE testchinese alias TEST

GO BOTTOM

cGet1 := TEST->NAME
cGet2 := TEST->ADDR


DEFINE DIALOG oDlg  FROM 10 , 10 TO 40 , 150

@ 1 ,  1 SAY oSay2 PROMPT cSay2 OF oDlg
@ 2 ,  1 SAY oSay  PROMPT cSay OF oDlg

@ 4 ,  1 GET oGet1 VAR cGet1 OF oDlg
@ 5 ,  1 GET oGet2 VAR cGet2 OF oDlg

@ 6 ,  1 BUTTON oBut2 PROMPT "存檔" ACTION write_dbf( cGet1 , cGet2 )
@ 6 , 10 BUTTON oBut1 PROMPT "列印" ACTION printtest()


ACTIVATE DIALOG oDlg
CLOSE DATABASE

RETURN NIL

FUNCTION WRITE_DBF( cGet1 , cGet2 )

      Append Blank
      TEST->( DbRLock() )        
      TEST->NAME := cGet1
      TEST->ADDR := cGet2
      TEST->( DbCommit() )    
      TEST->( DbUnLock() )    

RETURN NIL

function PrintTest()

   local oPrn := TPrinter():New( "Test" )  // "Test" is the name for the printout

   local fntArial
   local nRow := 1
   
   DEFINE FONT fntArial NAME "細明體" SIZE 0 , -80

   oPrn:StartPage()
   TEST->( DbGoTop() )
                           // starts a new page
   DO WHILE !EOF()
      oPrn:Say( nRow * 100 ,   10 , TEST->NAME , fntArial )
      oPrn:Say( nRow * 100 , 1000 , TEST->ADDR , fntArial )
      nRow ++
      SKIP
   ENDDO

   oPrn:EndPage()                          // ends this page

   RELEASE FONT fntArial

   oPrn:End()

return nil

//
//
METHOD TestChinese_Resource() CLASS TUnicodeChinese

local oDlg, oBrw, oReport, oGet[2], oSay[2], oBtn[3], oFont[4]
local lOK := .F.
local cNAME := space(100)
local cADDR := space(100)
local cAlias := ""

      USE testchinese alias TEST

      DEFINE DIALOG oDlg RESOURCE "TEST"

      REDEFINE SAY oSay[1] ID 101 OF oDlg
      REDEFINE SAY oSay[2] ID 102 OF oDlg
   
      REDEFINE GET oGet[1] Var cNAME ID 201 OF oDlg
      REDEFINE GET oGet[2] Var cADDR ID 202 OF oDlg
         
      REDEFINE BUTTON oBtn[1] ID 301 OF oDlg ;
               ACTION ( lOK := .T. , oDlg:End() )
           
      REDEFINE BUTTON oBtn[2] ID 302 OF oDlg ;
               ACTION ( lOK := .F. , oDlg:End() )
           
      REDEFINE BUTTON oBtn[3] ID 303 OF oDlg ;
               ACTION ( ::PrnDataResource(), oDlg:End() )        
           
      ACTIVATE DIALOG oDlg CENTERED
   
      IF lOK
         Append Blank
         TEST->( DbRLock() )        
         TEST->NAME := cNAME
         TEST->ADDR := cADDR
         TEST->( DbCommit() )    
         TEST->( DbUnLock() )
      ENDIF
     
RETURN NIL      
 
//
//
METHOD PrnDataResource() CLASS TUnicodeChinese

local oReport, oFont[4]
   
      TEST->( DbGoTop() )
   
      DEFINE FONT oFont[1] NAME "細明體" SIZE 0,12
      DEFINE FONT oFont[2] NAME "標楷體" SIZE 0,16 BOLD
      DEFINE FONT oFont[3] NAME "細明體" SIZE 0,12 BOLD
      DEFINE FONT oFont[4] NAME "標楷體" SIZE 0,22 BOLD
   
      REPORT oReport                                  ;
          TITLE   Trim("客戶資料報表-例如堃,叙")  ,;
                  ""                                   ,;
                  "列印日期:"+DTOC(DATE())+ REPL(" ",4) + ;
                  "頁次: "+str(oReport:nPage,3)  CENTER     ;
          HEADER ""                                   ,;
                 " " CENTER                            ;
          FONT oFont[1],oFont[2],oFont[3],oFont[4]     ;
          CAPTION "客戶資料報表-例如堃,叙"                        ;
          PREVIEW

          COLUMN TITLE "中文姓名-例如堃,叙" DATA TEST->NAME          
          COLUMN TITLE "中文地址-例如堃,叙" DATA TEST->ADDR
                         
      END REPORT
     
      IF oReport:lCreated
         oReport:oHEADER:aFONT[1]:={|| 4 }
         oReport:oTITLE:aFONT[1]:={|| 2 }
         oReport:oTITLE:aFONT[2]:={|| 1 }
         oReport:oTITLE:aFONT[3]:={|| 1 }
      ENDIF
     
      oReport:nTotalLine := RPT_SINGLELINE

      ACTIVATE REPORT oReport ON STARTGROUP oReport:NewLine()
   
      oFont[1]:End()
      oFont[2]:End()
      oFont[3]:End()
      oFont[4]:End()
     
      CLOSE DATABASE  
   
RETURN NIL
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby karinha » Thu Oct 01, 2015 4:36 pm

Code: Select all  Expand view

// Add this to your resources RC file


1 24 "WindowsXP.Manifest"

new      BITMAP "new.bmp"
quit     BITMAP "quit.bmp"

TEST DIALOG 20, 41, 356, 86
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "測試  Unicode 繁體中文(Traditional Chinese)-例如堃,叙"
FONT 12, "細明體"
{
 EDITTEXT 201, 68, 7, 170, 12
 EDITTEXT 202, 68, 22, 99, 12
 CONTROL "存檔", 301, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 8, 46, 18
 CONTROL "取消", 302, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 29, 46, 18
 CONTROL "列印", 303, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 50, 46, 18
 LTEXT "中文地址", 101, 5, 7, 60, 12
 LTEXT "中文姓名", 102, 5, 22, 60, 12
}

 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Antonio Linares » Sat Oct 03, 2015 7:35 am

September 2015 (revised build)
==============================

* Fix: Fixed bug in function ExtTextOut().

* Unicode support extended to messagebar, TOutlook (all versions), TTreeView, TExplorerbar, TVistamenu, Tooltips, c5tooltips, etc

* Enhancement: Tooltip of oBtn TGet
regards, saludos

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

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Enrico Maria Giordano » Sat Oct 03, 2015 9:42 am

Antonio,

any news regarding font menu bug?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Antonio Linares » Sat Oct 03, 2015 9:45 am

Enrico,

I am afraid that I missed your email.

Could you send your example to Cristobal ? He is supervising the menus.

thanks!
regards, saludos

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

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Enrico Maria Giordano » Sat Oct 03, 2015 9:58 am

Antonio,

he already has my sample. Anyway, here it is:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oFnt, oWnd

    DEFINE FONT oFnt NAME "Arial" SIZE 0, -7

    DEFINE WINDOW oWnd

    oWnd:SetFont( oFnt )

    DEFINE BUTTONBAR OF oWnd 2007

    DEFINE BUTTON;
           OF oWnd:oBar;
           PROMPT "Test";
           MENU TESTMENU();
//           FONT oFnt

    ACTIVATE WINDOW oWnd

    RELEASE FONT oFnt

    RETURN NIL


STATIC FUNCTION TESTMENU()

    LOCAL oMen

    MENU oMen POPUP
        MENUITEM "This is a long menu item"
    ENDMENU

    RETURN oMen


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Antonio Linares » Sat Oct 03, 2015 10:17 am

Enrico,

Have you tested it with the new 15.09 build ?
regards, saludos

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

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Enrico Maria Giordano » Sat Oct 03, 2015 9:20 pm

Antonio,

yes, just tested. Unfortunately there are the following problems:

1. The ExtTextOut() bug is still there, or there is something similar for DrawText() (the background of the browse cell is not fully painted).

2. Menu width is not correctly calculated (sometimes the menuitem text is truncated).

3. Submenus still use the window or dialog font (menus are ok).

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby cnavarro » Mon Oct 05, 2015 8:37 am

Solved (menus and submenus )

Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6542
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Sistem » Mon Oct 05, 2015 6:17 pm

fwh1509 build2

Image
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby cnavarro » Mon Oct 05, 2015 6:45 pm

Hello
You can put as you have defined the menu?

Code: Select all  Expand view


   MENU oMenu .. . . . . . . .
 


No SKIN
Image

SKIN 2007
Image

SKIN 2010
Image

SKIN 2015
Image

SKIN 2013
Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6542
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Sistem » Mon Oct 05, 2015 7:50 pm

Hola
MENU oMenu 2007
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby cnavarro » Mon Oct 05, 2015 7:58 pm

Sistem wrote:Hola
MENU oMenu 2007


Ok
Enviame un mail a navarro . cristobal [at] gmail . com sin espacios

Send me a mail : navarro . cristobal [at] gmail . com

Compilador BCC582, BCC7, VS .... ? and version
Harbour o XHarbour

Saludos
Last edited by cnavarro on Sat Oct 10, 2015 9:38 pm, edited 1 time in total.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6542
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: New FTDN September/Septiembre 2015 (FWH 15.09)

Postby Sistem » Thu Oct 08, 2015 7:13 pm

Agora trabalha bem, com a grande ajuda do amigo Navarro
antes
Image

depois
Image

[]s a todos
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

PreviousNext

Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 5 guests