System.Windows.Forms.Control.DefWndProc(ref System.Windows.Forms.Message)

Here are the examples of the csharp api class System.Windows.Forms.Control.DefWndProc(ref System.Windows.Forms.Message) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

39 Examples 7

1. Example

Project: lua-tilde
Source File: ScintillaControl.cs
View license
internal IntPtr SendMessageDirect(uint msg, IntPtr wParam, IntPtr lParam)
        {
            Message m = new Message();
            m.Msg = (int)msg;
            m.WParam = wParam;
            m.LParam = lParam;
            m.HWnd = Handle;

            //  DefWndProc is the Window Proc associated with the window
            //  class for this control created by Windows Forms. It will
            //  in turn call Scintilla's DefWndProc Directly. This has 
            //  the same net effect as using Scintilla's DirectFunction
            //  in that SendMessage isn't used to get the message to 
            //  Scintilla but requires 1 less PInvoke and I don't have
            //  to maintain the FunctionPointer and "this" reference
            DefWndProc(ref m);
            return m.Result;
        }

2. Example

Project: Gorgon
Source File: EditorTreeView.cs
View license
protected override void DefWndProc(ref Message m)
	    {
		    const int leftDoubleClick = 0x203;

			// Override the double click so that the tree doesn't expand on file nodes.
			if (m.Msg == leftDoubleClick)
			{
				if ((SelectedNode.NodeType & NodeType.Directory) != NodeType.Directory)
				{
					return;
				}
			}

		    base.DefWndProc(ref m);
	    }

3. Example

Project: winauth
Source File: AuthenticatorListBox.cs
View license
protected override void DefWndProc(ref Message m)
		{
			if (ReadOnly == false || ((m.Msg <= 0x0200 || m.Msg >= 0x020E)
				&& (m.Msg <= 0x0100 || m.Msg >= 0x0109)
				&& m.Msg != 0x2111
				&& m.Msg != 0x87))
			{
				base.DefWndProc(ref m);
			}
		}

4. Example

Project: Krypton
Source File: KryptonCheckedListBox.cs
View license
private void WmPaint(ref Message m)
            {
                IntPtr hdc;
                PI.PAI/n ..... /n //View Source file for more details /n }

5. Example

Project: Krypton
Source File: KryptonListBox.cs
View license
private void WmPaint(ref Message m)
            {
                IntPtr hdc;
                PI.PAI/n ..... /n //View Source file for more details /n }

6. Example

Project: Krypton
Source File: KryptonTreeView.cs
View license
private void WmPaint(ref Message m)
            {
                IntPtr hdc;
                PI.PAI/n ..... /n //View Source file for more details /n }

7. Example

Project: TaskScheduler
Source File: HomePanel.cs
View license
protected override void WndProc(ref Message m)
		{
			switch (m.Msg)
			{
				case 0x0202: // WM_LBUTTONUP
					DefWndProc(ref m);
					break;

				default:
					base.WndProc(ref m);
					break;
			}
		}

8. Example

Project: dp2
Source File: BinaryEditor.cs
View license
protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {/n ..... /n //View Source file for more details /n }

9. Example

Project: dp2
Source File: TabComboBox.cs
View license
protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case WM_CHANGED:
                    RemoveRightPart();
                    return;
            }

            // Debug.WriteLine(m.Msg.ToString());
            base.DefWndProc(ref m);
        }

10. Example

Project: dp2
Source File: ValueEditBox.cs
View license
protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {/n ..... /n //View Source file for more details /n }

11. Example

Project: logwizard
Source File: ObjectListView.cs
View license
protected virtual bool HandleLButtonUp(ref Message m) {
            if (this.MouseMoveHitTest == null)
                return false;

            // Are they trying to expand/collapse a group?
            if (this.MouseMoveHitTest.HitTestLocation == HitTestLocation.GroupExpander) {
                if (this.TriggerGroupExpandCollapse(this.MouseMoveHitTest.Group))
                    return true;
            }

            if (ObjectListView.IsVistaOrLater && this.HasCollapsibleGroups)
                base.DefWndProc(ref m);

            return false;
        }

12. Example

Project: nUpdate
Source File: ExplorerListView.cs
View license
protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_LBUTTONUP && Environment.OSVersion.Version.Major >= 6)
                DefWndProc(ref m);

            switch (m.Msg)
            {
                case 15:
                    if (!_isExplorerListView)
                    {
                        NativeMethods.SetWindowTheme(Handle, "explorer", null);
                        NativeMethods.SendMessage(Handle, LVM_SETEXTENDEDLISTVIEWSTYLE, new IntPtr(LVS_EX_DOUBLEBUFFER),
                            new IntPtr(LVS_EX_DOUBLEBUFFER));
                        _isExplorerListView = true;
                    }
                    break;
            }

            base.WndProc(ref m);
        }

13. Example

Project: SquareOne
Source File: ObjectListView.cs
View license
protected virtual bool HandleLButtonUp(ref Message m) {
            if (this.MouseMoveHitTest == null)
                return false;

            // Are they trying to expand/collapse a group?
            if (this.MouseMoveHitTest.HitTestLocation == HitTestLocation.GroupExpander) {
                if (this.TriggerGroupExpandCollapse(this.MouseMoveHitTest.Group))
                    return true;
            }

            if (ObjectListView.IsVistaOrLater && this.HasCollapsibleGroups)
                base.DefWndProc(ref m);

            return false;
        }

14. Example

Project: Rubberduck
Source File: DockableWindowHost.cs
View license
protected override void DefWndProc(ref Message m)
        {
            //See the comment in the ctor for why we have to listen for this.
            if (m.Msg == (int) WM.DESTROY)
            {
                Debug.WriteLine("DockableWindowHost received WM.DESTROY.");
                _thisHandle.Free();
            }
            base.DefWndProc(ref m);
        }

15. Example

Project: ScintillaNET
Source File: Scintilla.cs
View license
protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case (NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY):
                    WmReflectNotify(ref m);
                    break;

                case NativeMethods.WM_SETCURSOR:
                    DefWndProc(ref m);
                    break;

                case NativeMethods.WM_LBUTTONDBLCLK:
                case NativeMethods.WM_RBUTTONDBLCLK:
                case NativeMethods.WM_MBUTTONDBLCLK:
                case NativeMethods.WM_XBUTTONDBLCLK:
                    doubleClick = true;
                    goto default;

                case NativeMethods.WM_DESTROY:
                    WmDestroy(ref m);
                    break;

                default:
                    base.WndProc(ref m);
                    break;
            }
        }

16. Example

View license
protected virtual bool HandleLButtonUp(ref Message m) {
            if (this.MouseMoveHitTest == nul/n ..... /n //View Source file for more details /n }

17. Example

Project: specterjs
Source File: WebBrowser.cs
View license
protected override void WndProc(ref Message m)
		{
			switch (m.Msg)
			{
				case WM_PARENTNOTIFY:
					if (!DesignMode)
					{
						if (m.WParam.ToInt32() == WM_DESTROY)
						{
							Closing(this, EventArgs.Empty);
						}
					}
					DefWndProc(ref m);
					break;
				default:
					base.WndProc(ref m);
					break;
			}
		}

18. Example

View license
protected override void DefWndProc(ref Message m) {
            switch (m.Msg) {
                cas/n ..... /n //View Source file for more details /n }

19. Example

View license
protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {/n ..... /n //View Source file for more details /n }

20. Example

Project: Launcher_Multigaming
Source File: Italk.cs
View license
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            if (e.Button == MouseButtons.Left)
            {
                SetState(MouseState.Down);
            }
            if (!(_IsParentForm && ParentForm.WindowState == FormWindowState.Maximized || _ControlMode))
            {
                if (HeaderRect.Contains(e.Location))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[0]);
                }
                else if (_Sizable && !(Previous == 0))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[Previous]);
                }
            }
        }

21. Example

Project: Launcher_Multigaming
Source File: Italk.cs
View license
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            if (e.Button == MouseButtons.Left)
            {
                SetState(MouseState.Down);
            }
            if (!(_IsParentForm && ParentForm.WindowState == FormWindowState.Maximized || _ControlMode))
            {
                if (HeaderRect.Contains(e.Location))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[0]);
                }
                else if (_Sizable && !(Previous == 0))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[Previous]);
                }
            }
        }

22. Example

Project: Launcher_Multigaming
Source File: Italk.cs
View license
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            if (e.Button == MouseButtons.Left)
            {
                SetState(MouseState.Down);
            }
            if (!(_IsParentForm && ParentForm.WindowState == FormWindowState.Maximized || _ControlMode))
            {
                if (HeaderRect.Contains(e.Location))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[0]);
                }
                else if (_Sizable && !(Previous == 0))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[Previous]);
                }
            }
        }

23. Example

Project: SirenOfShame
Source File: ThreeStateTreeView.cs
View license
protected override void DefWndProc(ref Message m)
        {
            base.DefWndProc(ref m);
            if (m.Msg == WM_PAINT)
            {
                int y = 0;
                Graphics g = CreateGraphics();

                if (Nodes.Count > 0)
                    PaintNodes(Nodes[0], g, ref y);
                g.Dispose();
            }
        }

24. Example

View license
protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case WM_PARENTNOTIFY:
                    if (!DesignMode)
                    {
                        if (m.WParam.ToInt32() == WM_DESTROY)
                        {
                            Message newMsg = new Message();
                            newMsg.Msg = WM_DESTROY;
                            // Tell whoever cares we are closing
                            Form parent = this.Parent as Form;
                            if (parent != null)
                                parent.Close();
                        }
                    }
                    DefWndProc(ref m);
                    break;
                default:
                    base.WndProc(ref m);
                    break;
            }
        }

25. Example

Project: CloudNotes
Source File: TreeViewEx.cs
View license
protected override void OnPaint(PaintEventArgs e)
        {
            if (GetStyle(ControlStyles.UserPaint))
            {
                var m = new Message
                {
                    HWnd = Handle,
                    Msg = WM_PRINTCLIENT,
                    WParam = e.Graphics.GetHdc(),
                    LParam = (IntPtr) PRF_CLIENT
                };
                DefWndProc(ref m);
                e.Graphics.ReleaseHdc(m.WParam);
            }
            base.OnPaint(e);
        }

26. Example

Project: Launcher_Multigaming
Source File: MonoFlat.cs
View license
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            Focus();
            if (e.Button == MouseButtons.Left)
            {
                SetState(MouseState.Down);
            }
            if (!(_IsParentForm && ParentForm.WindowState == FormWindowState.Maximized || _ControlMode))
            {
                if (HeaderRect.Contains(e.Location))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[0]);
                }
                else if (_Sizable && !(Previous == 0))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[Previous]);
                }
            }
        }

27. Example

Project: Launcher_Multigaming
Source File: MonoFlat.cs
View license
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            Focus();
            if (e.Button == MouseButtons.Left)
            {
                SetState(MouseState.Down);
            }
            if (!(_IsParentForm && ParentForm.WindowState == FormWindowState.Maximized || _ControlMode))
            {
                if (HeaderRect.Contains(e.Location))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[0]);
                }
                else if (_Sizable && !(Previous == 0))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[Previous]);
                }
            }
        }

28. Example

Project: Launcher_Multigaming
Source File: MonoFlat.cs
View license
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            Focus();
            if (e.Button == MouseButtons.Left)
            {
                SetState(MouseState.Down);
            }
            if (!(_IsParentForm && ParentForm.WindowState == FormWindowState.Maximized || _ControlMode))
            {
                if (HeaderRect.Contains(e.Location))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[0]);
                }
                else if (_Sizable && !(Previous == 0))
                {
                    Capture = false;
                    WM_LMBUTTONDOWN = true;
                    DefWndProc(ref Messages[Previous]);
                }
            }
        }

29. Example

Project: ClearCanvas
Source File: BindingTreeView.cs
View license
protected override void OnPaint(PaintEventArgs e)
			{
				if (GetStyle(ControlStyles.UserPaint))
				{
					Message m = new Message();
					m.HWnd = Handle;
					m.Msg = 0x0318; // WM_PRINTCLIENT;
					m.WParam = e.Graphics.GetHdc();
					m.LParam = (IntPtr)4; // PRF_CLIENT;
					DefWndProc(ref m);
					e.Graphics.ReleaseHdc(m.WParam);
				}
				base.OnPaint(e);
			}

30. Example

Project: MapViewer
Source File: ObjectListView.cs
View license
protected virtual bool HandleLButtonUp(ref Message m) {
            if (this.MouseMoveHitTest == nul/n ..... /n //View Source file for more details /n }

31. Example

Project: nUpdate
Source File: ExplorerTreeView.cs
View license
protected override void WndProc(ref Message message)
        {
            switch (message.Msg)
    /n ..... /n //View Source file for more details /n }

32. Example

Project: Krypton
Source File: KryptonTextBox.cs
View license
protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
        /n ..... /n //View Source file for more details /n }

33. Example

Project: Krypton
Source File: KryptonMaskedTextBox.cs
View license
protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
        /n ..... /n //View Source file for more details /n }

34. Example

Project: Krypton
Source File: KryptonComboBox.cs
View license
protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
        /n ..... /n //View Source file for more details /n }

35. Example

Project: Krypton
Source File: KryptonDomainUpDown.cs
View license
protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
        /n ..... /n //View Source file for more details /n }

36. Example

Project: tesvsnip
Source File: ObjectListView.cs
View license
protected override void WndProc(ref Message m)
        {
            //System.Diagnostics.Debug.Writ/n ..... /n //View Source file for more details /n }

37. Example

Project: falloutsnip
Source File: ObjectListView.cs
View license
protected override void WndProc(ref Message m)
        {
            //System.Diagnostics.Debug.Writ/n ..... /n //View Source file for more details /n }

38. Example

Project: tesvsnip
Source File: virtuallistview.cs
View license
protected override void WndProc(ref Message m)
        {
            const int WM_PAINT = 0x000F;
  /n ..... /n //View Source file for more details /n }

39. Example

Project: falloutsnip
Source File: virtuallistview.cs
View license
protected override void WndProc(ref Message m)
        {
            const int WM_PAINT = 0x000F;
  /n ..... /n //View Source file for more details /n }