获取托盘图标坐标例程非识图

易语言 2020-07-04 16:19:10

num = SendMessageA (hToolbar, 1048, 0, 0)
.计次循环首 (num, i)
ptb = VirtualAllocEx (hProcess, 0, 20, 4096, 64)
.如果真 (ptb = 0)
输出调试文本 (“Process allocates memory error!”)
标题 = “内存分配错误”
到循环尾 ()
.如果真结束
SendMessageA (hToolbar, 1047, i - 1, ptb)
buf = 取空白字节集 (200)
ReadProcessMemory (hProcess, ptb, buf, 取字节集长度 (buf), 0)
_To_TB (tb, buf, 20)
num = _lstrlenW (hProcess, tb.iString)
buf = 取空白字节集 (200)
ReadProcessMemory (hProcess, tb.iString, buf, 取字节集长度 (buf), 0)
string = W2A (buf)
buf = 取空白字节集 (200)
ReadProcessMemory (hProcess, tb.dwData, buf, 取字节集长度 (buf), 0)
hWnd = 取字节集数据 (buf, #整数型, )
GetWindowThreadProcessId (hWnd, pid)
x = 超级列表框1.插入表项 (, string, , , , )
超级列表框1.置标题 (x, 1, 到文本 (hWnd))
VirtualFreeEx (hProcess, ptb, 0, 32768)
.计次循环尾 ()