New FWH 24.09

Re: New FWH 24.09

Postby nageswaragunupudi » Tue Oct 08, 2024 3:20 am

Code: Select all  Expand view
HB_FUNC( GETACP )   { hb_retni( GetACP() );   }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby karinha » Tue Oct 08, 2024 1:22 pm

Master Nages, en xHarbour, esto no funciona bien.

Code: Select all  Expand view

#include "fivewin.ch"

REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850

FUNCTION Main()

   // before setting codepage
   ? GetOEMCP(), GetACP(), HB_CDPUNIID() // , HBCDP() ?? NOT XHARBOUR

   // Result: 850-1252-cp437 - FWH1905 - HARBOUR

   HB_SETCODEPAGE( "PT850" )

   ? GetOEMCP(), GetACP(), HB_CDPUNIID() // , HBCDP() ?? NOT XHARBOUR

   // Result: 850-1252-cp850 - FWH1905 - HARBOUR

RETURN NIL

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( GETACP )   { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }

#pragma ENDDUMP
 


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

Re: New FWH 24.09

Postby nageswaragunupudi » Sat Oct 12, 2024 11:34 am

Mr. João Santos (Karinha)

-> SkinButtons() // Problemas con este comando en versiones nuevas?


Please apply this fix in \fwh\source\classes\button.prg

Please locate these lines at the end of the TBUTTON CLASS definition.

Code: Select all  Expand view
   METHOD Html() INLINE ButtonHtml( ::hWnd )

   METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0

   METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )

ENDCLASS


Please modify these lines as:
Code: Select all  Expand view
   METHOD Html() INLINE ButtonHtml( ::hWnd )

   if ! SetSkins()

      METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0
      METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )

   endif

ENDCLASS


Please apply this fix and let us know if the problem is resolved.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby nageswaragunupudi » Sat Oct 12, 2024 1:23 pm

nageswaragunupudi wrote:
using GDIPLUS, see what the ampersand looks like.

I noticed this and will provide a fix.


This issue is fixed in the next version.
For now, please apply this temporary fix:

\fwh\source\classes\btnbmp.prg

Please go to METHOD PaintCaption()
Towards the end of this method, please locate this code:
Code: Select all  Expand view
     nClr  := XEval( nClr, ::lMover, Self )
      if ::lGdip .and. HB_ISNUMERIC( nClr ) .and. !lAnd( nClr, 0xff000000 )
         nClr  := nARGB( 255, nClr )
      endif

      ::SayText( cCaption, oRect:aRect, cAlign, oFont, nClr )

      // Painting done

   endif

return nil


Please change like this, commenting out the 3 lines starting with "if ::lGdp .. "
Code: Select all  Expand view
     nClr  := XEval( nClr, ::lMover, Self )
 
/*
     if ::lGdip .and. HB_ISNUMERIC( nClr ) .and. !lAnd( nClr, 0xff000000 )
         nClr  := nARGB( 255, nClr )
      endif
*/

      ::SayText( cCaption, oRect:aRect, cAlign, oFont, nClr )

      // Painting done

   endif

return nil
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby karinha » Sat Oct 12, 2024 4:11 pm

Congratulations beloved master! Problems with BTNBMP and GDIPLUS, RESOLVED.

THE PROBLEM PERSISTS with BUTTONBMP as shown in the image:

¡Felicidades amado maestro! Problemas con BTNBMP y GDIPLUS, RESUELTOS.

EL PROBLEMA PERSISTE con BUTTONBMP como se muestra en la imagen:

https://imgur.com/j9ZC6sT

Tenga en cuenta que el signo comercial ahora aparece correctamente como en la versión FWH19.05.

Note that the ampersand now appears correctly as in version FWH19.05.

Image

Waiting for solution for BUTTONBMP, you are great beloved master.

Esperando solución para BUTTONBMP, eres un gran amado maestro.

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

Re: New FWH 24.09

Postby nageswaragunupudi » Sat Oct 12, 2024 6:09 pm

In my tests here, ButtonBmp is working fine here with and without SkinButtons.

This is my test program:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oDlg, oFont, aGet[ 2 ], oBtn
   local cText1 := "Good Morning          "
   local cText2 := "Good Evening          "

   SetGetColorFocus()

   SkinButtons()

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
   DEFINE DIALOG oDlg FROM 0,0 TO 400,600 PIXEL TRUEPIXEL ;
      TITLE "SkinButtons"
   oDlg:SetFont( oFont )

   @ 40,40 GET aGet[ 1 ] VAR cText1 SIZE 500,36 PIXEL OF oDlg ;
      ACTION MsgInfo( "one" ) BITMAP "..\bitmaps\chkyes.bmp"

   @ 100,40 GET aGet[ 2 ] VAR cText2 SIZE 500,36 PIXEL OF oDlg ;
      ACTION MsgInfo( "two" ) BITMAP "..\bitmaps\cancel.bmp"

   AEval( aGet, { |o| o:lAdjustBtn := .t. } )
//   AEval( aGet, { |o| o:lBtnTransparent := .t. } )

   @ 200, 40 BUTTON    "&Button" SIZE 150,80 PIXEL OF oDlg

   @ 200,220 BUTTONBMP PROMPT "&ButtonBmp" SIZE 320,80 PIXEL OF oDlg GDIP ;
      BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT

   ACTIVATE DIALOG oDlg CENTERED

return nil


Image

Can you test this program and let me know?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby karinha » Sat Oct 12, 2024 8:46 pm

Good afternoon beloved master:

NO IT'S NOT! Hover over the DIALOGUE and BUTTONS. And use the TRANSPARENT command in the DIALOG too!

Buenas tardes amado maestro:
¡NO, NO LO ES! Pase el cursor sobre el DIÁLOGO y los BOTONES. ¡Y use el comando TRANSPARENT en el DIÁLOGO también!

Gracias, tks.

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

Re: New FWH 24.09

Postby nageswaragunupudi » Sun Oct 13, 2024 1:30 am

I did not face any problems with transparent/no-transparent using any combinations and with mouse-hovering too.
This is an enhanced test:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oDlg, oBrush, oFont, aGet[ 2 ], oBtn, oBtn2
   local cText1 := "Good Morning          "
   local cText2 := "Good Evening          "

   SetGetColorFocus()

   if MsgYesNo( "SkinButtons ?" )
      SkinButtons()
   endif

   DEFINE BRUSH oBrush FILE "..\bitmaps\backgrnd\beach.bmp"
   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
   DEFINE DIALOG oDlg FROM 0,0 TO 400,600 PIXEL TRUEPIXEL ;
      TITLE "TITLE"
   oDlg:SetBrush( oBrush )
   oDlg:SetFont( oFont )
   oDlg:lTransparent := MsgYesNo( "Transparent Dialog?" )

   @ 40,40 GET aGet[ 1 ] VAR cText1 SIZE 500,36 PIXEL OF oDlg ;
      ACTION MsgInfo( "one" ) BITMAP "..\bitmaps\chkyes.bmp"

   @ 100,40 GET aGet[ 2 ] VAR cText2 SIZE 500,36 PIXEL OF oDlg ;
      ACTION MsgInfo( "two" ) BITMAP "..\bitmaps\cancel.bmp"

   AEval( aGet, { |o| o:lAdjustBtn := .t. } )

   if MsgNoYes( "Transparent GetButtons?" )
      AEval( aGet, { |o| o:lBtnTransparent := .t. } )
   endif

   @ 200, 40 BUTTON    "&Button" SIZE 150,80 PIXEL OF oDlg

   @ 200,220 BUTTONBMP oBtn PROMPT "&ButtonBmp" SIZE 320,80 PIXEL OF oDlg GDIP ;
      BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT

   oBtn:lTransparent := MsgYesNo( "Transparent ButtonBmp?" )

   @ 300,320 BTNBMP oBtn2 PROMPT "&BtnBmp" SIZE 220,80 PIXEL OF oDlg GDIP ;
      BITMAP "..\bitmaps\pngs\image8.png" LEFT 2007

   oBtn2:lTransparent := MsgNoYes( "Transparent BtnBmp?" )

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont
   RELEASE BRUSH oBrush

return nil


Please execute this program and see.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby karinha » Sun Oct 13, 2024 12:49 pm

Good morning Master Nages. Below is a simple example used DAY to DAY in a IT company and how I teach and provide support. Master Nages, I ONLY USE XHARBOUR! Compile with XHARBOUR. If you have version FWH19.05, compile it with it and compare the disaster it is with FWH24.09, please.

Buenos días Maestro Nages. A continuación se muestra un ejemplo sencillo que se utiliza DÍA a DÍA en una empresa de Informática y cómo enseño y brindo apoyo. Maestro Nages, ¡SOLO UTILIZO XHARBOUR! Compile con XHARBOUR. Si tienes la versión FWH19.05 compílala con ella y compara el desastre que es con FWH24.09, por favor.

Code: Select all  Expand view

// C:\FWH\SAMPLES\TESTBMP6.PRG - Simplesmente Terrible!!!

#include "fivewin.ch"

FUNCTION Main()

   LOCAL oDlg, oFont, aGet[ 2 ], oBtn, oBtn1, oBtn2, oBtn3, oBtn4, oSay
   LOCAL cText1 := "Good Morning Mister Nages...  "
   LOCAL cText2 := "Good Evening Enrico: XHARBOUR?"

   SkinButtons() // NO FUNCIONA CON XHARBOUR!! COMPILAR CON FWH19.05 PLS!!

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0, - 24

   DEFINE DIALOG oDlg FROM 0, 0 TO 400, 600 PIXEL TRUEPIXEL FONT oFont ;
      TITLE "COMPILAR CON XHARBOUR" TRANSPARENT

   oDlg:lHelpIcon := .F.

   @ 01, 15 SAY oSay PROMPT "Good Evening Enrico: Compile con XHARBOUR, Pls."   ;
      OF oDlg SIZE 440, 50 PIXEL COLORS CLR_BLACK, CLR_WHITE TRANSPARENT ADJUST ;
      UPDATE

   @ 40, 40 GET aGet[1] VAR cText1 SIZE 500, 36 PIXEL OF oDlg UPDATE         ;
      ACTION MsgInfo( "one" ) BITMAP "..\bitmaps\chkyes.bmp"

   aGet[1]:lBtnTransparent := .T.       // transparent button get aGet[1]
   aGet[1]:lAdjustBtn      := .T.       // Button Get Adjust Witdh aGet[1]
   aGet[1]:lDisColors      := .F.       // Deactive disable color
   aGet[1]:nClrTextDis     := CLR_WHITE // Color text disable status
   aGet[1]:nClrPaneDis     := CLR_BLUE  // Color Pane disable status

   @ 100, 40 GET aGet[2] VAR cText2 SIZE 500, 36 PIXEL OF oDlg UPDATE        ;
      ACTION MsgInfo( "two" ) BITMAP "..\bitmaps\cancel.bmp"

   aGet[2]:lBtnTransparent := .T.       // transparent button get aGet[1]
   aGet[2]:lAdjustBtn      := .T.       // Button Get Adjust Witdh aGet[1]
   aGet[2]:lDisColors      := .F.       // Deactive disable color
   aGet[2]:nClrTextDis     := CLR_WHITE // Color text disable status
   aGet[2]:nClrPaneDis     := CLR_BLUE  // Color Pane disable stat

   @ 200, 40 BUTTON oBtn PROMPT "&Button" SIZE 150, 80 PIXEL OF oDlg

   oBtn:lTransparent := .F.

   @ 145,220 BUTTONBMP oBtn1 PROMPT "&GDIP CON ButtonBmp" SIZE 320,50 PIXEL  ;
      OF oDlg BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT GDIP

   @ 200, 220 BUTTONBMP oBtn2 PROMPT "&ButtonBmp SIN GDIP" SIZE 320,80 PIXEL ;
      OF oDlg BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT

   oBtn2:lTransparent := .T.

   @ 300, 320 BTNBMP oBtn3 PROMPT "&BtnBmp CON GDIP" SIZE 220, 80 PIXEL      ;
      OF oDlg COLOR CLR_HBLUE, CLR_BLACK BITMAP "..\bitmaps\pngs\image8.png" ;
      LEFT FLAT 2007 GDIP

   oBtn3:lTransparent := .T.

   oBtn3:nRound  := 60

   oBtn3:bClrGrad := { |lInvert| If( lInvert, 0x60FFA54A, nARGB( 64, 0, 192, 0 ) ) }

   oBtn3:SetThemed(.T.)

   @ 300, 005 BTNBMP oBtn4 PROMPT "BtnBmp &SIN GDIP" SIZE 220, 80 PIXEL OF oDlg ;
      BITMAP "..\bitmaps\pngs\image8.png" LEFT FLAT 2007

   oBtn4:lTransparent := .T.

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

RETURN NIL

// FIN / END - kapiabafwh@gmail.com
 


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

Re: New FWH 24.09

Postby nageswaragunupudi » Sun Oct 13, 2024 2:00 pm

Good morning Master Nages. Below is a simple example used DAY to DAY in a IT company and how I teach and provide support. Master Nages, I ONLY USE XHARBOUR!


Sure I will check this sample.

I normally post my samples, after testing with both Harbour and xHarbour 32bits.
But one request.
When I post any sample, first please execute that sample as it is in fwh\samples folder with build??.bat and provide your feedback if there is any problem with that sample or not.
This feedback is very useful to me to provide support on other variations.
Please execute the above two examples atleast now and tell me if they are working well or not.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby karinha » Sun Oct 13, 2024 2:10 pm

Master Nages, I don't have this version of FWH24.09 installed on my machine. I always make the example and send it to those who have version FWH24.09, if you authorize me, send me the Fivehx.lib and FiveHC.lib of FWH24.09 and I will be happy to compile them. Don't worry, I'll just use it for testing. Email for sending: joao@pleno.com.br

Maestro Nages, no tengo esta versión de FWH24.09 instalada en mi máquina. Siempre hago el ejemplo y se lo envío a los que tienen la versión FWH24.09, si me autorizan envíenme el Fivehx.lib y el FiveHC.lib de FWH24.09 y con gusto los compilaré. No te preocupes, solo lo usaré para probar. Correo electrónico para envío: joao@pleno.com.br

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

Re: New FWH 24.09

Postby nageswaragunupudi » Sun Oct 13, 2024 2:41 pm

nageswaragunupudi wrote:Mr. João Santos (Karinha)

-> SkinButtons() // Problemas con este comando en versiones nuevas?


Please apply this fix in \fwh\source\classes\button.prg

Please locate these lines at the end of the TBUTTON CLASS definition.

Code: Select all  Expand view
   METHOD Html() INLINE ButtonHtml( ::hWnd )

   METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0

   METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )

ENDCLASS


Please modify these lines as:
Code: Select all  Expand view
   METHOD Html() INLINE ButtonHtml( ::hWnd )

   if ! SetSkins()

      METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0
      METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )

   endif

ENDCLASS


Please apply this fix and let us know if the problem is resolved.


We advised this fix earlier in this post.
If the user applied this fix, your above "disaster" program also works fine with both xHarbour and Harbour.
I tested your program and it works perfectly here with both xHarbour and Harbour.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 24.09

Postby karinha » Sun Oct 13, 2024 5:37 pm

Dear master. On Monday, I will modify the BUTTON.PRG class myself and test the example and, with great pride in being FIVEWINNER, I will report the result to the beloved master. Thank you very much and sorry for anything. hahahahaha.

Querido maestro. El lunes modificaré yo mismo la clase BUTTON.PRG y probaré el ejemplo y, con gran orgullo de ser FIVEWINNER, informaré del resultado al amado maestro. Muchas gracias y perdón por cualquier cosa. jajajajaja.

Gracias, tks.

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

Re: New FWH 24.09

Postby karinha » Mon Oct 14, 2024 1:57 pm

Master Nages: AMAZING! Problems with the BUTTONS, resolved. Congratulations beloved master!
Now, all we need to do is resolve the OEMTOANSI() problem.

Maestro Nages: ¡INCREÍBLE! Problemas con los BOTONES, resueltos. ¡Felicidades amado maestro!
Ahora, todo lo que tenemos que hacer es resolver el problema OEMTOANSI().

https://imgur.com/mbq5vrs

Image

Gracias, tks.

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

Re: New FWH 24.09

Postby nageswaragunupudi » Mon Oct 14, 2024 3:32 pm

Give me a small sample OEM string

DO NOT copy and paste here. That will automatically convert the string to UTF8.

Please give here a list of ASC values of each character.

Eg. If your string is
"AB"
You give me as
65,66
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10551
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 24 guests