IVsTextOut::VsGetTextExtent Method (UInt32, Int32, array<UInt16>^, array<SIZE>^)
Visual Studio 2015
Gets the extent of text's Hardware Device Context (HDC), number of characters, and outputs a pointer to the length of the pText parameter. Returns a Windows structure that represents the size of the text.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int VsGetTextExtent( unsigned int hdc, int cch, array<unsigned short>^ pText, array<SIZE>^ pSize )
Parameters
- hdc
-
Type:
System::UInt32
[in] Pointer to a long type to a hardware device context (HDC).
- cch
-
Type:
System::Int32
[in] Number of characters, or -1 if null-terminated.
- pText
-
Type:
array<System::UInt16>^
[in] OLE String that represents the text.
- pSize
-
Type:
array<Microsoft.VisualStudio.OLE.Interop::SIZE>^
[in] Length of the OLE String.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsTextOut::VsGetTextExtent( [in] DWORD_PTR hdc, [in] int cch, [in, size_is(cch)] LPCOLESTR pText );
Show: