X
xddl
Unregistered / Unconfirmed
GUEST, unregistred user!
在MapX的例子"/Program Files/MapInfo MapX 4.0/Samples40/Delphi/ANIMATION_LAYER"
中有一段:
procedure TfrmCarTracker.FormActivate(Sender: TObject);
var
unusedVt: OleVariant;
MyFont: TFont;
begin
TVarData(unusedVt).vType := varError;
TVarData(unusedVt).vError := DISP_E_PARAMNOTFOUND;
// Add car layer and make it an animation layer
lyrMyLayer := Map1.Layers.CreateLayer('Cars', unusedVt, 1, unusedVt, unusedVt);
Map1.Layers.AnimationLayer := Map1.Layers.Item(lyrMyLayer.name);
// Create custom tool to be used to plot vehicles
Map1.CreateCustomTool(PLOT_VEHICLE_TOOL, miToolTypePoint, miSizeCursor, miSizeCursor, miSizeCursor, unusedVt);
MyFont := TFont.Create;
OleFontToFont(Map1.DefaultStyle.SymbolFont, MyFont);
MyFont.Size := 24;
MyFont.Name := 'MapInfo Transportation';
Map1.DefaultStyle.SymbolCharacter := 66;
end;
怎么改写到 C++Builder下?
写了半天,总出错。
中有一段:
procedure TfrmCarTracker.FormActivate(Sender: TObject);
var
unusedVt: OleVariant;
MyFont: TFont;
begin
TVarData(unusedVt).vType := varError;
TVarData(unusedVt).vError := DISP_E_PARAMNOTFOUND;
// Add car layer and make it an animation layer
lyrMyLayer := Map1.Layers.CreateLayer('Cars', unusedVt, 1, unusedVt, unusedVt);
Map1.Layers.AnimationLayer := Map1.Layers.Item(lyrMyLayer.name);
// Create custom tool to be used to plot vehicles
Map1.CreateCustomTool(PLOT_VEHICLE_TOOL, miToolTypePoint, miSizeCursor, miSizeCursor, miSizeCursor, unusedVt);
MyFont := TFont.Create;
OleFontToFont(Map1.DefaultStyle.SymbolFont, MyFont);
MyFont.Size := 24;
MyFont.Name := 'MapInfo Transportation';
Map1.DefaultStyle.SymbolCharacter := 66;
end;
怎么改写到 C++Builder下?
写了半天,总出错。