FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour btnbmp error on 15.01
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
btnbmp error on 15.01
Posted: Wed Jan 21, 2015 05:33 PM
I recompiled one my application with 15.01 and I saw all btnbmp buttons with bitmaps with black background... why ?




test.prg
Code (fw): Select all Collapse
#include "Fivewin.ch"
#include "constant.ch"

#define LIGHTCYAN    nRGB( 203, 225, 252 )


Function ZipBackup()

   LOCAL oDlg, oLbx, oCol
   Local   oBtnOk,oBtnNO ,oBtnConf
   Local  nBottom   := 24
   Local  nRight    := 51.9
   Local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight := nBottom * DLG_CHARPIX_H
   Local bClrGrad := { | lPressed | If( ! lPressed,;
                           { { 1, nRGB( 253, 254, 255 ), nRGB( 179, 217, 255 ) } },;
                           { { 1, nRGB( 179, 217, 255 ), nRGB( 253, 254, 255 ) } } ) }


     DEFINE DIALOG oDlg SIZE nWidth, nHeight   TRANSPARENT ;
      TITLE  " - creare una copia di salvataggio"  ;
      GRADIENT { { 1,CLR_WHITE, LIGHTCYAN } }


 @ 163, 90 BTNBMP oBtnOK PROMPT "&Conferma" RESOURCE "DLG_OK" SIZE 50, 15 ;
      LEFT NOBORDER    ACTION   (  oDlg:end( IDOK )  )

   oBtnOK:bClrGrad := bClrGrad

  @ 163, 145 BTNBMP oBtnCan PROMPT "&Annulla" RESOURCE "DLG_NO" SIZE 50, 15 ;
      LEFT NOBORDER         2007   ;
      ACTION   ( oDlg:end( IDCANCEL ) )

   oBtnCan:bClrGrad := bClrGrad

 ACTIVATE DIALOG oDlg 
return nil



I use these bmps

DLG_NO.bmp


DLG_OK.bmp




I saw also if change the size SIZE 50, 15 into SIZE 45, 12 perhaps it run but I not understood why ...
thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: btnbmp error on 15.01
Posted: Wed Jan 21, 2015 05:39 PM
Silvio,

can You add :

oBtn1:lTransparent := .t.

in all my buttons I'm using, this line is included
I never tested without this line.

best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp error on 15.01
Posted: Wed Jan 21, 2015 05:47 PM

Uwe
I found the error.. if the bmp is smaller run ok .... Now Imust change all buttons and all bmps... ufffffffff :(

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: btnbmp error on 15.01
Posted: Wed Jan 21, 2015 06:00 PM
Silvio,

NO, it must be something else ( tested with new FWH )
Images are adjusted to button-size.
Also tested => oBtn1:lTransparent := .t.
.t. or .f. doesn't make any difference.
I tested with alphablended bitmaps. I will test, using other images.



best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp error on 15.01
Posted: Wed Jan 21, 2015 11:47 PM

Please try this fix.

viewtopic.php?f=6t=30023

&

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp error on 15.01
Posted: Thu Jan 22, 2015 08:26 AM

Mr Rao,
I made the modifies and run ok
A question ... " if .t."
What is .t. ?
it not need a variable type "Uwe:= .t."

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp error on 15.01
Posted: Thu Jan 22, 2015 08:29 AM

.t. means true.

We shall soon publish a more comprehensive fix.

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp error on 15.01
Posted: Fri Jan 23, 2015 10:36 AM
But on Winxp professional SP3 I have also the error


@ 235, 118 BTNBMP oBtnOK PROMPT "&Conferma" RESOURCE "DLG_OK" SIZE 55, 12 ;
LEFT 2007 ROUND ACTION ( oDlg:end( IDOK ) )
oBtnOK:bClrGrad = bClrGrad
oBtnOK:oCursor := oCursorBtn
oBtnOK:cTooltip := i18n("Registra o modifica il movimento")

@ 235, 182 BTNBMP oBtnCan PROMPT "&Annulla" RESOURCE "DLG_NO" SIZE 55, 12 ;
LEFT 2007 ROUND ACTION ( oDlg:end( IDCANCEL ) )
oBtnCan:bClrGrad = bClrGrad
oBtnCan:oCursor := oCursorBtn
oBtnCan:cTooltip := i18n("Annulla la registrazione del movimento")



When I compile the preprocessor give me an error " Invalid numeric" ERROR ON LEFT
i MUST CHANGE WITH obtnCan:nLayout := 2 why ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp error on 15.01
Posted: Fri Jan 23, 2015 02:28 PM

Firstly your statement has syntax error.
There is no ROUND clause. Should be NOROUND or nothing.
I can also understand that you did not enable warnings for undeclared variables while compiling. That is the reason you did not notice this.

Please remove ROUND clause and it is always desirable to have "OF oDlg"

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp error on 15.01
Posted: Fri Jan 23, 2015 11:15 PM
Mr Rao , You're Right but I made a test

As you can see I put "ROUND" BUT NOT LEFT and I not inser of dlg and here the sample test run ok I not Know why

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "constant.ch"

Function Main()

   Local oDlg

   Local  nBottom   := 26
   Local  nRight    := 55
   Local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight := nBottom * DLG_CHARPIX_H

   Local oCursorBtn :=TCursor():New(,'HAND')
 Local oFont := TFont():New( GetDefaultFontName(), 0, GetDefaultFontHeight(),, )

 DEFINE DIALOG oDlg        ;
   TITLE  TXT_APPLICAZIONE  ;
   SIZE nWidth, nHeight   PIXEL               ;
   GRADIENT { { 1,LIGHTCYAN, LIGHTCYAN } } TRANSPARENT ;
   FONT oFont      STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION,  4 )  ICON oIcon

 @    ROW_BTN, 90 BTNBMP oBtnOK PROMPT "&Conferma" RESOURCE "DLG_OK" SIZE 55, 12 ROUND 2007;
       ACTION ( oDlg:end( IDOK ) )
      oBtnOK:bClrGrad = bClrGrad
      oBtnOK:oCursor := oCursorBtn
      oBtnOK:nLayout := 2
      oBtnOK:cTooltip := i18n("Attiva l'aggiornamento")

   @ ROW_BTN, 152 BTNBMP oBtnCan PROMPT "&Annulla" RESOURCE "DLG_NO" SIZE 55, 12 ROUND 2007;
       ACTION  ( oDlg:end( IDCANCEL ) )
      oBtnCan:bClrGrad = bClrGrad
      oBtnCan:oCursor := oCursorBtn
      oBtnCan:nLayout := 2
      oBtnCan:cTooltip := i18n("Annulla ed esci")


ACTIVATE DIALOG oDlg


retu nil


I must insert oBtnOK:nLayout := 2
instead of LEFT command
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp error on 15.01
Posted: Sat Jan 24, 2015 11:18 AM

There is no ROUND clause.
Your statements are syntactically wrong
You do not know because you are compiling unsafely.
Please use flags -w1 -es2
You can also check the preprocessed PPO.
When you have such problems please check your syntax. Please read again the command syntax in the fivewin.ch

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp error on 15.01
Posted: Sat Jan 24, 2015 12:19 PM
Nages,
I modify the test.prg

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "constant.ch"



#define TXT_APPLICAZIONE  "test"
#define LIGHTCYAN        nRGB( 203, 225, 252 )

Function Main()

   Local oDlg,oBtnok,oBtnCan,oIcon

   Local  nBottom   := 26
   Local  nRight    := 55
   Local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight := nBottom * DLG_CHARPIX_H

   Local oCursorBtn :=TCursor():New(,'HAND')
   Local oFont := TFont():New( "tahoma", 0, -12,, )

   Local ROW_BTN := 180

   Local bClrGrad := { | lPressed | If( ! lPressed,;
                           { { 1, nRGB( 253, 254, 255 ), nRGB( 179, 217, 255 ) } },;
                           { { 1, nRGB( 179, 217, 255 ), nRGB( 253, 254, 255 ) } } ) }

 DEFINE ICON oIcon FILENAME "ICON1"

 DEFINE DIALOG oDlg        ;
   TITLE  TXT_APPLICAZIONE  ;
   SIZE nWidth, nHeight   PIXEL               ;
   GRADIENT { { 1,LIGHTCYAN, LIGHTCYAN } } TRANSPARENT ;
   FONT oFont      STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION,  4 )  ICON oIcon

 @    ROW_BTN, 90 BTNBMP oBtnOK PROMPT "&Conferma" FILENAME "DLG_OK.BMP" SIZE 55, 12  2007;
      LEFT  ACTION ( oDlg:end( IDOK ) )
      oBtnOK:bClrGrad = bClrGrad
      oBtnOK:oCursor := oCursorBtn
    *  oBtnOK:nLayout := 2
      oBtnOK:cTooltip := i18n("Attiva l'aggiornamento")

   @ ROW_BTN, 152 BTNBMP oBtnCan PROMPT "&Annulla" FILENAME "DLG_NO.BMP" SIZE 55, 12 2007;
      LEFT  ACTION  ( oDlg:end( IDCANCEL ) )
      oBtnCan:bClrGrad = bClrGrad
      oBtnCan:oCursor := oCursorBtn
     * oBtnCan:nLayout := 2
      oBtnCan:cTooltip := i18n("Annulla ed esci")


ACTIVATE DIALOG oDlg


retu nil



I erase ROUND command as you sad me and there are not "of odlg" command and the dialog run the same

before the btnbmp class not was as now ( or perhaps I remember bad ...this week... I must see oldest app compiled)

I compile allways my apps with es2 and w1 as you can see in this picture

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp error on 15.01
Posted: Sat Jan 24, 2015 12:23 PM
I compile allways my apps with es2 and w1 as you can see in this picture

Good.
This is always safe and avoids many problems.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion