with GlyphRect do
StretchBlt(Handle, Left, Top, Right-Left, Bottom-Top,
FGlyph.Canvas.Handle, 0, 0, FGlyph.Width, FGlyph.Height, srcCopy);
end;
finally
ReleaseDC(FForm.Handle,Handle);
Free;
end;
end;
end;
procedure TTitleBarButton.Repaint;
begin
Paint;
end;
end.
另外,还可以对这个组件进一步扩展,扩展其它任一窗体,只要知道了窗体的Handle就行了。