Loosing buttons in RibbonBar

User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Loosing buttons in RibbonBar

Post by Bayron »

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...

Image

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

So far, removing from window:

Code: Select all

STYLE nOr( WS_POPUP )
It seem to make the difference...
=====>

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

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Loosing buttons in RibbonBar

Post by Antonio Linares »

Bayron,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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: Select all

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

I guess that the function that I just found in tribbon.prg is a lot more sophisticated, and therefore better to use...

Code: Select all

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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: Select all

REDEFINE BITMAP
=====>

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

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: Loosing buttons in RibbonBar

Post by lucasdebeltran »

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.
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Loosing buttons in RibbonBar

Post by Antonio Linares »

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
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Loosing buttons in RibbonBar

Post by Antonio Linares »

Bayron,

Thanks for your help :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Post by Bayron »

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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Loosing buttons in RibbonBar

Post by Antonio Linares »

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
Post Reply