SampronЦитата: с помощью этой линии можно нарисовать такой компонент как TGroupBox с округлёнными углами?
-- можно. но проще использовать RoundRect :
Код: [Setup]
AppName=My Program
AppVerName=My Program v.1.2
DefaultDirName={pf}\My Program
[Code]
function LineTo(DC: THandle; X, Y: Integer): Boolean;
external 'LineTo@gdi32.dll stdcall';
function MoveTo(DC: THandle; X, Y: Integer; LPPOINT: THandle): Longint;
external 'MoveToEx@gdi32.dll stdcall';
function GetWindowDC(Wnd: HWnd): Longint;
external 'GetWindowDC@user32.dll stdcall';
function SelectObject(DC, hObject: THandle): THandle;
external 'SelectObject@gdi32.dll stdcall';
function CreatePen(PenStyle, Width: Integer; Color: TColor): THandle;
external 'CreatePen@gdi32.dll stdcall';
function CreateSolidBrush(Color: TColor): THandle;
external 'CreateSolidBrush@gdi32.dll stdcall';
function Rectangle(DC: THandle; X1, Y1, X2, Y2: Integer): Boolean;
external 'Rectangle@gdi32.dll stdcall';
function RoundRect(DC: THandle; X1, Y1, X2, Y2, X3, Y3: Integer): Boolean;
external 'RoundRect@gdi32.dll stdcall';
function NextButtonClick(CurPageID: Integer): Boolean;
var
hsrc: THandle;
Pen, Brush: THandle;
begin
hsrc:= GetWindowDC(WizardForm.Handle);
Pen:= CreatePen(0, 1, clRed);
//Brush:= CreateSolidBrush(clGreen);
SelectObject(hsrc, Pen);
//SelectObject(hsrc, Brush);
MoveTo(hsrc, 0, 350, 0);
LineTo(hsrc, 500, 350);
RoundRect(hsrc, 10, 360, 50, 380, 10, 10);
Result:= True;
end;