Imagem em BTNBMP

Imagem em BTNBMP

Postby Sistem » Fri Feb 28, 2020 8:31 pm

com a versao fwh1912 acontece isto:
Image
com a versao fwh1903 funciona normal
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Fri Feb 28, 2020 11:57 pm

Can you give the source code for creating of this BTNBMP?
Regards

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

Re: Imagem em BTNBMP

Postby Sistem » Sun Mar 01, 2020 12:27 pm

Code: Select all  Expand view
tbtnbig.prg
#include "FiveWin.ch"
function Main()
 local oDlg
   DEFINE DIALOG oDlg FROM 4, 4 TO 10, 28 TITLE "test"
   @ 1, 1 BTNBMP OF oDlg SIZE 40, 13 PIXEL 2007 NOBORDER PROMPT "Imprimir" LEFT RESOURCE "BMP_PRIN" ACTION (alert("teste"), oDlg:End())    // size 40  bmpBIG(fhw1912)  # (fhw1903 OK)
   @ 20, 1 BTNBMP OF oDlg SIZE 42, 13 PIXEL 2007 NOBORDER PROMPT "Imprimir" LEFT RESOURCE "BMP_PRIN" ACTION (alert("teste"), oDlg:End())  // size 42 OK
  ACTIVATE DIALOG oDlg CENTERED
return nil
tbtnbig.rc
BMP_PRIN BITMAP "prin.bmp"
 

Image

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

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Sun Mar 01, 2020 12:46 pm

Thanks. We will look into this now.
Regards

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

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Sun Mar 01, 2020 1:23 pm

Tried with this program:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oDlg

   DEFINE DIALOG oDlg FROM 4, 4 TO 10, 28 TITLE FWVERSION

   @  1, 1 BTNBMP OF oDlg SIZE 40, 13 PIXEL 2007 NOBORDER PROMPT "Imprimir" LEFT RESOURCE "BMP_PRIN" ACTION (alert("teste"), oDlg:End())    // size 40  bmpBIG(fhw1912)  # (fhw1903 OK)
   @ 20, 1 BTNBMP OF oDlg SIZE 42, 13 PIXEL 2007 NOBORDER PROMPT "Imprimir" LEFT RESOURCE "BMP_PRIN" ACTION (alert("teste"), oDlg:End())  // size 42 OK

  ACTIVATE DIALOG oDlg CENTERED

return nil


rc file
Code: Select all  Expand view
BMP_PRIN  BITMAP "c:\fwh\bitmaps\print3.bmp"


result:
Image

We are not able to reproduce the problem with this sample.
Can you please modify the test program or rc file suitable to help us to reproduce the problem and solve the issue.
Regards

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

Re: Imagem em BTNBMP

Postby Sistem » Sun Mar 01, 2020 1:45 pm

nageswaragunupudi
Image <= use this file... rename to prin.bmp with paint... save as BMP
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Sun Mar 01, 2020 1:54 pm

Instead, can you please send me the actual bmp file to me?

nageswaragunupudi <at> gmail <dot> com
Regards

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

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Sun Mar 01, 2020 2:04 pm

Yes, I am able to reproduce the problem.
We will study and come back to you.
Regards

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

Re: Imagem em BTNBMP

Postby Sistem » Sun Mar 01, 2020 2:10 pm

ok, thank you
BMP_PRIN BITMAP "E:\fwh1912\bitmaps\16dbgbrk.bmp"
Image
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Sun Mar 01, 2020 4:29 pm

The problem is narrowed down to be between 1903 and 1906.
We are looking into.
Regards

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

Re: Imagem em BTNBMP

Postby nageswaragunupudi » Sun Mar 01, 2020 6:11 pm

Thanks for pointing out this bug. Fixed for the next release.

For versions FWH1906, FWH1912 and FWH2002 we request the users to apply this fix to the btnbmp.prg:

Please locate these lines in the method PaintBitmap()
Code: Select all  Expand view

   if Len( aBmpRect ) > 4
      uResize  := aBmpRect[ 5 ]
   endif
   aBmpRect    := oBtnRect:Modify( aBmpRect ):aRect
 

You will find these lines at line No.1635 in FWH2002 and FWH1912 and at line No.1624 in FWH1906.

Please insert this line of code:
Code: Select all  Expand view

   AEval( aBmpRect, { |n,i| If( n != nil .and. n < 1.0, aBmpRect[ i ] := ROUND( n, 0 ), nil ) } )
 

in between "endif" and "aBmpRect := ..."

After insertion, the revised code should look like this:
Code: Select all  Expand view

   if Len( aBmpRect ) > 4
      uResize  := aBmpRect[ 5 ]
   endif
   AEval( aBmpRect, { |n,i| If( n != nil .and. n < 1.0, aBmpRect[ i ] := ROUND( n, 0 ), nil ) } )
   aBmpRect    := oBtnRect:Modify( aBmpRect ):aRect
 


Regret the inconvenience.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests