Hi all,
Do we already need to link it ?
I checked that using the manifest file there are some problems using transparent images.
Marco Turco
SOFTWARE XP LLP
Hi all,
Do we already need to link it ?
I checked that using the manifest file there are some problems using transparent images.
Marco,
You need it if you want XP themed look
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.
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
//#ifdef __CLIPPER__
static function IsAppThemed() ; return .f.
static function DrawPBack() ; return nil
//#endifDaniel Garcia-Gil wrote:I'm not sure with this change, i didn't test all combinations
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 )
endifHi 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 ?
Marco Turco wrote:Daniel,
your solution is the same as removing the manifest file, the themes doesn't runs anymore in the app.
//#ifdef __CLIPPER__
static function IsAppThemed() ; return .f. // <== static
static function DrawPBack() ; return nil //<== static
//#endifMarco Turco wrote:Manuel,
I tried your solution also but now the problem appairs on all bitmaps where I use the transparent clause.
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 )
endifHi Manuel,
it runs fine. Thank you very much.
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??
//#ifdef __CLIPPER__ static function IsAppThemed() ; return .f. // <== static static function DrawPBack() ; return nil //<== static //#endif

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 ?
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.
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.