This method opens a high-level dialog that allows the user to select, view, edit, and create a coordinate system. The values of the group, system, datum, and units, that are used when opening the dialog, set the initial dialog coordinate system. When the dialog is closed, if the chosen parameter is TRUE, the user pressed the OK button, and the selected keys from the dialog are set to the key’s parameters. If the chosen parameter is FALSE the key’s values remain the same.
This method, which is an extension to the ChooseCSDialog method, allows scripted clients to easily define the dialog parent window. The change is in the type of the seven parameters. In the original version, this parameter was of type long and was intended to represent a window handle that should be the parent of the CSDialog. Since, when called from HTML, the client can not easily access this handle, the result was that 0 was passed in most cases, which can cause several problem.
It is important that a valid parent be passed, instead of simply 0, to avoid problems.
Implemented only in ICoordSys2.
HRESULT ChooseCSDialogEx(
[out] VARIANT* boolChosen,
[in, out] VARIANT* bstrGroupKey,
[in, out] VARIANT* bstrSystemKey,
[in, out] VARIANT* bstrDatumKey,
[in, out] VARIANT* bstrUnitKey,
[in, out] VARIANT* longEPSG,
[in] VARIANT ParentWindow,
[in] BSTR Title)
Parameters:
boolChosen – Returns TRUE if OK was selected in the high-level dialog, FALSE if Cancel was selected.
bstrGroupKey – The unique string of the coordinate system group.
bstrSystemKey – The unique string of the coordinate system.
bstrDatumKey – The unique string of the coordinate system datum.
bstrUnitKey – The unique string of the coordinate system units.
longEPSG – Reserved.
ParentWindow –Either of the
following:
1. IDispatch interface that represents either IHTMLWindow, or
IHTMLDocument. This means that the client can pass to this
parameter either Me, window or window document.
2. A real window handle (either of type VT_I4 or VT_I2 of the
variant). If the user knows the real window handle, they can simply
use the original ChooseCSDialog() method.
Title – The title of the dialog.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |