Udostępnij za pośrednictwem


IVsTextOut.VsGetTextExtent Method

Definition

Overloads

VsGetTextExtent(IntPtr, Int32, UInt16[], SIZE[])
VsGetTextExtent(UInt32, Int32, UInt16[], SIZE[])

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.

VsGetTextExtent(IntPtr, Int32, UInt16[], SIZE[])

public:
 int VsGetTextExtent(IntPtr hdc, int cch, cli::array <System::UInt16> ^ pText, cli::array <Microsoft::VisualStudio::OLE::Interop::SIZE> ^ pSize);
public int VsGetTextExtent (IntPtr hdc, int cch, ushort[] pText, Microsoft.VisualStudio.OLE.Interop.SIZE[] pSize);
abstract member VsGetTextExtent : nativeint * int * uint16[] * Microsoft.VisualStudio.OLE.Interop.SIZE[] -> int
Public Function VsGetTextExtent (hdc As IntPtr, cch As Integer, pText As UShort(), pSize As SIZE()) As Integer

Parameters

hdc
IntPtr

nativeint

cch
Int32
pText
UInt16[]
pSize
SIZE[]

Returns

Applies to

VsGetTextExtent(UInt32, Int32, UInt16[], SIZE[])

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.

public:
 int VsGetTextExtent(System::UInt32 hdc, int cch, cli::array <System::UInt16> ^ pText, cli::array <Microsoft::VisualStudio::OLE::Interop::SIZE> ^ pSize);
public:
 int VsGetTextExtent(unsigned int hdc, int cch, Platform::Array <unsigned short> ^ pText, Platform::Array <Microsoft::VisualStudio::OLE::Interop::SIZE> ^ pSize);
int VsGetTextExtent(unsigned int hdc, int cch, std::Array <unsigned short> const & pText, std::Array <Microsoft::VisualStudio::OLE::Interop::SIZE> const & pSize);
public int VsGetTextExtent (uint hdc, int cch, ushort[] pText, Microsoft.VisualStudio.OLE.Interop.SIZE[] pSize);
abstract member VsGetTextExtent : uint32 * int * uint16[] * Microsoft.VisualStudio.OLE.Interop.SIZE[] -> int
Public Function VsGetTextExtent (hdc As UInteger, cch As Integer, pText As UShort(), pSize As SIZE()) As Integer

Parameters

hdc
UInt32

[in] Pointer to a long type to a hardware device context (HDC).

cch
Int32

[in] Number of characters, or -1 if null-terminated.

pText
UInt16[]

[in] OLE String that represents the text.

pSize
SIZE[]

[in] Length of the OLE String.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsTextOut::VsGetTextExtent(  
   [in] DWORD_PTR hdc,   
   [in] int cch,   
   [in, size_is(cch)] LPCOLESTR pText  
);  

Applies to