L'obtention d'un Bouton de la poignée à partir d'une autre application

J'ai un programme qui doit envoyer le BM_CLICK message à un autre bouton applications.
Je peux obtenir le handle de fenêtre parent mais quand j'essaie d'obtenir le bouton de la poignée si elle retourne toujours 0

J'ai eu le libellé du bouton nom et le type de bouton de Spy++ il me semble bon mais je sais que je dois avoir quelque chose de mal. ci-dessous mon code

 public const Int BM_CLICK = 0x00F5;

 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern IntPtr SendMessage(IntPtr hwnd, uint Msg, IntPtr wParam, IntPtr lParam);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);



private void button1_Click(object sender, EventArgs e)
{
    Process[] processes = Process.GetProcessesByName("QSXer");

    foreach (Process p in processes)
    {
        ////the Button's Caption is "Send" and it is a "Button".  
        IntPtr ButtonHandle = FindWindowEx(p.MainWindowHandle, IntPtr.Zero, "Button", "Send");
       //ButtonHandle is always zero thats where I think the problem is 
    SendMessage(ButtonHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero);

    }

}

Espion capture d'écran

L'obtention d'un Bouton de la poignée à partir d'une autre application

InformationsquelleAutor Mike | 2010-09-23