當前位置: 首頁>>代碼示例>>Python>>正文


Python win32api.HIWORD屬性代碼示例

本文整理匯總了Python中win32api.HIWORD屬性的典型用法代碼示例。如果您正苦於以下問題:Python win32api.HIWORD屬性的具體用法?Python win32api.HIWORD怎麽用?Python win32api.HIWORD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在win32api的用法示例。


在下文中一共展示了win32api.HIWORD屬性的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: OnSize

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnSize(self, hwnd, msg, wparam, lparam):
        x = win32api.LOWORD(lparam)
        y = win32api.HIWORD(lparam)
        self.eb.SetRect(None, (0, 0, x, y)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:explorer_browser.py

示例2: OnSize

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnSize(self, hwnd, msg, wparam, lparam):
        #print "OnSize", self.hwnd_child, win32api.LOWORD(lparam), win32api.HIWORD(lparam)
        if self.hwnd_child is not None:
            x = win32api.LOWORD(lparam)
            y = win32api.HIWORD(lparam)
            win32gui.MoveWindow(self.hwnd_child, 0, 0, x, y, False)

# This uses scintilla to display a filename, and optionally jump to a line
# number. 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:11,代碼來源:shell_view.py

示例3: OnMouseMove

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnMouseMove(self, msg):
		flags = wparam = msg[2]
		lparam = msg[3]
		if self.IsFloating() or not self.bTracking:
			return 1

		# Convert unsigned 16 bit to signed 32 bit.
		x=win32api.LOWORD(lparam)
		if x & 32768: x = x | -65536
		y = win32api.HIWORD(lparam)
		if y & 32768: y = y | -65536
		pt = x, y
		cpt = CenterPoint(self.rectTracker)
		pt = self.ClientToWnd(pt)
		if self.IsHorz():
			if cpt[1] != pt[1]:
				self.OnInvertTracker(self.rectTracker)
				self.rectTracker = OffsetRect(self.rectTracker, (0, pt[1] - cpt[1]))
				self.OnInvertTracker(self.rectTracker)
		else:
			if cpt[0] != pt[0]:
				self.OnInvertTracker(self.rectTracker)
				self.rectTracker = OffsetRect(self.rectTracker, (pt[0]-cpt[0], 0))
				self.OnInvertTracker(self.rectTracker)

		return 0 # Dont pass it on.

#	def OnBarStyleChange(self, old, new): 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:30,代碼來源:DockingBar.py

示例4: OnSize

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnSize (self, params):
		lParam = params[3]
		self.width = win32api.LOWORD(lParam)
		self.height = win32api.HIWORD(lParam) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:6,代碼來源:fontdemo.py

示例5: on_size

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def on_size (self, params):
		lparam = params[3]
		w = win32api.LOWORD(lparam)
		h = win32api.HIWORD(lparam)
		self.LayoutControls(w, h) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:7,代碼來源:list.py

示例6: on_size

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def on_size (self, params):
        lparam = params[3]
        w = win32api.LOWORD(lparam)
        h = win32api.HIWORD(lparam)
        self.GetDlgItem (win32ui.IDC_LIST1).MoveWindow((0,0,w,h)) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:7,代碼來源:browser.py

示例7: OnSize

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnSize(self, params):
        lparam = params[3]
        w = win32api.LOWORD(lparam)
        h = win32api.HIWORD(lparam)
        if w != 0:
            self.CheckMadeList()
        elif w == 0:
            self.DestroyList()
        return 1 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:11,代碼來源:ModuleBrowser.py

示例8: OnSize

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnSize(self, hwnd, msg, wparam, lparam):
        x = win32api.LOWORD(lparam)
        y = win32api.HIWORD(lparam)
        self._DoSize(x,y)
        return 1 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:7,代碼來源:win32gui_dialog.py

示例9: get_file_version

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def get_file_version(self, path):
        info = win32api.GetFileVersionInfo(path, '\\')
        ms = info['FileVersionMS']
        ls = info['FileVersionLS']
        return (win32api.HIWORD(ms), win32api.LOWORD(ms),
                win32api.HIWORD(ls), win32api.LOWORD(ls)) 
開發者ID:cloudbase,項目名稱:cloudbase-init,代碼行數:8,代碼來源:windows.py

示例10: on_size

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def on_size(self, hwnd, msg, wparam, lparam):
        width  = win32api.LOWORD(lparam)
        height = win32api.HIWORD(lparam)
        self._do_size(width, height)
        return 1 
開發者ID:t4ngo,項目名稱:dragonfly,代碼行數:7,代碼來源:dialog_base.py

示例11: OnSize

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def OnSize(self, hwnd, msg, wparam, lparam):
        x = win32api.LOWORD(lparam)
        y = win32api.HIWORD(lparam)
        self._DoSize(x, y)
        return 1 
開發者ID:eavatar,項目名稱:eavatar-me,代碼行數:7,代碼來源:console.py

示例12: _show_caret_pos

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def _show_caret_pos(self):
        edit = win32gui.GetDlgItem(self.hwnd, IDC_SCRIPT)
        pos = win32gui.SendMessage(edit, win32con.EM_GETSEL, None, None)
        self.row = win32api.LOWORD(pos)
        self.col = win32api.HIWORD(pos)
        self._set_status_message('%d:%d' % (self.row, self.col)) 
開發者ID:eavatar,項目名稱:eavatar-me,代碼行數:8,代碼來源:console.py

示例13: nativeEvent

# 需要導入模塊: import win32api [as 別名]
# 或者: from win32api import HIWORD [as 別名]
def nativeEvent(self, eventType, message):
        retval, result = super(Window, self).nativeEvent(eventType, message)
        if eventType == "windows_generic_MSG":
            msg = ctypes.wintypes.MSG.from_address(message.__int__())
            # 獲取鼠標移動經過時的坐標
            x = win32api.LOWORD(msg.lParam) - self.frameGeometry().x()
            y = win32api.HIWORD(msg.lParam) - self.frameGeometry().y()
            # 判斷鼠標位置是否有其它控件
            if self.childAt(x, y) != None:
                return retval, result
            if msg.message == win32con.WM_NCCALCSIZE:
                # 攔截不顯示頂部的係統自帶的邊框
                return True, 0
            if msg.message == win32con.WM_GETMINMAXINFO:
                # 當窗口位置改變或者大小改變時會觸發該消息
                info = ctypes.cast(
                    msg.lParam, ctypes.POINTER(MINMAXINFO)).contents
                # 修改最大化的窗口大小為主屏幕的可用大小
                info.ptMaxSize.x = self._rect.width()
                info.ptMaxSize.y = self._rect.height()
                # 修改放置點的x,y坐標為0,0
                info.ptMaxPosition.x, info.ptMaxPosition.y = 0, 0
            if msg.message == win32con.WM_NCHITTEST:
                w, h = self.width(), self.height()
                lx = x < self.BorderWidth
                rx = x > w - self.BorderWidth
                ty = y < self.BorderWidth
                by = y > h - self.BorderWidth
                # 左上角
                if (lx and ty):
                    return True, win32con.HTTOPLEFT
                # 右下角
                if (rx and by):
                    return True, win32con.HTBOTTOMRIGHT
                # 右上角
                if (rx and ty):
                    return True, win32con.HTTOPRIGHT
                # 左下角
                if (lx and by):
                    return True, win32con.HTBOTTOMLEFT
                # 上
                if ty:
                    return True, win32con.HTTOP
                # 下
                if by:
                    return True, win32con.HTBOTTOM
                # 左
                if lx:
                    return True, win32con.HTLEFT
                # 右
                if rx:
                    return True, win32con.HTRIGHT
                # 標題
                return True, win32con.HTCAPTION
        return retval, result 
開發者ID:PyQt5,項目名稱:PyQt,代碼行數:57,代碼來源:NativeEvent.py


注:本文中的win32api.HIWORD屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。