Пример #1
0
 protected override void OnHandleCreated(EventArgs e)
 {
     if (Environment.OSVersion.Platform == PlatformID.WinCE)
     {
         if (this.m_wndproc == IntPtr.Zero)
         {
             this.m_delegate = new Imports.WindowProcCallback(this.WindowProc);
             this.m_wndproc  = Marshal.GetFunctionPointerForDelegate(this.m_delegate);
         }
         if (!this.m_delegateHandle.IsAllocated)
         {
             this.m_delegateHandle = GCHandle.Alloc(this.m_delegate, GCHandleType.Pinned);
         }
         this.m_wndprocReal = Imports.SetWindowLong(base.Handle, -4, this.m_wndproc);
     }
     base.OnHandleCreated(e);
 }
Пример #2
0
 protected override void OnHandleCreated(EventArgs e)
 {
     if (Environment.OSVersion.Platform == PlatformID.WinCE)
     {
         if (this.m_wndproc == IntPtr.Zero)
         {
             this.m_delegate = new Imports.WindowProcCallback(this.WindowProc);
             this.m_wndproc = Marshal.GetFunctionPointerForDelegate(this.m_delegate);
         }
         if (!this.m_delegateHandle.IsAllocated)
         {
             this.m_delegateHandle = GCHandle.Alloc(this.m_delegate, GCHandleType.Pinned);
         }
         this.m_wndprocReal = Imports.SetWindowLong(base.Handle, -4, this.m_wndproc);
     }
     base.OnHandleCreated(e);
 }