void LButtonPressXY(HWND hWnd,int x,int y)
{
HWND hForeWnd = GetForegroundWindow();
DWORD dwCurID= GetCurrentThreadId();
DWORD dwForeID = GetWindowThreadProcessId(hForeWnd, NULL );
AttachThreadInput( dwCurID, dwForeID, TRUE);
ShowWindow(hWnd, SW_SHOWNORMAL);
SetWindowPos(hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );
SetWindowPos(hWnd, HWND_NOTOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE );
SetForegroundWindow(hWnd);
AttachThreadInput(dwCurID, dwForeID, FALSE);
::SendMessage(hWnd, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
::SendMessage(hWnd, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
}