|
[求助]发一个 坐在窗口上的(动画)软件 代码, 请大家改一改代码
顶一下................... |
|
[求助]发一个 坐在窗口上的(动画)软件 代码, 请大家改一改代码
顶一下................... |
|
|
|
[求助]关于移动窗口的问题, 做了几天..也未做成...
顶一下....... |
|
[求助]关于移动窗口的问题, 做了几天..也未做成...
天啊.....上面的问题是完美地解决了...... 但新的问题又来了.... 还请大家帮一下..... var FW : THandle; //句柄 Rect_A : TRect; function CallWndProc(nCode, wParam, lParam : Integer): Integer; stdcall; begin if nCode = HC_ACTION then begin FW := GetForegroundWindow; if (FW = PCWPSTRUCT(lParam)^.hwnd) and (PCWPSTRUCT(lParam)^.message = WM_MOVING) then begin GetWindowRect(FW, Rect_A); SetWindowPos(DLLForm.Handle, HWND_TOPMOST, Rect_A.Left, Rect_A.Top - 70, 0, 0, SWP_NOSIZE or SWP_NOACTIVATE); // DLLForm 是 DLL 中的窗口, 用来放图片的 //问题有 2 个: // 1. Message 是正常得到了...但用 SetWindowPos 来定位 DLL 中的窗口, 效果不好(不可以像一些"磁性" 窗口 一样实时同步移动) // 2. DLLForm 是 DLL 中的窗口, 发觉, 如果 GetForegroundWindow 得到的时其它外部程序的窗口..会出现下面的错误: // "0x032c1f7f" 指令引用的 "0x00000180" 内存。该内存不能为 "read"。 //要终止程序,请单击“确定”。 // 要调试程序,请单击“取消”。"" end; end; if nCode < 0 then Result := CallNextHookEx(HookHandle, nCode, wParam, lParam); end; function InstallHook : Boolean; stdcall; begin Result:=False; HookHandle:=SetWindowsHookEx(WH_CALLWNDPROC, @CallWndProc, HInstance, 0); DLLForm:= TDLLForm.Create(Application); // 我想...在这里开始创建窗口 DLLForm.Show; Result := HookHandle <> 0; end; |
|
[求助]关于移动窗口的问题, 做了几天..也未做成...
多谢大家了......祝大家身体健康....心想事成..... |
|
[求助]关于移动窗口的问题, 做了几天..也未做成...
function HookMsgProc(nCode, wParam, lParam : Integer): Integer;stdcall; var PCWP : PMSG; begin Result:=0; if nCode = HC_ACTION then begin PCWP:=PMSG(lParam); case PCWP.message of //就是这里不能正常接收 WM_MOVE WM_MOVE: begin ReleaseCapture; SendMessage(FindWindow('Form2', nil), WM_SYSCOMMAND, SC_MOVE + 1, 0); end; end; end; if nCode < 0 then Result := CallNextHookEx(HookHandle, nCode, wParam, lParam); end; 不知是什么地方写错了....请指教........ |
|
[求助]关于移动窗口的问题, 做了几天..也未做成...
顶一下....... |
|
[求助]关于移动窗口的问题, 做了几天..也未做成...
现在....当用户拖动前台窗口时...我的窗口也要一起拖动... 我试过用 Hook 来取 WM_MOVE后再处理我的窗口(要和前台窗口一起拖动)... 我试了用HOOK来取WM_MOVE, MESSAGE 总是不能正常取出.... 大家能帮我写个 HOOK WM_MOVE MESSAGE 的 HOOK 吗? 还有...上面的功能做在 DLL 有 HOOK中...会不会比上面的线程好.... |
|
[原创]Windows系统程序设计之插入DLL和挂接API
顶啊........ |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值