Transparent images using image class

Transparent images using image class

Postby AlexSchaft » Mon Jan 23, 2006 8:06 am

Hi,

I'm placing a logo on the mdi client space using the following code:

@ 5, 5 BITMAP oImage NAME "Bmp_Quick" PIXEL OF ::oWnd:oWndClient NOBORDER

oImage:lTransparent := .t.


This worked fine under FWH 2.6 June 2005. I've now loaded Jan 2006, and my logo has a black background. What should I do to fix it?

Alex
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Mon Jan 23, 2006 9:06 am

Alex,

Fixed. This minor fix is required on Class TBitmap:

Code: Select all  Expand view
METHOD Paint() CLASS TBitmap

   local aInfo := ::DispBegin(), hBmpOld, nZeroZeroClr, nOldClr

   if ! ::lTransparent
      FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
   else   
      if ! IsAppThemed() .or. Upper( ::oWnd:ClassName() ) $ "TWINDOW;TMDICLIENT"
         SetBrushOrgEx( ::hDC, 8 - ::nLeft() % 8, 8 - ::nTop() % 8 )
         FillRect( ::hDC, GetClientRect( ::hWnd ), ::oWnd:oBrush:hBrush )
      else
         DrawPBack( ::hWnd, ::hDC )
      endif   
   endif
   ... 


This is just the change:

... .or. Upper( ::oWnd:ClassName() ) $ "TWINDOW;TMDICLIENT"
regards, saludos

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

Postby AlexSchaft » Mon Jul 03, 2006 8:42 am

Hi,

This has become a problem again. I see the line with "twindow;tmdiclient" is no longer there. What should the fix be now?

Alex
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Mon Jul 03, 2006 9:30 am

Alex,

What FWH version/build are you using ?

With FWH 2.7 June 2006 is working fine:
Image
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

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