如何用sendmessage双击syslistview32的某一行,急急,高难!!!(100)

  • 主题发起人 主题发起人 menghl
  • 开始时间 开始时间
M

menghl

Unregistered / Unconfirmed
GUEST, unregistred user!
如果用sendmessage双击syslistview32的某一行,现在已经实现了行的定位,像如双击windows桌面某个图标
 
急请高手做答!!!!!!!!!!!!!!
 
用mouse_event可以模拟双击.
 
syslistview32是什么?在你自己写的程序里吗?
 
发送消息给别的程序的syslistview32回出现错误的!不信你试试!
 
某行获取焦点 procedure SetListViewIndex(mHandle: THandle; mIndex: Integer); var vProcessId: DWORD; vProcess: THandle; vPointer: Pointer; vNumberOfBytesRead: Cardinal; vItem: TLVItem; begin GetWindowThreadProcessId(mHandle, @vProcessId); vProcess := OpenProcess(PROCESS_VM_OPERATION or PROCESS_VM_READ or PROCESS_VM_WRITE, False, vProcessId); vPointer := VirtualAllocEx(vProcess, nil, 4096, MEM_RESERVE or MEM_COMMIT, PAGE_READWRITE); try vItem.stateMask := LVIS_FOCUSED + LVIS_SELECTED; vItem.state := LVIS_FOCUSED + LVIS_SELECTED; WriteProcessMemory(vProcess, vPointer, @vItem, SizeOf(TLVItem), vNumberOfBytesRead); SendMessage(mHandle, LVM_SETITEMSTATE, mIndex, lparam(vPointer)); finally VirtualFreeEx(vProcess, vPointer, 0, MEM_RELEASE); CloseHandle(vProcess); end; end;
 
比如模拟桌面图标。
 
用mouse_event可以模拟双击.也可,但是如何获取某一行的屏幕坐标?
 
后退
顶部