Returns the label parameters in a single structure. This structure can also be used as an argument to the IObjectManager51::CreateLabelEx() method. Each struct members has an equivalent ITerrainLabel5 property. For a detailed explanation of the purpose of each struct member, see the documentation for those properties. When using this structure as an argument for the CreateLabelEx() method, the client can indicate that it uses the system default for a specific label property. To do so, the client must set that member to a certain value. These values appear in parenthesis in the following description.
HRESULT GetLabelStruct(
[out, retval] LabelStruct *pLabelStruct)
Parameters:
pLabelStruct – A structure that holds details about the label’s appearance. The structure consists of the following struct members:
LineType LineToGroundType
long LineColor (-1)
double LineLength (-1)
BSTR Text
long FgColor (-1)
long BgColor (-1)
double Alpha (-1)
BSTR FontName (empty string)
int FontSize (-1)
long FontStyle (-1)
BSTR ImageFileName (empty string)
BSTR FrameFileName (empty string)
int FrameIndex (-1)
double Scale (0)
BOOL LimitGrowth
double MinimumViewingHeight (-1)
int MinimumSize (-1)
BOOL TextOnImage
int AlignTextHorizontal
int AlignTextVertical
int TextJustification
int AlignLabelHorizontal
int AlignLabelVertical
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_TEOBJECT_NOLONGEREXIST |
The object you are trying to access no longer exists. This may have occurred because, while keeping an interface to the object, the user deleted it from TerraExplorer (via the TE user interface). Without the object, the interface cannot be used. Therefore, you should release the interface. |
TE_E_INTERNAL |
TerraExplorer was unable to create the object. To get more information about this error use the IErrorInfo Interface. |