关于句柄的使用--------------------
a 句柄是什么 句柄有什么作用?
b api 函数[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int MessageBox
(
int hWnd,
string text,
string caption,
uint type);
为什么hwnd设置为可以 设置为(int)button1.Handle也可以呢 ?
两者有什么区别吗 ?
使用(int)button1.Handle能解释一下吗 ?
经过调试
MessageBox((int)button1.Handle, "Hello World", "Platform Invoke Sample", 0);
和
MessageBox(0, "Hello World", "Platform Invoke Sample", 0);
效果是一样的
请高手朋友指点吧!