当前位置: 首页>>代码示例>>Python>>正文


Python win32api.LOWORD属性代码示例

本文整理汇总了Python中win32api.LOWORD属性的典型用法代码示例。如果您正苦于以下问题:Python win32api.LOWORD属性的具体用法?Python win32api.LOWORD怎么用?Python win32api.LOWORD使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在win32api的用法示例。


在下文中一共展示了win32api.LOWORD属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: OnCommand

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [as 别名]
def OnCommand(self, hwnd, msg, wparam, lparam):
        id = win32api.LOWORD(wparam)
        if id == IDC_BUTTON_SEARCH:
            self.ClearListItems()
            def fill_slowly(q, hwnd):
                import time
                for i in range(20):
                    q.put(("whatever", str(i+1), "Search result " + str(i) ))
                    win32gui.PostMessage(hwnd, WM_SEARCH_RESULT, 0, 0)
                    time.sleep(.25)
                win32gui.PostMessage(hwnd, WM_SEARCH_FINISHED, 0, 0)

            import threading
            self.result_queue = Queue.Queue()
            thread = threading.Thread(target = fill_slowly, args=(self.result_queue, self.hwnd) )
            thread.start()
        elif id == IDC_BUTTON_DISPLAY:
            print "Display button selected"
            sel = win32gui.SendMessage(self.hwndList, commctrl.LVM_GETNEXTITEM, -1, commctrl.LVNI_SELECTED)
            print "The selected item is", sel+1

    # These function differ based on how the window is used, so may be overridden 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:24,代码来源:win32gui_dialog.py

示例2: OnCommand

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [as 别名]
def OnCommand(
        self,
        hwnd,
        msg,
        wparam,
        lparam,
    ):
        id = win32api.LOWORD(wparam)
        if id == 1023:
            self.status.append(self.EnumStatus.TOGGLE)
        elif id == 1024:
            self.status.append(self.EnumStatus.START)
        elif id == 1025:
            self.status.append(self.EnumStatus.RESTART)
        elif id == 1026:
            self.status.append(self.EnumStatus.STOP)
        elif id == 1027:
            self.status.append(self.EnumStatus.QUIT)
            self.Destroy()
        else:
            print 'Unknown command -', id 
开发者ID:uwdata,项目名称:termite-visualizations,代码行数:23,代码来源:taskbar_widget.py

示例3: OnSize

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例4: OnSize

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例5: OnMouseMove

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例6: OnSize

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [as 别名]
def OnSize (self, params):
		lParam = params[3]
		self.width = win32api.LOWORD(lParam)
		self.height = win32api.HIWORD(lParam) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:6,代码来源:fontdemo.py

示例7: OnActivate

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [as 别名]
def OnActivate(self, msg):
		wparam = msg[2]
		fActive = win32api.LOWORD(wparam)
		if fActive != win32con.WA_INACTIVE:
			self.CheckButtonStates() 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:7,代码来源:find.py

示例8: on_size

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例9: on_size

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例10: OnSize

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例11: OnSize

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例12: OnCommand

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [as 别名]
def OnCommand(self, hwnd, msg, wparam, lparam):
        id = win32api.LOWORD(wparam)
        if id == 1023:
            import win32gui_dialog
            win32gui_dialog.DemoModal()
        elif id == 1024:
            print "Hello"
        elif id == 1025:
            print "Goodbye"
            win32gui.DestroyWindow(self.hwnd)
        else:
            print "Unknown command -", id 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:14,代码来源:win32gui_taskbar.py

示例13: get_file_version

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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

示例14: _dialog_build_message_map

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [as 别名]
def _dialog_build_message_map(self):
        # Collect all controls which expect callbacks.
        map = {}
        for control in self._dialog_controls:
            for message, callback in control.message_callbacks.items():
                map.setdefault(message, {})[control.id] = callback

        # Create dispatchers for each type of message.
        for message, control_callbacks in map.items():
            def dispatcher(hwnd, msg, wparam, lparam):
                id = win32api.LOWORD(wparam)
                if id in control_callbacks:
                    control_callbacks[id](hwnd, msg, wparam, lparam)
            map[message] = dispatcher

        # Add the top-level callbacks handled by the window itself.
        map.update({
                    win32con.WM_SIZE:           self.on_size,
                    win32con.WM_INITDIALOG:     self.on_init_dialog,
                    win32con.WM_GETMINMAXINFO:  self.on_getminmaxinfo,
                    win32con.WM_CLOSE:          self.on_close,
                    win32con.WM_DESTROY:        self.on_destroy,
                  })
        return map


    #-----------------------------------------------------------------------
    # Message handler methods. 
开发者ID:t4ngo,项目名称:dragonfly,代码行数:30,代码来源:dialog_base.py

示例15: on_size

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LOWORD [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


注:本文中的win32api.LOWORD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。