Esempio n. 1
0
        private MobileWndProc _formProc; // object's delegate

        /// <summary>
        ///  subclass the window
        /// </summary>
        void subclassThisForm(IntPtr hwnd)
        {
            _formProc        = new MobileWndProc(formWindowProc);
            _origFormWndProc = (IntPtr)NativeWindowCommon.SetWindowLong(hwnd, NativeWindowCommon.GWL_WNDPROC,
                                                                        Marshal.GetFunctionPointerForDelegate(_formProc).ToInt32());
        }
Esempio n. 2
0
 /// <summary> subclass the combobox - replace it's window proce
 /// </summary>
 void subclassCombobox()
 {
     proc        = new MobileWndProc(WindowProc);
     OrigWndProc = (IntPtr)NativeWindowCommon.SetWindowLong(Handle, NativeWindowCommon.GWL_WNDPROC,
                                                            Marshal.GetFunctionPointerForDelegate(proc).ToInt32());
 }
Esempio n. 3
0
 //This is usually where the control handle is created - subclass
 void TableControl_HandleCreated(object sender, EventArgs e)
 {
     proc        = new MobileWndProc(WindowProc);
     OrigWndProc = (IntPtr)NativeWindowCommon.SetWindowLong(Handle, NativeWindowCommon.GWL_WNDPROC,
                                                            Marshal.GetFunctionPointerForDelegate(proc).ToInt32());
 }