chrome/updater/test/service/win/ui.py
def ClickButton(button_hwnd):
  """Clicks a button window by sending a BM_CLICK message.

  Per http://msdn2.microsoft.com/en-us/library/bb775985.aspx
  "If the button is in a dialog box and the dialog box is not active, the
  BM_CLICK message might fail. To ensure success in this situation, call
  the SetActiveWindow function to activate the dialog box before sending
  the BM_CLICK message to the button."

  Args:
    button_hwnd: HWND to the button to be clicked.
  """
  previous_active_window = win32gui.SetActiveWindow(button_hwnd)
  win32gui.PostMessage(button_hwnd, win32con.BM_CLICK, 0, 0)
  if previous_active_window:
    win32gui.SetActiveWindow(previous_active_window)
Clicks a button window by sending a BM_CLICK message.

  Per http://msdn2.microsoft.com/en-us/library/bb775985.aspx
  "If the button is in a dialog box and the dialog box is not active, the
  BM_CLICK message might fail. To ensure success in this situation, call
  the SetActiveWindow function to activate the dialog box before sending
  the BM_CLICK message to the button."

  Args:
    button_hwnd: HWND to the button to be clicked.
  
Clicks a button window by sending a BM_CLICK message.
Clicks a button window by sending a BM_CLICK message .
def ClickButton(button_hwnd):
  previous_active_window = win32gui.SetActiveWindow(button_hwnd)
  win32gui.PostMessage(button_hwnd, win32con.BM_CLICK, 0, 0)
  if previous_active_window:
    win32gui.SetActiveWindow(previous_active_window)
def ClickButton ( button_hwnd ) : previous_active_window = win32gui . SetActiveWindow ( button_hwnd ) win32gui . PostMessage ( button_hwnd , win32con . BM_CLICK , 0 , 0 ) if previous_active_window : win32gui . SetActiveWindow ( previous_active_window )
Clicks a button window by sending a BM_CLICK message.
Clicks a button window by sending a BM_CLICK message .
"""Clicks a button window by sending a BM_CLICK message.

  Per http://msdn2.microsoft.com/en-us/library/bb775985.aspx
  "If the button is in a dialog box and the dialog box is not active, the
  BM_CLICK message might fail. To ensure success in this situation, call
  the SetActiveWindow function to activate the dialog box before sending
  the BM_CLICK message to the button."

  Args:
    button_hwnd: HWND to the button to be clicked.
  """
button_hwnd
HWND to the button to be clicked.
HWND to the button to be clicked .