Hi
I am trying to port one of my apps to osx, I use the following function to create panels with rounded corners on windows,
Does anyone know of a similar routine for osx
It errors on
Perform(EM_GETRECT, 0, lParam(@R));
Perform(EM_SETRECTNP, 0, lParam(@R));
Thanks
Josh
Function DrawRounded(Control: TWinControl; Diameter: LongInt):Boolean;
var
R: TRect;
Rgn: HRGN;
begin
with Control do
begin
R := ClientRect;
Rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, Diameter, Diameter);
Perform(EM_GETRECT, 0, lParam(@R));
InflateRect(R, -4, -4);
Perform(EM_SETRECTNP, 0, lParam(@R));
SetWindowRgn(Handle, Rgn, True);
// Invalidate;
end;
DrawRounded:=True;
end;