title: Access combobox control in another application
body: <p>I am writing a C++ application that extracts a certain information from another program (I don't have source code to this program). Using Win32 API, I can access all the textboxes. For example, <code>SendMessage(hWnd, WM_GETTEXT, 1024, (LPARAM)charArray)</code> gives me the textbox value correctly. However, there is a dropdown from which I need to get the selected text, and I can't get it. I used spy++ to find the actual handle of the control, and tried</p>
  <pre><code>SendMessage(hWnd, CB_GETCOUNT, 0, 0)
  </code></pre>
  <p>as well as</p>
  <pre><code>SendMessage(hWnd, LB_GETCOUNT, 0, 0)
  </code></pre>
  <p>but both return 0.</p>
  <p>I used spy++ to inspect the control further. As you can see in the attached image, the class name of the control is <code>ClaDrop_xxxxx</code>. This leads me to believe that maybe it's derived from another type of control, but I can't confirm since I don't have source code to that application.</p>
  <p><a href="https://i.stack.imgur.com/Lthsv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lthsv.png" alt="Spy++ showing the handle and class name of control" /></a></p>
  <p>Can anyone help me figure out how to access the selected value of this control?</p>