btnbmp error on 15.01

btnbmp error on 15.01

Postby Silvio.Falconi » Wed Jan 21, 2015 5:33 pm

I recompiled one my application with 15.01 and I saw all btnbmp buttons with bitmaps with black background... why ?

Image


test.prg
Code: Select all  Expand view  RUN

#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
Image

DLG_OK.bmp
Image



I saw also if change the size SIZE 50, 15 into SIZE 45, 12 perhaps it run but I not understood why ...
thanks
Last edited by Silvio.Falconi on Wed Jan 21, 2015 5:43 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7069
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp error on 15.01

Postby ukoenig » Wed Jan 21, 2015 5: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: btnbmp error on 15.01

Postby Silvio.Falconi » Wed Jan 21, 2015 5: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7069
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp error on 15.01

Postby ukoenig » Wed Jan 21, 2015 6: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.

Image

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: btnbmp error on 15.01

Postby nageswaragunupudi » Wed Jan 21, 2015 11:47 pm

Please try this fix.
viewtopic.php?f=6&t=30023
Regards

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

Re: btnbmp error on 15.01

Postby Silvio.Falconi » Thu Jan 22, 2015 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7069
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp error on 15.01

Postby nageswaragunupudi » Thu Jan 22, 2015 8:29 am

.t. means true.

We shall soon publish a more comprehensive fix.
Regards

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

Re: btnbmp error on 15.01

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7069
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp error on 15.01

Postby nageswaragunupudi » Fri Jan 23, 2015 2: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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: btnbmp error on 15.01

Postby Silvio.Falconi » 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: Select all  Expand view  RUN
#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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7069
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp error on 15.01

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: btnbmp error on 15.01

Postby Silvio.Falconi » Sat Jan 24, 2015 12:19 pm

Nages,
I modify the test.prg

Code: Select all  Expand view  RUN
#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

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7069
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp error on 15.01

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 54 guests