up.我想windows的消息应该能标识消息发送者句柄的,可是找来找去没结果。
解决方案 »
- C# 条码扫描仪串口编程,获取条形码数据!!!大虾们,帮忙下!!
- c# 怎样将dataset 中的全部内容存进哈希表中,哈希表中的数据怎么放进datagridview中
- 怎样判断此子窗体是否已经打开?
- 我用网上的方法得到CPU序列号,双核的只能得到一个序列号?
- 网页里前台javascript脚本怎么调用后台C#函数
- 如何根据数据库中的数据画出图表
- 遇到一个关于登陆的超级郁闷的问题
- c#窗体程序中AxWindowsMediaPlayer 使用Resources资源
- 如何改变DataGrid中某列的背景色!!!在线等待
- 老师让我做一个仿chinaren的校友录,我想用asp.net(C#)做,我应该如何做呢?
- 如何用c#异步读取文本文件?
- DataGrid格式问题
if(m.Msg == 528)
{
请参看MSDN VC++中的WM_PARENTNOTIFY ,它的
lParam参数在鼠标左键点下时为控件句柄WM_LBUTTONDOWN()
Handle of the child window.}
lParam参数在鼠标左键点下时为控件句柄
我发现这个值和 MyControl.handle 对不上。
1。 Handle of the child window.
2。The x-coordinate of the cursor is the low-order word, and the y-coordinate of the cursor is the high-order word.
{
if(!this.DesignMode)
{
if(m.Msg == 528)
{
try
{
if(m.WParam.ToString() == "513")
{
int i = m.LParam.ToInt32();
string temps = Convert.ToString(i,16);
string PointX = temps.Substring(temps.Length-4);
string PointY = temps.Substring(0,temps.Length-4);
Point p = new Point();
p.X = Convert.ToInt32(PointX,16);
p.Y = Convert.ToInt32(PointY,16);
Panel temp = (Panel)this.GetChildAtPoint(p);
MessageBox.Show(temp.Name);
}
}
catch(Exception E)
{
string sss = E.Message;
}
}
}
base.WndProc (ref m);
}
}