101 {
102 if (m.Msg == 0x204)
103 {
104 int x = (int) m.LParam & 0xFFFF, y = (int) m.LParam >> 16;
105
106 TreeNode n = GetNodeAt(x, y);
107 if (n != null)
108 {
109 Rectangle r = n.Bounds;
110 r.X -= 25;
111 r.Width += 25;
112 if (r.Contains(x, y))
113 {
115 }
116 }
117
118 m.Result = IntPtr.Zero;
119 return;
120 }
121
122 if (m.Msg == 0x205)
123 {
124 int x = (int) m.LParam & 0xFFFF, y = (int) m.LParam >> 16;
125
126 if (_allowContextMenus && _selected != null)
127 {
128 ContextMenuStrip menuStrip = SelectedNodes.Count > 1
130 : _selected.ContextMenuStrip;
131 if (menuStrip != null)
132 {
133 Rectangle r = _selected.Bounds;
134 r.X -= 25;
135 r.Width += 25;
136 if (r.Contains(x, y))
137 {
138 menuStrip.Show(this, x, y);
139 }
140 }
141 }
142 }
143
144 base.WndProc(ref m);
145 }
ContextMenuStrip GetMultiSelectMenuStrip()
Definition: ResourceTree.cs:147