易语言光标处插入文本
系统结构:GetForegroundWindow,GetWindowThreadProcessId,GetCurrentThreadId,AttachThreadInput,GetFocus,GetClassName1,GetClassName,SetWindowLong,SendMessage,WindowFromPoint,SetFocus,取获取焦点窗口_,
======窗口程序集1
| |
| |------ _按钮1_被单击
| |
| |------ _时钟1_周期事件
| |
| |------ _列表框1_双击选择
| |
| |------ _编辑框1_获得焦点
| |
| |------ _编辑框2_获得焦点
| |
| |------ _编辑框3_获得焦点
| |
| |
======调用的Dll
| |
| |---[dll]------ GetForegroundWindow
| |
| |---[dll]------ GetWindowThreadProcessId
| |
| |---[dll]------ GetCurrentThreadId
| |
| |---[dll]------ AttachThreadInput
| |
| |---[dll]------ GetFocus
| |
| |---[dll]------ GetClassName1
| |
| |---[dll]------ GetClassName
| |
| |---[dll]------ SetWindowLong
| |
| |---[dll]------ SendMessage
| |
| |---[dll]------ WindowFromPoint
| |
| |---[dll]------ SetFocus
| |
| |---[dll]------ 取获取焦点窗口_
调用的DLL命令:
.DLL命令 GetForegroundWindow, 整数型, , "GetForegroundWindow"
.DLL命令 GetWindowThreadProcessId, 整数型, , "GetWindowThreadProcessId"
.参数 Id
.参数 hwnd
.DLL命令 GetCurrentThreadId, 整数型, , "GetCurrentThreadId"
.DLL命令 AttachThreadInput, 整数型
.参数 欲连接线程的标识符
.参数 与idAttach线程连接的另一个线程的标识符
.参数 FALSE撤消连接, 逻辑型
.DLL命令 GetFocus, 整数型, , "GetFocus"
.DLL命令 GetClassName1, 整数型, "user32.dll", "GetClassNameA"
.参数 句柄, 整数型
.参数 文本, 文本型
.参数 文本长度, 整数型
.DLL命令 GetClassName, 整数型, "user32.dll", "GetClassNameA"
.参数 句柄, 整数型
.参数 文本, 文本型
.参数 文本长度, 整数型
.DLL命令 SetWindowLong, 整数型, "user32", "SetWindowLongA"
.参数 hwnd, 整数型
.参数 nIndex, 整数型
.参数 dwNewLong, 整数型
.DLL命令 SendMessage, 整数型, "user32", "SendMessageA"
.参数 hwnd, 整数型
.参数 wMsg, 整数型
.参数 wParam, 整数型
.参数 lParam, 文本型
.DLL命令 WindowFromPoint, 整数型, "user32", "WindowFromPoint"
.参数 xPoint, 整数型
.参数 yPoint, 整数型
.DLL命令 SetFocus, 整数型, "user32.dll", "SetFocus", 公开, SetFocus,设置得拥有输入焦点的窗口的句柄
.参数 hwnd, 整数型
.DLL命令 取获取焦点窗口_, 整数型, "user32.dll", "GetFocus", , GetFocus,获得拥有输入焦点的窗口的句柄
注:本站源码主要来源于网络收集。如有侵犯您的利益,请联系我们,我们将及时删除!
部分源码可能含有危险代码,(如关机、格式化磁盘等),请看清代码在运行。
由此产生的一切后果本站均不负责。源码仅用于学习使用,如需运用到商业场景请咨询原作者。
使用本站源码开发的产品均与本站无任何关系,请大家遵守国家相关法律。