Board index » delphi » Subtle D3/D4 Difference with functions GetRValue, GetGValue, GetBValue
Earl F. Glynn
![]() Delphi Developer |
Fri, 10 Aug 2001 03:00:00 GMT
Subtle D3/D4 Difference with functions GetRValue, GetGValue, GetBValue
The functions GetRValue, Get GValue and GetBValue return the Red, Green and Blue values from a TColor value.
In both D3 and D4, these functions are defined to take a DWORD argument (which is inconsistent with the COLORREF values passed to BUT, a DWORD in D3 is an Integer while in D4 a DWORD is a LongWord. In D3 you can assign Color := -1 but in D4 this results in a range check error. A color of -1 (i.e., $FFFFFFFF) is returned for the Pixels property of a Canvas when a Bitmap has been created without width or Just in case anyone cares. efg Earl F. Glynn E-Mail: EarlGl...@att.net |