【发布时间】:2010-12-13 03:28:54
【问题描述】:
嗨
我使用 Windows API 调用 CreateRoundRgn 和 SetWindowRgn 创建了一个带有圆角边缘的窗口,但是圆角不如使用 GDI+ 绘制的圆角矩形那么平滑。有没有办法把窗角弄平?
procedure TPBSDashboardPanel.DefineWindowRegion;
var
WindowRegion: HRGN;
begin
if Assigned(Parent) then
begin
WindowRegion := CreateRoundRectRgn(0, 0, Width, Height, 20, 20);
SetWindowRgn(Handle, WindowRegion, True);
end;
end;
【问题讨论】: