Loosing buttons in RibbonBar

Loosing buttons in RibbonBar

Postby Bayron » 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...

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

Postby Bayron » Mon Jun 25, 2012 11:12 pm

So far, removing from window:

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

Postby Bayron » Tue Jun 26, 2012 3: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
(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

Postby Antonio Linares » Tue Jun 26, 2012 7:36 am

Bayron,

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

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

Re: Loosing buttons in RibbonBar

Postby Bayron » Tue Jun 26, 2012 3: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: Select all  Expand view  RUN
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

Postby Bayron » Wed Jun 27, 2012 1: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: Select all  Expand view  RUN
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

Postby Bayron » Sun Jul 01, 2012 7: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: Select all  Expand view  RUN
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
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: Loosing buttons in RibbonBar

Postby lucasdebeltran » Sun Jul 01, 2012 7: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: Loosing buttons in RibbonBar

Postby Bayron » Tue Jul 03, 2012 9: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
(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

Postby Antonio Linares » Tue Jul 03, 2012 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Loosing buttons in RibbonBar

Postby Bayron » 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
(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

Postby Bayron » 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
(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

Postby Antonio Linares » Tue Jul 03, 2012 11:13 am

Bayron,

Thanks for your help :-)
regards, saludos

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

Re: Loosing buttons in RibbonBar

Postby Bayron » 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
(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

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 88 guests