Themed Buttons on BMP background

Themed Buttons on BMP background

Postby James Bott » Fri Jul 14, 2006 1:45 pm

Themed buttons on a bitmap background (on a dialog) do not have a transparent background so there is an ugly one pixel gray border around them. I also notice that isAppThemed() always returns .f. even when I have a manifest file. Is this a bug, and could this be the reason?

Using May 2006 build and Harbour and XP Pro SP2.

James

Code: Select all  Expand view
function doit()
   local oDlg,oBrush,cName:=space(20),oBtn
   define brush oBrush file "bluegrad.bmp"
   define dialog oDlg title " with Brush" brush oBrush
   @ 1,1 get cName of oDlg
   @ 2,1 say oSay prompt "Name" of oDlg
   oSay:lTransparent:=.t.
   @ 3,1 button oBtn prompt "Ok" action oDlg:end()
   oBtn:lTransparent:=.t.
   activate dialog oDlg centered
return nil
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Themed Buttons on BMP background

Postby Maurilio Viana » Fri Jul 14, 2006 6:16 pm

James, I think TButtonB don't get transparency and don't change face color because Win API. But lets wait for words by Antonio, he ever have a solution.

Regards
Maurilio
User avatar
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil

Postby Antonio Linares » Fri Jul 14, 2006 10:26 pm

James,

It is a Windows theme issue (we already reviewed this with Brian Hays). Here it is how it looks with XP standard blue theme:
Image
Here you see it with a different XP theme (it looks ok):
Image
The FWH exe is the same in both samples.
regards, saludos

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

Postby Antonio Linares » Fri Jul 14, 2006 10:29 pm

James,

Regarding IsAppThemed(): this function just checks if the manifest file is linked into the EXE. We may need to modify it to detect an external manifest file.
regards, saludos

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

Postby James Bott » Fri Jul 14, 2006 10:51 pm

Antonio,

>Here it is how it looks with XP standard blue theme:

It is even worse when the button is not in focus--the gray border is on all sides of the button.

>It is a Windows theme issue

This is very dissapointing. Since many (if not most) users are using the standard blue theme, we cannot produce a decent looking themed button on a colored or bitmapped dialog in our applications without many users seeing the odd display.

What theme are you using in the version without the gray outline?

Thanks for the isAppThemed() explaination. It would be helpful if isAppThemed() would detect external theme manifest files. Otherwise it is more difficult to test small samples of code since you need to build a resource file for each one.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Fri Jul 14, 2006 11:23 pm

James,

> What theme are you using in the version without the gray outline?

As you may know, Windows XP themes support for non standard ones is blocked. To unblock it and use many available free themes on Internet, you have to replace uxtheme.dll with a patched one.

There are lots of them. I use one that looks like Windows Vista one.

Regarding IsAppThemed(), yes, we are going to modify it asap.
regards, saludos

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

Postby James Bott » Sat Jul 15, 2006 8:15 am

Antonio,

>As you may know, Windows XP themes support for non standard ones is blocked. To unblock it and use many available free themes on Internet, you have to replace uxtheme.dll with a patched one.

I understand. We can solve the problem for ourselves, but one cannot distribute an application with buttons that look bad with the standard XP themes. Our applications would look very unprofessional. So, in order to avoid the problem, our only solution is to avoid using color and bitmap backgrounds on dialogs. Unfortunately, more color and graphics is the current trend in applications.

I had even figured out how to paint gradient backgrounds on windows and dialogs, but now I guess I can't use them because of the button problem. :-(

Thank you for looking into fixing isAppThemed to work with external manifest files.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Sat Jul 15, 2006 12:11 pm

James,

Microsoft applications have the same problem, but they use lighter colors for the background. Its the XP theme that makes a gradient from the surounding background color.

Have a look at Microsoft Visual C++ Express edition:
Image
From here:
Image
As I have commented you, this is a Windows issue, its not a FWH one.
regards, saludos

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

Postby Antonio Linares » Sat Jul 15, 2006 12:49 pm

James,

When you use an external manifest file, how do you name it ? Thanks,
regards, saludos

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

Postby James Bott » Sat Jul 15, 2006 6:23 pm

Antonio,

>Microsoft applications have the same problem, but they use lighter colors for the background. Its the XP theme that makes a gradient from the surounding background color.

I have noticed that too. That does seem to be a workaround although very limiiting.

>As I have commented you, this is a Windows issue, its not a FWH one.

I understand, I'm not blaming FW, just expressing my dissapointment in the situation. We could design some really nice looking apps if this wasn't a problem.

>When you use an external manifest file, how do you name it ?

[application name].exe.manifest

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Sun Jul 16, 2006 9:58 am

James,

>> When you use an external manifest file, how do you name it ?

> [application name].exe.manifest

We have modified IsAppThemed() to detect such external file too.
We are emailing you a new FiveHC.lib for your review. Thanks,
regards, saludos

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

Postby Maurilio Viana » Mon Jul 17, 2006 11:47 am

Antonio Linares wrote:There are lots of them. I use one that looks like Windows Vista


Antonio, I'm searching for a "Vista Like Theme" for any weeks...
Where you downloaded it?

Regards!
Maurilio
User avatar
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil

Postby Antonio Linares » Mon Jul 17, 2006 4:26 pm

Maurilio,

You may download it from here:
http://hyperupload.com/download/0205a69 ... n.zip.html
regards, saludos

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

Postby Maurilio Viana » Mon Jul 17, 2006 6:27 pm

Thanks a lot, Antonio!

Regards
Maurilio
User avatar
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

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