事件中都有TObject *Sender这个参数,做什么用的???

kingcom 2002-12-20 04:31:49
void __fastcall TForm1::FormCreate(TObject *Sender)
{

}
另:wm_creat时lparam是指向CREATESTRUCT结构的指针...在上面的参数列表中没看出来...是否跟Sender这个对象有关???
初学...
...全文
116 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingcom_xu 2002-12-20
  • 打赏
  • 举报
回复
哦...原来如此...
谢谢上面的各位朋友...
invalid 2002-12-20
  • 打赏
  • 举报
回复
看help,应该明白了吧。help是好东西啊!
In an event handler, the Sender parameter indicates which component received the event and therefore called the handler. Sometimes it is useful to have several components share an event handler that behaves differently depending on which component calls it. You can do this by using the
Sender parameter.
我不懂电脑 2002-12-20
  • 打赏
  • 举报
回复
可以识别引发事件的对象,在多个对象公用一个事件处理器时利用Object地Tag区分不同对象。
kingkee 2002-12-20
  • 打赏
  • 举报
回复
在针对某类控件进行消息截获时,就有用了。
kingcom_xu 2002-12-20
  • 打赏
  • 举报
回复
具体又有什么用...用在什么地方...谢谢
kingcom_xu 2002-12-20
  • 打赏
  • 举报
回复
可否举例说明一下...谢谢
比如在FormCreate中...还有在mousedown中...
kingfish 2002-12-20
  • 打赏
  • 举报
回复
事件的触发者
xyz16 2002-12-20
  • 打赏
  • 举报
回复
关注

604

社区成员

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

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