Vcl.Controls.TControl.GetPalette
Delphi
function GetPalette: HPALETTE; dynamic;
C++
DYNAMIC HPALETTE __fastcall GetPalette();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
Description
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.