本文整理匯總了Python中win32gui.PyMakeBuffer方法的典型用法代碼示例。如果您正苦於以下問題:Python win32gui.PyMakeBuffer方法的具體用法?Python win32gui.PyMakeBuffer怎麽用?Python win32gui.PyMakeBuffer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類win32gui
的用法示例。
在下文中一共展示了win32gui.PyMakeBuffer方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: doubleClickStatic
# 需要導入模塊: import win32gui [as 別名]
# 或者: from win32gui import PyMakeBuffer [as 別名]
def doubleClickStatic(hwnd):
'''Simulates a double mouse click on a static
Parameters
----------
hwnd
Window handle of the required static.
Usage example: TODO
'''
_sendNotifyMessage(hwnd, win32con.STN_DBLCLK)
# def getEditText(hwnd):
# bufLen = win32gui.SendMessage(hwnd, win32con.WM_GETTEXTLENGTH, 0, 0) + 1
# print(bufLen)
# buffer = win32gui.PyMakeBuffer(bufLen)
# win32gui.SendMessage(hwnd, win32con.WM_GETTEXT, bufLen, buffer)
#
# text = buffer[:bufLen]
# return text
示例2: doubleClickStatic
# 需要導入模塊: import win32gui [as 別名]
# 或者: from win32gui import PyMakeBuffer [as 別名]
def doubleClickStatic(hwnd):
"""Simulates a double mouse click on a static
Parameters
----------
hwnd
Window handle of the required static.
Usage example: TODO
"""
_sendNotifyMessage(hwnd, win32con.STN_DBLCLK)
# def getEditText(hwnd):
# bufLen = win32gui.SendMessage(hwnd, win32con.WM_GETTEXTLENGTH, 0, 0) + 1
# print(bufLen)
# buffer = win32gui.PyMakeBuffer(bufLen)
# win32gui.SendMessage(hwnd, win32con.WM_GETTEXT, bufLen, buffer)
#
# text = buffer[:bufLen]
# return text
示例3: OnNotify
# 需要導入模塊: import win32gui [as 別名]
# 或者: from win32gui import PyMakeBuffer [as 別名]
def OnNotify(self, hwnd, msg, wparam, lparam):
format = "PPiiiiiiiiP"
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam)
hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged, actionx, actiony, lParam \
= struct.unpack(format, buf)
if code == commctrl.NM_DBLCLK:
print "Double click on item", iItem+1
return 1