def OnExitSizeMove(self, hWnd=0, msg=0, wParam=0, lParam=0): """ When the window is _done_ moving, this method is called. Appears to cover the last steps of the (un)docking procedures """ log.debug('SC_SIZE: %s', SC_SIZE) log.debug('OnExitSizeMove %s %s %s', msg, wParam, lParam) if not self.Enabled: return if self.docked and self.AutoHide: if self.bypassSizeEvents: ms = wx.GetMouseState() if not ms.LeftDown(): self.bypassSizeEvents = False return False #if in docking mode and not docked, dock if self.docking and not self.docked: self.docking = False self.docked = True self.AppBarQuerySetPos(set = True) if self.docked and not self.AutoHide: abd = self.GetNewAppBarData() abd.rc = wxRectToRECT(self.dockedRect) SHAppBarMessage(ABM_SETPOS, abd) #clear old size if not docked if not self.docked: self.oldSize = None self.UpdateTaskbar()
def DrawSubMenuArrow(dc, rect): from gui.native.win.winextensions import wxRectToRECT rect = wxRectToRECT(rect) _drawnativecontrol_wxMSW(dc.GetHDC(), byref(rect), controls.menuarrow, 0)
def Monitor_FromRect(rect, find_near = True): hmonitor = MonitorFromRect(byref(wxRectToRECT(rect)), MONITOR_DEFAULTTONEAREST if find_near else MONITOR_DEFAULTTONULL) if hmonitor: return Monitor(hmonitor)