title: SendMessage BM_CLICK on application button
body: <p>Hey all im a little confused as the effect of this BM_CLICK issue.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal Msg As Integer, ByVal wParam As Integer, &lt;MarshalAs(UnmanagedType.AsAny)&gt; ByVal lParam As Object) As Integer
  
  Dim hwndParent As Long = FindWindow(vbNullString, "Video Source")
    Debug.Print("findwindow: " &amp; hwndParent)
  Dim hwndButton As Long = FindWindowEx(hwndParent, IntPtr.Zero, "Button", "OK")
    Debug.Print("OK: " &amp; hwndButton)
  hwndButton = SendMessage(hwndButton, BM_CLICK, 0, 0)
    Debug.Print("Clicked: " &amp; hwndButton)
  </code></pre>
  
  <p>The debug output is:</p>
  
  <pre><code>findwindow: 856318
          OK: 1052904
     Clicked: 0
  </code></pre>
  
  <p>Now i have no idea why it doesnt find nor click on the OK button.</p>
  
  <p>The Spy++ for that button looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/55kj0.png" alt="enter image description here"></p>
  
  <p>Any help would be great!</p>