From RAD Studio API Documentation
Jump to: navigation, search


function GetPalette: HPALETTE; dynamic;


DYNAMIC HPALETTE __fastcall GetPalette();


Type Visibility Source Unit Parent
function protected
Vcl.Controls TControl


Returns the handle to a palette for use by the control.

As implemented in TControl, GetPalette returns a null handle, indicating that the control does not have a palette. Override GetPalette to implement derived objects that use a palette. Create a palette handle for the control by a call to the Windows API function CreatePalette. GetPalette should return the palette handle for the control.

Specifying the palette for a control tells the application that the control's palette needs to be realized and designates the palette to use for realization.

GetPalette is called only if the run-time video mode requires color palette support, for example, in 256-color mode.

See Also