def OnInitDialog(self, hwnd, msg, wparam, lparam):
self.hwnd = hwnd
desktop = win32gui.GetDesktopWindow()
dt_l, dt_t, dt_r, dt_b = win32gui.GetWindowRect(desktop)
centre_x, centre_y = win32gui.ClientToScreen( desktop, ( (dt_r-dt_l)/2, (dt_b-dt_t)/2) )
bmCtrl = win32gui.GetDlgItem(self.hwnd, IDC_BITMAP)
win32gui.SendMessage(bmCtrl, win32con.STM_SETIMAGE, win32con.IMAGE_BITMAP, self.hSplash)
win32gui.SetWindowPos(self.hwnd, win32con.HWND_TOPMOST,
centre_x-(self.bmWidth/2), centre_y-(self.bmHeight/2),
self.bmWidth, self.bmHeight, win32con.SWP_HIDEWINDOW)
win32gui.SetForegroundWindow(self.hwnd)
评论列表
文章目录