Page 1 of 1

TOutlook Problem

Posted: Wed Jan 23, 2008 2:41 pm
by PeterHarmes
Hi,

I have just found a problem with the outlook style button bar - if there are too many buttons to fit on one screen the whole button display is wiped (when the bar is started the buttons will flash up on the screen and then instantly disappear) - I have noticed in the past that a little arrow would appear and the buttons would scroll - this no longer appears. The buttons are still there because if you click the blank space, the action associated with the buttons kicks in!

I'm using FWH 7.12 & xHarbour Commercial

Let me know if you need any more info

Thanks

Pete

Posted: Wed Jan 23, 2008 10:03 pm
by Antonio Linares
Pete,

Could you please post a screenshot ? thanks

(use www.imageshack.us)

Posted: Thu Jan 24, 2008 11:36 am
by PeterHarmes
Antonio,

I've uploaded an image - on the left is how the outlook bar looks if i add enough buttons to cause a scroll - on the right is how it should look

Image

Posted: Thu Jan 24, 2008 12:38 pm
by Giovany Vecchi
I solved like this

in OUTLOOK.PRG

METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaintOld()

in WINDOW.PRG

METHOD EndPaint() INLINE ::nPaintCount--,;
EndPaint( ::hWnd, ::cPS ), ::cPS := nil, ::hDC := nil, 0 // keep this zero here!

METHOD EndPaintOld() INLINE ::nPaintCount--,;
EndPaint( ::hWnd, ::cPS ), ::cPS := nil, ::hDC := nil

Posted: Thu Jan 24, 2008 4:55 pm
by Antonio Linares
Pete,

Have you tried Giovany's suggestion ?

It would be enough to add this method to Class TOutLook:

METHOD EndPaint() INLINE ::nPaintCount--,;
EndPaint( ::hWnd, ::cPS ), ::cPS := nil, ::hDC := nil

Posted: Fri Jan 25, 2008 8:51 am
by PeterHarmes
Thanks Giovany & Antonio, both solutions work

Pete