Getting a Button handle from another application
问题 I have a program that needs to send the BM_CLICK message to another applications button. I can get the parent window handle but when I try to get the button handle if always returns 0 I got the button caption name and button type from Spy++ it seems right but I know I must have gotten something wrong. below is my 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