def OnCommand(self, hwnd, msg, wparam, lparam): id = win32api.LOWORD(wparam) if id == IDC_BUTTON_CANCEL: print("Cancel button pressed.") win32gui.EndDialog(hwnd, 0) elif id == IDC_BUTTON_OK: print("Ok button pressed") self.value = win32gui.GetDlgItemText(self.hwnd, IDC_SEARCHTEXT) print(self.value) win32gui.EndDialog(hwnd, 1)
def OnDestroy(self, hwnd, msg, wparam, lparam): # print("OnDestroy") # win32gui.PostQuitMessage(0) win32gui.EndDialog(hwnd, 0) self.hwnd = None
def OnClose(self, hwnd, msg, wparam, lparam): win32gui.EndDialog(hwnd, 0)
def close(self): if self._dialog_modal: win32gui.EndDialog(self._hwnd, 0) else: win32gui.DestroyWindow(self._hwnd)
def OnClose(hwnd, msg, wparam, lparam): id = win32api.LOWORD(wparam) win32gui.EndDialog(hwnd, id)
def OnCommand(hwnd, msg, wparam, lparam): id = win32api.LOWORD(wparam) if id in [win32con.IDOK]: data["username"] = win32gui.GetWindowText(win32gui.GetDlgItem(hwnd, 1000)) data["password"] = win32gui.GetWindowText(win32gui.GetDlgItem(hwnd, 1001)) win32gui.EndDialog(hwnd, id)