LineWidth,LW, ,LW,LW:,DLLName;DLLTest.DLL;DLLFunName;LineWidth;DLLRun;
TLabel change the Caption to "Line width"
TSpinEdit
TBitBtn change the button Kind to bkOK
Add the following code to the LWUnit unit.
unit LWUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics,
Controls, Forms,
Dialogs, StdCtrls, Spin, Buttons;
type
TLWForm =
class(TForm)
Label1: TLabel;
SpinEdit1: TSpinEdit;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure LineWidth;
var
LWForm: TLWForm;
implementation
{$R *.DFM}
uses VCMain32, VCType32, VCDlg32, VCTool32, VCTran32, VCDelphi;
procedure LineWidth;
begin
LWForm.Show;
end;
exports LineWidth;
procedure TLWForm.BitBtn1Click(Sender: TObject);
var
EntityType : SmallInt;
WidthIndex : Integer;
begin
Close;
DLLStart('DLLTest',
'LineWidth');
if VCFirstEntity(iError, EntityType) then
while iError = 0 do
begin
WidthIndex := SpinEdit1.Value;
VCMatchCurrentEntity(iError);
VCSetLineWidthIndex(iError,
WidthIndex);
VCApplySettingsToCurrentEntity(iError);
VCNextEntity(iError, EntityType);
end;
DLLClose('DLLTest',
'LineWidth');
end;
initialization
LWForm :=
TLWForm.Create(Application);
finalization
LWForm.Free;
end.