PostMessage to click on calculator not working

  • Thread starter Thread starter GT993
  • Start date Start date
G

GT993

Guest
Sorry, this is C#. I posted it in the C++ forum.

So I want to build a simple program that clicks on the "5" on the calculator but it doesn't work.

Anyone can guess why?


private void button1_Click(object sender, EventArgs e)
{

IntPtr otherHandle = WinGetHandle(@"Calculator");

PostMessage(otherHandle, 0x201, 1, MakeLParam(128, 393));
PostMessage(otherHandle, 0x202, 0, MakeLParam(128, 393));

}


I got the coords from a windows spy. they seem to be right.


The handler is identified but there is no click whatsoever.

Continue reading...
 
Back
Top