Problem Using DC_BitmapTransparentColor with DCPUSHBUTTONXP

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#11 Post by rdonnay »

There is definately something wrong with the bitmap.

The background color is not 255,255,255 in the areas that show up as white.

You are entirely dependent on your customer knowing how to give you a good bitmap.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#12 Post by Auge_Ohr »

hi,

i use this Callback Slot to get Pixel Color

Code: Select all

      ::rbDown := { |aPos, uNIL, oSelf| PixelColor(aPos,oSelf)  }


DLLFUNCTION GetPixel( hdc, x, y ) USING STDCALL FROM GDI32.DLL

PROCEDURE PixelColor(aPos,oSelf)
LOCAL nColor := GetPixel(oSelf:winDevice():getHDC(),aPos[1],aPos[2])
LOCAL aRGB   := GraGetRGBIntensity(AutomationTranslateColor(nColor,.T.))
  Msgbox("Color "+VAR2CHAR(aRGB),"Position "+VAR2CHAR(aPos) )
RETURN
greetings by OHR
Jimmy

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#13 Post by digitsoft »

Thanks Jimmy
for your help


Auge_Ohr wrote:hi,

i use this Callback Slot to get Pixel Color

Code: Select all

      ::rbDown := { |aPos, uNIL, oSelf| PixelColor(aPos,oSelf)  }


DLLFUNCTION GetPixel( hdc, x, y ) USING STDCALL FROM GDI32.DLL

PROCEDURE PixelColor(aPos,oSelf)
LOCAL nColor := GetPixel(oSelf:winDevice():getHDC(),aPos[1],aPos[2])
LOCAL aRGB   := GraGetRGBIntensity(AutomationTranslateColor(nColor,.T.))
  Msgbox("Color "+VAR2CHAR(aRGB),"Position "+VAR2CHAR(aPos) )
RETURN
Nolberto Paulino
Regards

Post Reply