Page 2 of 2

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

Posted: Mon Aug 05, 2019 3:29 pm
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.

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

Posted: Mon Aug 05, 2019 3:57 pm
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

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

Posted: Tue Aug 06, 2019 8:05 am
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