OWLNext 7.0
Borland's Object Windows Library for the modern age
|
You can access TPalette through an HPALETTE or as a LOGPALETTE structure.
To get an HPALETTE from a TPalette object, use the HPALETTE() operator with the TPalette object as the parameter. The HPALETTE() operator is almost never explicitly invoked:
This code automatically invokes the HPALETTE() conversion operator to cast the TPalette object to the correct type.
The TPalette::GetObject function for TPalette functions the same way the Windows API call GetObject does when passed a handle to a palette: It places the number of entries in the color table into the uint16 reference passed to it as a parameter. TPalette::GetObject returns true if successful.