Hi
I created a window with rounded edges using the CreateRoundRgn and SetWindowRgn APIs, but the rounded corners are not as smooth as the rounded rectangle drawn with GDI + says. Is there any way to smooth the corners of a window?
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;
Perhaps use a bitmap with alpha transparency to simulate anti-aliasing in addition to a slightly larger rounded region, allowing Windows to do impact tests.
, Win32 GDI , , , , , , .
PS: AFAIK , , , Win32 . WDM Windows 7 , , , , .
, . () , ( ) , . Google.
I am not an expert on this, but I know that GDI + supports anti-aliasing, while GDI does not. Without smoothing, rounded corners will not look smooth.