About windows xp manifest file

About windows xp manifest file

Postby Marco Turco » Mon Aug 24, 2009 1:54 pm

Hi all,
Do we already need to link it ?
I checked that using the manifest file there are some problems using transparent images.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: About windows xp manifest file

Postby Antonio Linares » Mon Aug 24, 2009 7:08 pm

Marco,

You need it if you want XP themed look
regards, saludos

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

Re: About windows xp manifest file

Postby Marco Turco » Mon Aug 24, 2009 8:47 pm

Ok, but there is a problem using the transparent clause in a mdi context. The transparent doesn't runs.

This is a self-contained that show the problem linking the manifest file.

Executable, bitmap and code at www.softwarexp.co.uk/beta/antonio.zip

Any ideas ? Thanks in advance.

#include "fivewin.ch"

static ownd
static oImage

Function main()

DEFINE WINDOW oWnd TITLE "TTitle Class Test" MDI


@ 20, 5 IMAGE oImage FILE "SM_1.BMP" OF oWnd:oWndClient noborder pixel
oImage:lTransparent:=.t.

activate window oWnd maximized


return nil
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: About windows xp manifest file

Postby Daniel Garcia-Gil » Tue Aug 25, 2009 12:07 am

Hello Marco

I'm not sure with this change, i didn't test all combinations

Open \source\Bitmap.prg

find and replace (end of file):

Code: Select all  Expand view
//#ifdef __CLIPPER__

static function IsAppThemed() ; return .f.

static function DrawPBack() ; return nil

//#endif
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: About windows xp manifest file

Postby mmercado » Tue Aug 25, 2009 4:58 am

Hi Marco/Daniel:

Daniel Garcia-Gil wrote:I'm not sure with this change, i didn't test all combinations

Without a deep analisys (don't know what DrawPBack function does), I think that can be resolved by changing the next lines in TBitmap Paint method to be as shown:
Code: Select all  Expand view
  if IsAppThemed() .and. Empty( ::oBrush:hBitmap ) .and. ! ::lTransparent
      DrawPBack( ::hWnd, ::hDC )
   elseIf ! Empty( ::oBrush:hBitMap )
      #ifdef __CLIPPER__
         SetBrushOrgEx( ::hDC, 8 - ::nLeft() % 8, 8 - ::nTop() % 8 )
      #else
         SetBrushOrgEx( ::hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
      #endif
      FillRect( ::hDC, GetClientRect( ::hWnd ), ::oWnd:oBrush:hBrush )
   endif
 

Best regards.

Manuel Mercado.
manuelmercado at prodigy dot net dot mx
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: About windows xp manifest file

Postby Marco Turco » Tue Aug 25, 2009 8:28 am

Hi all,
thank your your reply.

Daniel,
your solution is the same as removing the manifest file, the themes doesn't runs anymore in the app.

Manuel,
I tried your solution also but now the problem appairs on all bitmaps where I use the transparent clause.
See http://www.softwarexp.co.uk/beta/image.png

Any ideas ?
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: About windows xp manifest file

Postby Daniel Garcia-Gil » Tue Aug 25, 2009 9:37 am

Hello Marco...

Marco Turco wrote:Daniel,
your solution is the same as removing the manifest file, the themes doesn't runs anymore in the app.


Are you sure???

do you write "STATIC" before Function??
Code: Select all  Expand view

//#ifdef __CLIPPER__

static function IsAppThemed() ; return .f.  // <== static

static function DrawPBack() ; return nil     //<== static

//#endif
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: About windows xp manifest file

Postby mmercado » Tue Aug 25, 2009 10:37 am

Hi Marco:
Marco Turco wrote:Manuel,
I tried your solution also but now the problem appairs on all bitmaps where I use the transparent clause.


You're right, try this way:
Code: Select all  Expand view
  if IsAppThemed() .and. Empty( ::oBrush:hBitmap ) .and. ! ::lTransparent
      DrawPBack( ::hWnd, ::hDC )
   else
      #ifdef __CLIPPER__
         SetBrushOrgEx( ::hDC, 8 - ::nLeft() % 8, 8 - ::nTop() % 8 )
      #else
         SetBrushOrgEx( ::hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
      #endif
      FillRect( ::hDC, GetClientRect( ::hWnd ), ::oWnd:oBrush:hBrush )
   endif
 

Regards.

Manuel Mercado.
manuelmercado at prodigy dot net dot mx
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: About windows xp manifest file

Postby Marco Turco » Tue Aug 25, 2009 11:42 am

Hi Manuel,
it runs fine. Thank you very much.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: About windows xp manifest file

Postby Marco Turco » Tue Aug 25, 2009 11:46 am

Hi Daniel,
I haven't tested it
but as I can see with your turn-around the class tbitmap doesn't know anymore if a theme is running (isapptheme always return .f.)
so any image is painted without theme style.

Daniel Garcia-Gil wrote:Hello Marco...

Marco Turco wrote:Daniel,
your solution is the same as removing the manifest file, the themes doesn't runs anymore in the app.


Are you sure???

do you write "STATIC" before Function??
Code: Select all  Expand view

//#ifdef __CLIPPER__

static function IsAppThemed() ; return .f.  // <== static

static function DrawPBack() ; return nil     //<== static

//#endif
 
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: About windows xp manifest file

Postby Daniel Garcia-Gil » Tue Aug 25, 2009 12:50 pm

Hello Marco...

my change work fine (for now)

please test it...

see and download

http://www.sitasoft.com/fivewin/test/thembmp.zip

Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: About windows xp manifest file

Postby Marco Turco » Tue Aug 25, 2009 3:19 pm

Sorry Daniel, you are right.

However with your turn-around and also with the Manual solution there are problems using bitmap on folder because they are now not transparent.

See www.softwarexp.co.uk/beta/test.png

Any ideas ?
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: About windows xp manifest file

Postby Daniel Garcia-Gil » Tue Aug 25, 2009 5:30 pm

Hello Marco..

Marco Turco wrote:However with your turn-around and also with the Manual solution there are problems using bitmap on folder because they are now not transparent.

is was for my solution :(

but maybe work with a WHITE brush

Local oBrush := TBrush():New( , CLR_WHITE )

...

oFolder:aDialogs[ x ]:SetBrush( oBrush )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: About windows xp manifest file

Postby Marco Turco » Thu Aug 27, 2009 8:05 am

Hi Daniel,
thank for your reply.

It is a bit difficult for me to make the change you proposed me due to the fact that I have a lot o folder in my app.

Do you know if there is a way to change the background of this image I display on the MDI in order to act only on this image that give me problems ?
You already solved my problem about the rbbuttons background usinga a rbbtn:hback:createsolidbrush,
is there something similar for tbitmap class ?

Thanks in advance.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 35 guests