# C1.Util.Win.Win32.GetTextExtentExPoint

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_Win_Win32_GetTextExtentExPoint_" data-uid="C1.Util.Win.Win32.GetTextExtentExPoint*">GetTextExtentExPoint Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_Win_Win32_GetTextExtentExPoint_" data-uid="C1.Util.Win.Win32.GetTextExtentExPoint*"></a>
<h4 id="C1_Util_Win_Win32_GetTextExtentExPoint_System_IntPtr_System_String_System_Int32_System_Int32_System_Int32__System_Int32__System_Drawing_Size__" data-uid="C1.Util.Win.Win32.GetTextExtentExPoint(System.IntPtr,System.String,System.Int32,System.Int32,System.Int32*,System.Int32*,System.Drawing.Size@)">GetTextExtentExPoint(nint, string, int, int, int*, int*, ref Size)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static extern bool GetTextExtentExPoint(nint hdc, string lpszStr, int cchString, int nMaxExtent, int* lpnFit, int* alpDX, ref Size lpSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetTextExtentExPoint(hdc As IntPtr, lpszStr As String, cchString As Integer, nMaxExtent As Integer, lpnFit As Integer*, alpDX As Integer*, ByRef lpSize As Size) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">nint</a></td>
      <td><span class="parametername">hdc</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">lpszStr</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">cchString</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">nMaxExtent</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>*</td>
      <td><span class="parametername">lpnFit</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>*</td>
      <td><span class="parametername">alpDX</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><span class="parametername">lpSize</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_Win_Win32_GetTextExtentExPoint_" data-uid="C1.Util.Win.Win32.GetTextExtentExPoint*"></a>
<h4 id="C1_Util_Win_Win32_GetTextExtentExPoint_System_IntPtr_System_String_System_Int32_System_Int32_System_Int32__System_Int32___System_Drawing_Size__" data-uid="C1.Util.Win.Win32.GetTextExtentExPoint(System.IntPtr,System.String,System.Int32,System.Int32,System.Int32@,System.Int32[],System.Drawing.Size@)">GetTextExtentExPoint(nint, string, int, int, out int, int[], out Size)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static extern bool GetTextExtentExPoint(nint hdc, string lpszStr, int cchString, int nMaxExtent, out int lpnFit, int[] alpDx, out Size lpSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetTextExtentExPoint(hdc As IntPtr, lpszStr As String, cchString As Integer, nMaxExtent As Integer, ByRef lpnFit As Integer, alpDx As Integer(), ByRef lpSize As Size) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">nint</a></td>
      <td><span class="parametername">hdc</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">lpszStr</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">cchString</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">nMaxExtent</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">lpnFit</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>[]</td>
      <td><span class="parametername">alpDx</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><span class="parametername">lpSize</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
