FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Themed Buttons on BMP background
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Themed Buttons on BMP background

Posted: Fri Jul 14, 2006 01: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

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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM

Re: Themed Buttons on BMP background

Posted: Fri Jul 14, 2006 06: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

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: 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:

Here you see it with a different XP theme (it looks ok):

The FWH exe is the same in both samples.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Themed Buttons on BMP background

Posted: 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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Themed Buttons on BMP background

Posted: Sat Jul 15, 2006 08: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: 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:

From here:

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

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Themed Buttons on BMP background

Posted: Sat Jul 15, 2006 06: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: Sun Jul 16, 2006 09: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
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM

Themed Buttons on BMP background

Posted: 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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Themed Buttons on BMP background

Posted: Mon Jul 17, 2006 04:26 PM

Maurilio,

You may download it from here:

http://hyperupload.com/download/0205a69 ... n.zip.html

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM

Themed Buttons on BMP background

Posted: Mon Jul 17, 2006 06:27 PM

Thanks a lot, Antonio!

Regards
Maurilio

Continue the discussion