Page 1 of 1

New FWH 18.01

PostPosted: Wed Feb 14, 2018 5:04 pm
by Antonio Linares

Re: New FWH 18.01

PostPosted: Wed Feb 14, 2018 5:12 pm
by Antonio Linares
No os perdais los nuevos botones estilo Windows 10

viewtopic.php?f=3&t=35263

Re: New FWH 18.01

PostPosted: Wed Feb 14, 2018 6:46 pm
by ukoenig
Antonio,

running the new release with different samples
I noticed some image-problems

Image

the xbrowse-sample doesn't work anymore

missing alphablended

@ 518, 865 BITMAP oLogo[1] FILE c_path1 + "U-Kingdom.bmp" PIXEL NOBORDER OF oDlg
@ 554, 865 BITMAP oLogo[2] FILE c_path1 + "Spain.bmp" PIXEL NOBORDER OF oDlg
@ 589, 865 BITMAP oLogo[3] FILE c_path1 + "Italy.bmp" PIXEL NOBORDER OF oDlg
@ 625, 865 BITMAP oLogo[4] FILE c_path1 + "Germany.bmp" PIXEL NOBORDER OF oDlg
@ 660, 865 BITMAP oLogo[5] FILE c_path1 + "Portugal.bmp" PIXEL NOBORDER OF oDlg

FOR n := 1 to 5
aBitmap := oCol:aBitmap( If( n > nRating, 1, 2 ) )
oCol:oBrw:SayPalBmp( aBitmap, aBmpRect ) :!: line 651
aBmpRect[ 2 ] += 20
aBmpRect[ 4 ] += 20
NEXT

Code: Select all  Expand view

Application
===========
   Path and name: I:\__F_SAMPLES\SAMPLES.exe (32 bits)
   Size: 4,070,912 bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
   FiveWin  version: FWHX 18.01
   C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
   Windows version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 6 secs
   Error occurred at: 14/02/2018, 19:48:02
   Error description: Error BASE/1004  Message not found: TXBROWSE:SAYPALBMP

Stack Calls
===========
   Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SAYPALBMP( 10146 )
   Called from: .\CODE_1.PRG => SHOWRATING( 651 )
   Called from: .\CODE_1.PRG => (b)GRPC1_SEC2( 561 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 12843 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 12504 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 2028 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1753 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1697 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 10442 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3368 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
   Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SAYPALBMP( 10146 )
   Called from: .\CODE_1.PRG => SHOWRATING( 651 )
   Called from: .\CODE_1.PRG => (b)GRPC1_SEC2( 561 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 12843 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 12504 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 2028 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1753 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1697 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 10442 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3368 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\CODE_1.PRG => DO_CODE( 139 )
   Called from: .\SAMPLES.PRG => (b)MAIN( 282 )
 


regards
Uwe :?:

Re: New FWH 18.01

PostPosted: Thu Feb 15, 2018 1:09 am
by nageswaragunupudi
Please replace
:SayPalBmp(..)
with
Code: Select all  Expand view

:DrawImage(..)
 

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 11:54 am
by ukoenig
Thank You very much
it works

I had to add for all images

@ 518, 845 BITMAP oLogo[1] FILE c_path1 + "U-Kingdom.bmp" PIXEL NOBORDER OF oDlg
oLogo[1]:lTransparent = .t.

I think the release 17.12 has detected the alpachannel
and oLogo[1]:lTransparent = .t. was not needed :?:

regards
Uwe :?:

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 11:59 am
by nageswaragunupudi
I think the release 17.12 detected the alpha channel :?:

Mr Uwe

Upgrading FWH should not require you to change your source code.
In this case, it is our oversight.
Please make this correction in bitmap.prg

Line 733
Code: Select all  Expand view
     FW_DrawImage( Self, { ::hBitmap, ::hPalette, ::nImgWidth, ::nImgHeight }, aRect, ::lTransparent, 1, ::nAlphaLevel )
 


Please change it as:
Code: Select all  Expand view
     FW_DrawImage( Self, { ::hBitmap, ::hPalette, ::nImgWidth, ::nImgHeight }, aRect, ::lHasAlpha .or. ::lTransparent, 1, ::nAlphaLevel )
 

With this change you do not need to change your programs. Can you please check and confirm?

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 12:06 pm
by ukoenig
Mr. Rao,

Yes
In 17.12 I just needed to define the image.
I will test it in some samples changing between 17.12 and 18.1

regards
Uwe :roll:

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 12:08 pm
by nageswaragunupudi
ukoenig wrote:Mr. Rao,

Yes
In 17.12 I just needed to define the image.
I will test it in some samples changing between 17.12 and 18.1

regards
Uwe :roll:

Please apply the fix to bitmap.prg and provide your feedback please.

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 12:26 pm
by ukoenig
One more test
the original sample < bmptext.prg > I only changed the image

from
@ 1, 1 BITMAP oBmp FILENAME "..\bitmaps\fw.bmp" OF oWnd
to
@ 1, 1 BITMAP oBmp FILENAME "..\bitmaps\alphabmp\trash.bmp" OF oWnd
oBmp:lTransparent := .T.


1. compiled with 18.1
2. compiled with 17.12

Image

Code: Select all  Expand view

// Placing text on top of a bitmap

#include "FiveWin.ch"

#define TRANSPARENT 1

static oWnd

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

function Main()

   local oBmp

   DEFINE WINDOW oWnd TITLE "Text on a bitmap"

   @ 1, 1 BITMAP oBmp FILENAME "..\bitmaps\alphabmp\trash.bmp" OF oWnd

   oBmp:bPainted = { || SetBkMode( oBmp:hDC, TRANSPARENT ),;
                        TextOut( oBmp:hDC, 5, 5, "Hello" ) }

   ACTIVATE WINDOW oWnd

return nil
 


regards
Uwe

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 12:37 pm
by nageswaragunupudi
Mr Uwe

I think you did not see my posting above.
If you apply the fix I posted above to bitmap.prg, then it behaves like 17.12.

Image

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 12:44 pm
by ukoenig
Yes
I didn*t notice that You added a fix in the meantime sorry

regards
Uwe :D

Re: New FWH 18.01

PostPosted: Sat Feb 17, 2018 12:48 pm
by nageswaragunupudi
Thank you very much for testing and reporting.
Hope you will do more tests.