FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Loosing buttons in RibbonBar
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Loosing buttons in RibbonBar
Posted: Mon Jun 25, 2012 10:20 PM
Just started to use FWH12.04, I used to compile with FWH10.02, but I have noticed a couple of times already that I am loosing images from RibbonBar..., today lost them all from all folders...
I moved from folder to folder but did't got them back until I opened a dialog that used BlurEffect...



I am thinking it was a really bad idea upgrading FiveWin and moving from xHarbour1.21 to Harbour 3.2 at the same time...

I am opening this thread in case somebody has experience with RibbonBar and loosing buttons and can help me out... and to share my solutions in case a reach one...

So far in 4 days after upgrading, I have lost images about 6 times... After moving back to Harbour 3.0 I have experienced none so far... Hope that's it...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Mon Jun 25, 2012 11:12 PM
So far, removing from window:

Code (fw): Select all Collapse
STYLE nOr( WS_POPUP )


It seem to make the difference...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Tue Jun 26, 2012 03:03 AM

Well, it seem that the class has a problem with the painting...

The problem can be seen when the bar is resized with or maximized or restored from maximized...

It did not happen when minimized

I don't think I can make an contained example to reproduce the problem...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Loosing buttons in RibbonBar
Posted: Tue Jun 26, 2012 07:36 AM

Bayron,

Are you using BMPs there ? From resources or loaded from files in disk ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Tue Jun 26, 2012 03:00 PM
Yes they are BMP's loaded from resources...

What I found out is that if I don't mess with the RibbonBar, everything is ok... The problem was that I was using WS_POPUP. This caused some problems, which I solved with my own refreshing function:

Code (fw): Select all Collapse
FUNCTION RefRBar()

    For n = 1 To Len(oRBar:aDialogs)
        oRBar:aDialogs[n]:Refresh()

        For m = 1 to Len(oRBar:aDialogs[n]:aControls)
            oRBar:aDialogs[n]:aControls[m]:Refresh()
            
            For l = 1 to Len(oRBar:aDialogs[n]:aControls[m]:aControls)
                oRBar:aDialogs[n]:aControls[m]:aControls[l]:Refresh()
            
            EndFor
            
        EndFor

    EndFor
    
    oBtn101:Refresh()
    oBtn102:Refresh()
    oBtn103:Refresh()
    oBtn104:Refresh()
    
RETURN NIL

This controled the problem with xHarbour, but didn't with Harbour...

I think the problem may also be caused because I paint 4 BTNBMP's in the RibbonBar... But the ribbon is working fine now with the buttons...

So far I removed:
The Window Style,
The refresh function,
The BlurEffect and
The Maximize and Restore Functions

If I Reactivate the Window Style, The Group's brush is lost only on the initial painting of the window, and then is OK... This behavior can be replicated by just using this style in samples\Ribbon.prg

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Wed Jun 27, 2012 01:41 AM
I guess that the function that I just found in tribbon.prg is a lot more sophisticated, and therefore better to use...

Code (fw): Select all Collapse
RefreshRibbonBarBtn( oRb )


I will try to use it on the window data :bGotFocus, so far It does not flickers so I'll see....

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Sun Jul 01, 2012 07:44 PM
The problem with loosing images from resources has continued, this time I noticed that even the resource used with REDEFINE BITMAP on a standard Dialog was missing when all images where lost from the RibbonBar...

This has never happend to me and only started when upgraded to FWH12.04 from 10.2

After this finding, I doubt the problem is RibbonBar, and it may be somewhere else...

Code (fw): Select all Collapse
REDEFINE BITMAP

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Loosing buttons in RibbonBar
Posted: Sun Jul 01, 2012 07:51 PM
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Tue Jul 03, 2012 09:02 AM

Hi Lucas, thanks for your response...

The bitmaps are from resources, so I don't know what I can do to check them up...
So far I done a lot of things:

I Replaced all the bitmaps for new ones...
I Reduced the size of them...
I made sure none of them had Alpha Channel...
I made a function to refresh the Ribbon Bar On Focus and On Painted...

It seems that the problem is not the RibbonBar at all, but that I am loosing all the bitmaps from resources, and I can't figure out why... It just started when I moved to FWH12.04 and Harbour 3.0...

My next thing is moving back to xHarbour1.21 and see what happens...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Loosing buttons in RibbonBar
Posted: Tue Jul 03, 2012 09:06 AM

Byron,

We have also seen it but it is quite dificult to reproduce it. The fact is that sometimes don't paint and then paint fine again. So it can't be an invalid handle.

If you could find an example to reproduce it then surely we would be able to fix it, thaks for all your help :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Tue Jul 03, 2012 10:15 AM

Hi Antonio, thanks for looking up to it... There are two things:

They happen randomly...
Probably tomorrow or the next day I will leaving to Honduras for a few days... Up to two weeks, so I'll see if I can do something...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Tue Jul 03, 2012 11:04 AM

So far, I have reproduced the problem compilling with Harbour3.0 and 3.2...

When I compile wiht xHarbour 1.2.1, It does not happens... (or it's not as fast to reproduce)!!!!

It's 5:00 Am already... Sorry I can't stay testing any longer... It's bed time for today...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Loosing buttons in RibbonBar
Posted: Tue Jul 03, 2012 11:13 AM

Bayron,

Thanks for your help :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Loosing buttons in RibbonBar
Posted: Sat Jul 14, 2012 12:27 AM

Hello everybody,

The only way I found to prevent loosing the buttons was to move back to xHarbour...

If somebody knows of a solution, I'll apreciate his help...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Loosing buttons in RibbonBar
Posted: Thu Jul 19, 2012 11:51 AM

Bayron,

Trying to get a reproduceable example.

I have seen it ocassionally with Harbour and Windows 8, and I was not sure if it could be related to Windows 8...

regards, saludos

Antonio Linares
www.fivetechsoft.com