示例#1
0
 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)
示例#2
0
 def OnDestroy(self, hwnd, msg, wparam, lparam):
     # print("OnDestroy")
     # win32gui.PostQuitMessage(0)
     win32gui.EndDialog(hwnd, 0)
     self.hwnd = None
示例#3
0
 def OnClose(self, hwnd, msg, wparam, lparam):
     win32gui.EndDialog(hwnd, 0)
示例#4
0
 def close(self):
     if self._dialog_modal: win32gui.EndDialog(self._hwnd, 0)
     else: win32gui.DestroyWindow(self._hwnd)
示例#5
0
	def OnClose(hwnd, msg, wparam, lparam):
		id = win32api.LOWORD(wparam)
		win32gui.EndDialog(hwnd, id)
示例#6
0
	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)