例如点击窗口上的一个按钮的调用过程:TForm1.Button1Click(???)
TControl.Click
TButton.Click
TButton.CNCommand((48401, 414, 0, 2097566, 0))
TControl.WndProc((48401, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TWinControl.WndProc((48401, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TButtonControl.WndProc((48401, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TControl.Perform(48401,414,2097566)
DoControlMsg(2097566,(no value))
TWinControl.WMCommand((273, 414, 0, 2097566, 0))
TCustomForm.WMCommand((273, 414, 0, 2097566, 0))
TControl.WndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TWinControl.WndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TCustomForm.WndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TWinControl.MainWndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
StdWndProc(1835476,273,414,2097566)
TWinControl.DefaultHandler((no value))
TControl.WMLButtonUp((514, 0, 27, 9, (27, 9), 0))
TControl.WndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
TWinControl.WndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
TButtonControl.WndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
TWinControl.MainWndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
StdWndProc(2097566,514,0,589851)
TApplication.ProcessMessage((2097566, 514, 0, 589851, 4794281, (609, 279)))
TApplication.HandleMessage
TApplication.Run
Project1通过观察上面是没有WM_LBUTTONDOWN事件的。反而是触发按钮所属的窗口的WM_LBUTTONDOWN事件。
TControl.Click
TButton.Click
TButton.CNCommand((48401, 414, 0, 2097566, 0))
TControl.WndProc((48401, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TWinControl.WndProc((48401, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TButtonControl.WndProc((48401, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TControl.Perform(48401,414,2097566)
DoControlMsg(2097566,(no value))
TWinControl.WMCommand((273, 414, 0, 2097566, 0))
TCustomForm.WMCommand((273, 414, 0, 2097566, 0))
TControl.WndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TWinControl.WndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TCustomForm.WndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
TWinControl.MainWndProc((273, 414, 2097566, 0, 414, 0, 414, 32, 0, 0))
StdWndProc(1835476,273,414,2097566)
TWinControl.DefaultHandler((no value))
TControl.WMLButtonUp((514, 0, 27, 9, (27, 9), 0))
TControl.WndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
TWinControl.WndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
TButtonControl.WndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
TWinControl.MainWndProc((514, 0, 589851, 0, 0, 0, 27, 9, 0, 0))
StdWndProc(2097566,514,0,589851)
TApplication.ProcessMessage((2097566, 514, 0, 589851, 4794281, (609, 279)))
TApplication.HandleMessage
TApplication.Run
Project1通过观察上面是没有WM_LBUTTONDOWN事件的。反而是触发按钮所属的窗口的WM_LBUTTONDOWN事件。
解决方案 »
- 写了一个程序,在内存中申请两个缓存,进行即使通话,有问题,请大家帮忙啊
- 如何用opendialog打开一个图片文件,用image控件显示
- 请教关于FastReport打印的一个很简单的问题.如何将Form1.Edit1的值赋给报表的memo1.
- 怎么样设置这个属性!!很简单,但很急!!!
- 关于TWebBrowser和TXMLDocument编程的n个问题?
- ehom(?!)兄,进来领分!那个贴你们两人都帮了我,但我只给了其中一个,现在补上!
- 关于TDateTimePicker控件的显示问题,
- 关于 EmbeddedWb 的Mshtml_tlb, SHDocVw_tlb 问题!
- SQLConfigDataSource动态配置ODBC的问题,我写的代码帮忙看一下
- Delphi 中 ADO 使用方法的比较
- 关于dbgrideh中的行属性
- 散分,今天和人赌NBA赢钱了
用winsight32查看(把不必要的消息過濾掉),你點擊一個按鈕,form會收到wm_command, button會收up and down的消息
一个Click是由Down和Up两个消息组成不知道楼主是用什么方法获得这个东西的
建议楼主使用Spy++查一下,消息就知道了,肯定会有Down消息的
在Control按下前先触发form的keydown
无论如何keydown是有的