[C#]
ICommand command = new ControlsGlobeZoomInOutToolClass();
command.OnCreate(axGlobeControl1.Object);
if (command.Enabled == true)
{
axGlobeControl1.CurrentTool = (ITool) command;
}
[Visual Basic .NET]
Dim pCommand As ICommandpCommand = New ControlsGlobeZoomInOutToolClass
pCommand.OnCreate(axGlobeControl1.Object)
If pCommand.Enabled = True Then
axGlobeControl1.CurrentTool = pCommand
End If
[C++ Qt]
ICommandPtr cmd(CLSID_ControlsGlobeZoomInOutTool);
IDispatchPtr disp;
m_aeIpGlobeCtr->get_Object(&disp);
cmd->OnCreate(disp);
VARIANT_BOOL bEnable;
HRESULT hr = cmd->get_Enabled(&bEnable);
if(bEnable)
{
m_aeIpGlobeCtr->putref_CurrentTool(IToolPtr(cmd));
}
ICommand command = new ControlsGlobeZoomInOutToolClass();
command.OnCreate(axGlobeControl1.Object);
if (command.Enabled == true)
{
axGlobeControl1.CurrentTool = (ITool) command;
}
[Visual Basic .NET]
Dim pCommand As ICommandpCommand = New ControlsGlobeZoomInOutToolClass
pCommand.OnCreate(axGlobeControl1.Object)
If pCommand.Enabled = True Then
axGlobeControl1.CurrentTool = pCommand
End If
[C++ Qt]
ICommandPtr cmd(CLSID_ControlsGlobeZoomInOutTool);
IDispatchPtr disp;
m_aeIpGlobeCtr->get_Object(&disp);
cmd->OnCreate(disp);
VARIANT_BOOL bEnable;
HRESULT hr = cmd->get_Enabled(&bEnable);
if(bEnable)
{
m_aeIpGlobeCtr->putref_CurrentTool(IToolPtr(cmd));
}