[lazarus] Wrong colours in win32
Micha Nelissen
micha at neli.hopto.org
Sun Dec 14 10:37:17 EST 2003
Jesus Reyes wrote:
> From the fastlib library..
>
> function Get16Bpg:Byte;
> var
> c: DWord;
> hBM: HBITMAP;
> sDC,bDC: Windows.HDC;
> begin
> sDC:=GetDC(0);
> bDC:=CreateCompatibleDC(sDC);
> hBM:=CreateCompatibleBitmap(sDC,1,1);
> SelectObject(bDC,hBM);
> SetPixel(bDC,0,0,RGB(0,100,0));
> c:=GetPixel(bDC,0,0);
> DeleteDC(bDC);
> DeleteObject(hBM);
> ReleaseDC(0,sDC);
> if GetGValue(c)>=100 then Result:=6 else Result:=5;
> end;
>
This doesn't work for me. It returns 6, while it should return 5. If it
would return 5, something is wrong in color handling of windows, I
think, but I'm not sure.
Regards,
Micha.
More information about the Lazarus
mailing list