In recent time, i see that Vrmlpad can extend Addins from VB,VC++ and Delphi. However, I find the references on Delphi is very poor, so I search them on the NET. As see many data from the net, I still has some puzzle.The following Delphi code(DLL) is writen by myself,but it functions nothing. Would someone give me a hand? Many thanks.
--------------------------------------------
library vrmltlb;
{ Interact with VRMLPad}
uses
SysUtils,
Classes,Dialogs,
VrmlPad_TLB in '..\..\..\Borland\Delphi7\Imports\VrmlPad_TLB.pas';
{$R *.res}
procedure OnAddCommands(cmd:CmdBinder);stdcall;
var olevar,menuole:oleVariant;
begin
menuole:='message code';
cmd.BindCommand('message_hint',olevar,menuole, olevar, olevar);
end;
procedure message_hint(doc:Document);stdcall;
begin
showMessage(IntToStr(doc.Window.Left));
end;
exports
OnAddCommands index 1;
begin
end.
|
|