codekingpro/portable-devtools
115k
1# Framework Window classes.2 3# Most Pythonwin windows should use these classes rather than4# the raw MFC ones if they want Pythonwin specific functionality.5import pywin.mfc.window6import win32con7 8 9class MDIChildWnd(pywin.mfc.window.MDIChildWnd):10 def AutoRestore(self):11 "If the window is minimised or maximised, restore it."12 p = self.GetWindowPlacement()13 if p[1] == win32con.SW_MINIMIZE or p[1] == win32con.SW_SHOWMINIMIZED:14 self.SetWindowPlacement(p[0], win32con.SW_RESTORE, p[2], p[3], p[4])15 