nur als Einstieg, was Du mit dem Canvas machst überlasse ich Dir ...
Delphi-Quellcode:
type
TComboBox=Class(StdCtrls.TComboBox)
Protected
procedure WMPaint(
var Message: TWMPaint);
message WM_PAINT;
End;
TForm2 =
class(TForm)
....
....
{ ComboBox }
procedure TComboBox.WMPaint(
var Message: TWMPaint);
var
r:Trect;
c:Tcanvas;
begin
inherited;
c:=Tcanvas.Create;
c.Handle := GetDC(
handle);
R := ClientRect;
R.Left := R.Right - GetSystemMetrics(SM_CXHTHUMB);
if Style <> csSimple
then
Canvas.FillRect(r);
if DroppedDown
then
c.TextOut(r.left,r.top,'
D')
else
c.TextOut(r.left,r.top,'
U');
ReleaseDC(
handle,c.Handle);
c.Free;
end;