通过本文主要向大家介绍了获得控件句柄,获取控件句柄,mfc获取控件句柄,易语言取控件句柄,控件句柄等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
[DllImport("coredll.dll")]
private static extern IntPtr GetCapture();
public static IntPtr GetHWnd(Control ctrl)
{
IntPtr hOldWnd = GetCapture();
ctrl.Capture = true;
IntPtr hWnd = GetCapture();
ctrl.Capture = false;
SetCapture(hOldWnd);
return hWnd;
}
}
</div>