FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TBAR ChangeBitMap method not found
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
TBAR ChangeBitMap method not found
Posted: Thu Dec 20, 2007 11:29 AM

Mr Antonio

RPreview's method TwoPages calls oBar's changebitmap method. Though Toolbar class has changebitmap method, Tbar class does not have that method.
So when the user preses the twopage button he gets the error that this method is not found.

Kindly provide a fix please.

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TBAR ChangeBitMap method not found
Posted: Sat Dec 22, 2007 08:14 AM

NageswaraRao,

Fixed. In source\classes\rpreview.prg change twice:

if ! IsAppThemed()

into

if ! IsAppThemed() .or. Upper( ::oBar:ClassName() ) == "TBAR"

Thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
TBAR ChangeBitMap method not found
Posted: Sat Dec 22, 2007 01:15 PM

Thanks for the fix.

Sightly off topic. Do you advise replacing isAppThemed() with ( isAppThemed() and IsThemeActive() ) in general at all the places in the library?

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TBAR ChangeBitMap method not found
Posted: Sat Dec 22, 2007 02:51 PM

NageswaraRao,

We could internally modify IsAppThemed() to make both calls, if required

But first we need to decide whats the desired behavior

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
TBAR ChangeBitMap method not found
Posted: Sun Dec 23, 2007 12:58 PM

I thought about this. Themed graphics should be presented only if the user is seeing an application in themes otherwise not. Therefore I think the themed code should work if the application is finally showing a thremed look to the user not just if it compiled to show themes. So I think we should check isappthemed() and also isThemeActive() in the library to show the thremed behaviour. We should do the same in our applications too.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TBAR ChangeBitMap method not found
Posted: Sun Dec 23, 2007 08:10 PM

Perhaps we another function isAppThemeActive() which calls both functions. If it returns false either the Windows theme is not active or the app is not setup to use themes. It true, then Windows themes are active and the application is setup to show themes.

function isAppThemeActive()
return isThemeActive() .and. isAppThemed()

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion