高分问2个初级问题 问题一:如何HOOK住WM_NCHITTEST消息,安装什么类型的钩子?我试过WH_GETMESSAGE,WH_MOUSE都不行啊问题二,如何知道光标的位置(不是鼠标),不要用GetCaretPos,因为不是输入文本时用的谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 WH_MOUSE不行吗,要不试试声明一个函数:在private部分加入下列代码:procedure wmnchittest(var msg:twmnchittest);message wm_nchittest;在程序部分加入以下代码:procedure TForm1.wmnchittest(var msg:twmnchittest);begininherited;if (htclient=msg.result) then msg.result:=htcaption;end;问题2:不输入文本会有光标吗 如果是本程序的話, 可用上面的方法, 如果是其它程序的話, 可試試 WH_MSGFILTER 声明:protected procedure WndProc(var Msg: TMessage); override;//Responding URL实现:procedure TMessageForm.WndProc(var Msg: TMessage);var x, y: integer; p: TPoint;begin GetCursorPos(p); x := p.x; y := p.y; case Msg.Msg of WM_NCHITTEST: begin // 加入要实现的代码 end; end; inherited;end; Firemonkey 的 switch 中画图 如何在调用DLL窗体时实现消息循环。让DLL不停的SHOW 如何在memo失去焦点时让选中文字仍然显示 数组的问题 1000分求论文:UP给分。人事管事系统论文。或者学校档案管理系统论文。或者学校学籍管理系统论文。 toolbar2000中工具栏按钮文本 各位大哥帮帮小弟,怎么实现像QQ里那样将图片插入到编辑框中呀,用richedit能实现吗? ODBC写入注册表成功,但不一定能连接成功 怎么汉化第三方控件?(devexpress for d6) 招聘!!!! 呵呵 运行的语句不同则会提示出错
在private部分加入下列代码:
procedure wmnchittest(var msg:twmnchittest);
message wm_nchittest;
在程序部分加入以下代码:
procedure TForm1.wmnchittest(var msg:twmnchittest);
begin
inherited;
if (htclient=msg.result) then msg.result:=htcaption;
end;
问题2:不输入文本会有光标吗
声明:
protected
procedure WndProc(var Msg: TMessage); override;//Responding URL实现:
procedure TMessageForm.WndProc(var Msg: TMessage);
var
x, y: integer;
p: TPoint;
begin
GetCursorPos(p);
x := p.x;
y := p.y;
case Msg.Msg of
WM_NCHITTEST:
begin
// 加入要实现的代码
end;
end;
inherited;
end;