to zswang(伴水)(被黑中) 

yang_113 2001-12-28 01:07:03
你在“关于移动问题”中有一句
TWinControl(Sender).Perform(WM_SYSCOMMAND, SC_MOVE + 1, 0);
我的问题是SC_Move代表什么,
你的答案我在帮助中也看到了,但上面只有SC_Move的解释,并没有SC_Move+1
我试过把SC_Move+1改为SC_Move,结果是不行的,
我想问SC_Move+1代表什么
—————
...全文
67 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
王集鹄 2001-12-28
  • 打赏
  • 举报
回复
WM_SYSCOMMAND //系统命令的消息
uCmdType = wParam; // type of system command requested
xPos = LOWORD(lParam); // horizontal postion, in screen coordinates
yPos = HIWORD(lParam); // vertical postion, in screen coordinates

SC_MOVE //移动请求

//就是试出来的,也不知道为什么非要加一(加二也可以)

procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
TWinControl(Sender).Perform(WM_SYSCOMMAND, SC_MOVE + 1, 0);
end;

procedure TForm1.Button2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
TWinControl(Sender).Perform(WM_SYSCOMMAND, SC_MOVE - 1 , 0);
end;
kevin_gao 2001-12-28
  • 打赏
  • 举报
回复
这个要看windows是怎么处理WM_SYSCOMMAND消息的了,偶好象没有这方面的资料。关注先!
yang_113 2001-12-28
  • 打赏
  • 举报
回复
但它是SC_MOVE + 1 啊, 不是SC_MOVE
kevin_gao 2001-12-28
  • 打赏
  • 举报
回复
是Windows定义的一个常量!
SC_MOVE = 61456;

5,385

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧