title: How can I retrieve the name of the printer chosen in Acrobat?
body: <p>I want to get the name of the printer chosen in Acrobat PrintDialog using SendMessage Windows API.</p>
  
  <p>This is sample code.</p>
  
  <pre><code>static string GetWindowText( hwnd_printDialog_in_Acrobat )
  {
      int comboBoxCount = 0;
      int HWND_PRINTER_NAME = 1 ;
  
      List&lt;IntPtr&gt; ChildPtrList = GetChildWindows(hwnd_printDialog_in_Acrobat);
      for( i=0 ;  i &lt; ChildPtrList.Size(); i++)   {
          GetClassName( ChildPtrList[i], sClass, 100);
          if (sClass.ToString() == "ComboBox") {
              comboBoxCount++;
              if (comboBoxCount == HWND_PRINTER_NAME )   {
                   hwnd = ChildPtrList[i];
                   break;
              }
          }
      }
      ChildPtrList.Clear();
  
      int sSize ;
      sSize = SendMessageW( hwnd, WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero )+1;
      StringBuilder  sbTitle = new StringBuilder( sSize );
      SendMessageW( hwn, WM_GETTEXT, (IntPtr)sSize, sbTitle);
      return (sbTitle.ToString());
  }
  </code></pre>
  
  <p>The return value of sSize is 4;
  The value of <code>sbTitle.ToString()</code> is "?-" etc.
  The expected resu
  What is wrong?</p>