RibbonBar PNG image disappear

RibbonBar PNG image disappear

Postby cnavarro » Thu May 16, 2013 9:41 am

Good morning
I have a RibbonBar with 8 or 10 images in PNG files (not Resources).
There are times when I run the application shows all other times if.
Appear all but one or two.
Even not always the same image.
Why might this be?
I appreciate any help
thanks

Buenos dias
Tengo un RibbonBar con 8 o 10 imagenes en ficheros PNG (No Recursos).
Hay veces que al ejecutar la aplicación no me aparecen todos y otras veces si.
Aparecen todos menos 1 o 2.
Incluso no siempre es la misma imagen.
A qué puede ser debido?
Agradezco cualquier ayuda
Gracias
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6524
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RibbonBar PNG image disappear

Postby Antonio Linares » Thu May 16, 2013 10:31 am

Cristobal,

I have used the FWH RibbonBars designer (FWH\samples\rbdesign.prg) to create this quick example and it is workings fine here:

Code: Select all  Expand view
#include "FiveWin.ch"
#include "ribbon.ch"

function BuildRibbonBar()

   local oRBar, oGr1_1, oBtn1_1_1, oBtn2_1_1, oBtn3_1_1, oBtn4_1_1, oBtn5_1_1, oBtn6_1_1, oBtn7_1_1
   local oWnd
   
   DEFINE WINDOW oWnd

   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT  "One", "Two", "Three" HEIGHT 134 TOPMARGIN 25

   ADD GROUP oGr1_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 600 GRADIANT { { 0.1, RGB( 218, 229, 243 ), RGB( 218, 229, 243 ) }, { 0.9, RGB( 199, 216, 237 ), RGB( 218, 229, 243 ) } }

   @ 3, 3 ADD BUTTON  oBtn1_1_1 PROMPT "new" BITMAP "C:\fwh\bitmaps\pngs\image1.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 83 ADD BUTTON  oBtn2_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image2.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 163 ADD BUTTON  oBtn3_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image3.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 243 ADD BUTTON  oBtn4_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image4.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 323 ADD BUTTON  oBtn5_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image5.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 403 ADD BUTTON  oBtn6_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image6.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   @ 3, 483 ADD BUTTON  oBtn7_1_1 PROMPT "new"  BITMAP "C:\fwh\bitmaps\pngs\image7.png" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 TOP

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar PNG image disappear

Postby James Bott » Thu May 16, 2013 2:23 pm

I have seen this type of thing when memory is low due to a memory leak. The next time it happens try rebooting to see if the problem goes away.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: RibbonBar PNG image disappear

Postby Antonio Linares » Thu May 16, 2013 2:45 pm

Cristobal,

What FWH version are you using ?

There was a nasty dissapearing bitmaps bug that was recently fixed. Maybe your version does not include such fix

viewtopic.php?p=140014#p140014
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar PNG image disappear

Postby cnavarro » Thu May 16, 2013 3:11 pm

Antonio
Version 12.03

El enlace que escribes tambien soluciona para archivos PNG?
Sigo investigando
Gracias

Anthony
Version 12.03

The link also resolved to write PNG files?
I'm still investigating
thanks
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6524
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RibbonBar PNG image disappear

Postby Antonio Linares » Thu May 16, 2013 3:34 pm

Cristobal,

It was fixed in FWH 13.02.

The code for the fix is in my above link, so you could try to implement it and see if that makes a difference :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar PNG image disappear

Postby cnavarro » Thu May 16, 2013 4:15 pm

Antonio Linares wrote:Cristobal,

It was fixed in FWH 13.02.

The code for the fix is in my above link, so you could try to implement it and see if that makes a difference :-)


Antonio, I added at the end of the application the code shown in the link you've written and keeps going. Although no error message appears.
I've added in the application or must be changed in some kind?
thanks

Antonio, he añadido al final de la aplicacion el codigo que aparece en el enlace que has escrito y sigue pasando. Aunque no aparece ningun mensaje de error.
Lo he añadido en la aplicacion o hay que cambiarlo en alguna clase?
Gracias
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6524
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RibbonBar PNG image disappear

Postby Antonio Linares » Thu May 16, 2013 5:05 pm

Cristobal,

Please place this call in the code of the modified C function to check if it is used or not:

MessageBox( 0, "ok", "called", 0 );
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar PNG image disappear

Postby cnavarro » Thu May 16, 2013 5:32 pm

Antonio Linares wrote:Cristobal,

Please place this call in the code of the modified C function to check if it is used or not:

MessageBox( 0, "ok", "called", 0 );


Antonio
No aparece el mensaje
Donde he de situarlo?

Gracias y un saludo

No message appears
Where I have to place it?

Thanks and regards
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6524
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RibbonBar PNG image disappear

Postby Antonio Linares » Thu May 16, 2013 5:40 pm

Cristobal,

Mas sencillo: Añade esta función a tu aplicación y dime si afecta a como se ve la ribbonbar:

function TransBmp()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar PNG image disappear

Postby cnavarro » Thu May 16, 2013 10:23 pm

Antonio Linares wrote:Cristobal,

Mas sencillo: Añade esta función a tu aplicación y dime si afecta a como se ve la ribbonbar:

function TransBmp()

return nil


Antonio
Asi funciona mucho mejor y falla mucho menos que antes.
Gracias de nuevo por tu tiempo
Saludos

So it works much better and gives a lot less than before.
Thanks again for your time
regards
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6524
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 20 guests