using System.Windows.Forms; namespace Dongke.WinForm.Controls { /// /// 控件内部控件 /// public class ChildNativeWindow : NativeWindow { #region 成员变量 /// /// 所属的控件 /// private IChildNativeWindow _owner; #endregion /// /// /// public string Code { get; private set; } #region 构造函数 /// /// /// /// /// internal ChildNativeWindow(IChildNativeWindow owner, string code) { this._owner = owner; this.Code = code; } #endregion #region 重写方法 /// /// 调用与此窗口关联的默认窗口过程 /// /// protected override void WndProc(ref Message m) { if (this._owner != null && this._owner.ChildWndProc(this, ref m)) { // 取消处理 return; } base.WndProc(ref m); } #endregion } }