您可以使用主题引擎自己绘制按钮 - 尝试这样的初学者:
uses
Themes;
procedure DrawComboBoxButton(ACanvas: TCanvas; ADown, AMouseInControl: Boolean; const ARect: TRect);
var
ComboElem: TThemedComboBox;
Details: TThemedElementDetails;
begin
if ThemeServices.ThemesEnabled then
begin
if ADown then
ComboElem := tcDropDownButtonPressed
else if AMouseInControl then
ComboElem := tcDropDownButtonHot
else
ComboElem := tcDropDownButtonNormal;
Details := ThemeServices.GetElementDetails(ComboElem);
ThemeServices.DrawElement(ACanvas.Handle, Details, ARect);
end
else
begin
if ADown then
DrawFrameControl(ACanvas.Handle, ARect, DFC_SCROLL, DFCS_SCROLLCOMBOBOX or DFCS_PUSHED)
else
DrawFrameControl(ACanvas.Handle, ARect, DFC_SCROLL, DFCS_SCROLLCOMBOBOX);
end;
end;
procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
DrawComboBoxButton(PaintBox1.Canvas, False, False, Bounds(0, 0, 20, 20));
DrawComboBoxButton(PaintBox1.Canvas, True, False, Bounds(20, 0, 20, 20));
end;
(改编自Embarcadero 论坛中的“组合框中的 Windows 主题”主题)。
Mike Lischke 的“Windows XP 主题资源管理器”可以帮助您找到正确的“元素”和“详细信息”。看看这个 SO 线程。