Implemented interface member:
property
Handle
System.Windows.Forms.IWin32Window.Handle
647 references to Handle
System.Web.Mobile (10)
UI\MobileControls\Design\Util\MSHTMLHost.cs (10)
58
Debug.Assert(
Handle
!= IntPtr.Zero,
96
Debug.Assert((parent != null) && (parent.
Handle
!= IntPtr.Zero),
118
NativeMethods.GetClientRect(parentControl.
Handle
, r);
160
NativeMethods.GetClientRect(parentControl.
Handle
, r);
176
return parentControl.
Handle
;
198
NativeMethods.GetClientRect(parentControl.
Handle
, lprcPosRect);
199
NativeMethods.GetClientRect(parentControl.
Handle
, lprcClipRect);
203
lpFrameInfo.hwndFrame = parentControl.
Handle
;
390
NativeMethods.GetClientRect(parentControl.
Handle
, r);
391
tridentOleObject.DoVerb(NativeMethods.OLEIVERB_UIACTIVATE, IntPtr.Zero, (NativeMethods.IOleClientSite)this, 0, parentControl.
Handle
, r);
System.Windows.Forms (625)
winforms\Managed\System\WinForms\Application.cs (11)
1326
cp.Parent = cxt.GetParkingWindow(dpiAwarenessContext).
Handle
;
2865
int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(parkingWindows[0], parkingWindows[0].
Handle
), out pid);
3428
hwndOwner = new HandleRef(null, UnsafeNativeMethods.GetWindowLong(new HandleRef(currentForm, currentForm.
Handle
), NativeMethods.GWL_HWNDPARENT));
3445
SafeNativeMethods.IsWindowEnabled(new HandleRef(currentForm, currentForm.
Handle
)) != modalEnabled) {
3446
SafeNativeMethods.EnableWindow(new HandleRef(currentForm, currentForm.
Handle
), modalEnabled);
4167
IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this,
Handle
), NativeMethods.GW_CHILD);
4187
UnsafeNativeMethods.SetParent(handle, new HandleRef(this,
Handle
));
4196
Debug.Assert(UnsafeNativeMethods.GetParent(handle) !=
Handle
, "Always set the handle's parent to someone else before calling UnparkHandle");
4211
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero);
4291
focusedHwnd = activatingControl.
Handle
;
4345
IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, MainForm.
Handle
), NativeMethods.GWL_HWNDPARENT);
winforms\Managed\System\WinForms\AxHost.cs (11)
1204
if (IsHandleCreated) return
Handle
;
1614
IntPtr handle =
Handle
;
2114
msg.hwnd = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.
Handle
;
2470
GetOleObject().DoVerb(verb, IntPtr.Zero, oleSite, -1, parent != null ? parent.
Handle
: IntPtr.Zero, FillInRect(new NativeMethods.COMRECT(), Bounds));
3308
opcparams.hwndOwner = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.
Handle
;
3380
IntPtr handle = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.
Handle
;
3591
wndprocAddr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_WNDPROC);
4230
return parent != null ? parent.
Handle
: IntPtr.Zero;
4277
lpFrameInfo.hwndFrame = host.ParentInternal.
Handle
;
5963
return parent.
Handle
;
6333
return GetP().
Handle
;
winforms\Managed\System\WinForms\Button.cs (1)
306
if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
&& !ValidationCancelled) {
winforms\Managed\System\WinForms\CheckBox.cs (1)
648
if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
winforms\Managed\System\WinForms\CheckedListBox.cs (3)
551
SafeNativeMethods.InvalidateRect(new HandleRef(this,
Handle
), ref rect, false);
880
SafeNativeMethods.InvalidateRect(new HandleRef(this,
Handle
), null, true);
1672
UnsafeNativeMethods.ClientToScreen(new HandleRef(ParentCheckedListBox, ParentCheckedListBox.
Handle
), pt);
winforms\Managed\System\WinForms\ColumnHeader.cs (3)
397
IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.
Handle
), NativeMethods.LVM_GETHEADER, 0, 0);
401
width = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.
Handle
), NativeMethods.LVM_GETCOLUMNWIDTH, Index, 0);
475
UnsafeNativeMethods.SendMessage(new HandleRef(this.listview, this.listview.
Handle
), NativeMethods.LVM_SETCOLUMNORDERARRAY, cols.Length, cols);
winforms\Managed\System\WinForms\ComboBox.cs (27)
1152
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.CB_GETEDITSEL, start, end);
1173
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.CB_GETEDITSEL, value, (int[])null);
1608
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref comboRectMid);
1838
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref r);
1930
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.WM_CONTEXTMENU, m.WParam, m.LParam);
1983
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref rect);
2293
SafeNativeMethods.RedrawWindow(new HandleRef(this,
Handle
),
2359
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.CB_GETLBTEXT, index, sb);
2440
IntPtr hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this,
Handle
), NativeMethods.GW_CHILD);
3454
SafeNativeMethods.GetClientRect(new HandleRef(this,
Handle
), ref rect);
3689
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), NativeMethods.WM_MOUSELEAVE, 0, 0);
3724
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref r);
3763
NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)SafeNativeMethods.GetUpdateRgn(new HandleRef(this, this.
Handle
), new HandleRef(this, wr.HRegion), true);
3775
dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this,
Handle
), ref ps);
3799
UnsafeNativeMethods.EndPaint(new HandleRef(this,
Handle
), ref ps);
4442
Debug.Assert(owner != null && owner.
Handle
!= IntPtr.Zero, "ComboBox's handle hasn't been created");
4547
runtimeId[1] = (int)(long)ownerItem.
Handle
;
4778
runtimeId[1] = (int)(long)_owningComboBox.
Handle
;
4885
return (_dropDownButtonUiaProvider ?? new ComboBoxChildDropDownButtonUiaProvider(_owningComboBox, _owningComboBox.
Handle
));
4984
return _owningComboBox.
Handle
;
5370
runtimeId[1] = (int)(long)_owningComboBox.
Handle
;
5522
runtimeId[1] = (int)(long)_owner.
Handle
;
5729
runtimeId[1] = (int)(long)_owner.
Handle
;
6110
SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.
Handle
), ref validRect);
6115
SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.
Handle
), ref validRect);
6120
SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.
Handle
), ref validRect);
6125
SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.
Handle
), ref validRect);
winforms\Managed\System\WinForms\ContainerControl.cs (4)
679
UnsafeNativeMethods.SetFocus(new HandleRef(activeControl, activeControl.
Handle
));
698
UnsafeNativeMethods.SetFocus(new HandleRef(cc, cc.
Handle
));
716
UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.
Handle
), ref clientRectangle);
718
UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.
Handle
), topLeftPoint);
winforms\Managed\System\WinForms\ContextMenu.cs (1)
235
new HandleRef(control, control.
Handle
),
winforms\Managed\System\WinForms\Control.cs (127)
1405
bool visible = SafeNativeMethods.IsWindowVisible(new HandleRef(window,
Handle
));
1406
bool enabled = SafeNativeMethods.IsWindowEnabled(new HandleRef(window,
Handle
));
1475
return IsHandleCreated && UnsafeNativeMethods.GetCapture() ==
Handle
;
1480
UnsafeNativeMethods.SetCapture(new HandleRef(this,
Handle
));
1674
if (focusHwnd == this.
Handle
) {
1678
if (UnsafeNativeMethods.IsChild(new HandleRef(this, this.
Handle
), new HandleRef(this, focusHwnd))) {
2020
return SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this,
Handle
), out pid);
2089
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref r);
2091
if ((r.left <= p.x && p.x < r.right && r.top <= p.y && p.y < r.bottom) || UnsafeNativeMethods.GetCapture() ==
Handle
)
2092
SendMessage(NativeMethods.WM_SETCURSOR,
Handle
, (IntPtr)NativeMethods.HTCLIENT);
2479
return IsHandleCreated && UnsafeNativeMethods.GetFocus() ==
Handle
;
2929
IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this,
Handle
));
3000
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref temp);
3008
start = parent.
Handle
;
3011
start =
Handle
;
3055
return
Handle
;
3087
hwnd = new HandleRef(this,
Handle
);
3096
hwnd = new HandleRef(marshalingControl, marshalingControl.
Handle
);
3592
if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this,
Handle
), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this,
Handle
))) != 0) {
4219
UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.
Handle
),
4262
UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.
Handle
),
4472
return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_EXSTYLE));
4475
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)value));
4485
return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE));
4488
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)value));
4538
int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(window,
Handle
));
4546
UnsafeNativeMethods.GetWindowText(new HandleRef(window,
Handle
), sb, sb.Capacity);
4554
UnsafeNativeMethods.SetWindowText(new HandleRef(window,
Handle
), value);
5293
UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this,
Handle
), objectID, childID + 1);
5615
else if (IsHandleCreated && GetTopLevel() && SafeNativeMethods.IsWindowEnabled(new HandleRef(window,
Handle
))) {
5616
SafeNativeMethods.SetWindowPos(new HandleRef(window,
Handle
), NativeMethods.HWND_TOP, 0, 0, 0, 0,
5763
return Graphics.FromHwndInternal(this.
Handle
);
5896
ctl.SetParentHandle(
Handle
);
5948
if (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this,
Handle
), threadCallbackMessage,
6174
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.WM_PRINT, (IntPtr)hDc,
6214
if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(marshaler, marshaler.
Handle
), out pid) == SafeNativeMethods.GetCurrentThreadId()) {
6370
UnsafeNativeMethods.SetFocus(new HandleRef(this,
Handle
));
6485
IntPtr hwnd = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null,
Handle
), pt.X, pt.Y, value);
6820
ArrayList windows = GetChildWindows(this.
Handle
);
7046
hWnd = control.
Handle
;
7107
trackMouseEvent.hwndTrack =
Handle
;
7218
SafeNativeMethods.RedrawWindow(new HandleRef(this,
Handle
),
7228
SafeNativeMethods.InvalidateRgn(new HandleRef(this,
Handle
),
7269
SafeNativeMethods.RedrawWindow(new HandleRef(window,
Handle
),
7279
SafeNativeMethods.InvalidateRect(new HandleRef(window,
Handle
),
7314
SafeNativeMethods.RedrawWindow(new HandleRef(window,
Handle
),
7328
SafeNativeMethods.InvalidateRect(new HandleRef(window,
Handle
),
7805
if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this,
Handle
), out pid) == SafeNativeMethods.GetCurrentThreadId()) {
7838
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero);
8170
SafeNativeMethods.EnableWindow(new HandleRef(this,
Handle
), Enabled);
8405
UnsafeNativeMethods.SetParent(new HandleRef(this, this.
Handle
), new HandleRef(parent, parent.
Handle
));
8435
Application.ParkHandle(new HandleRef(this, this.
Handle
), this.DpiAwarenessContext);
8524
m = Message.Create(this.
Handle
, NativeMethods.WM_PRINTCLIENT, hdc, flags);
8752
if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this,
Handle
), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this,
Handle
))) != 0) {
8770
IntPtr handle =
Handle
;
8792
UnsafeNativeMethods.SetWindowText(new HandleRef(this,
Handle
), text);
8817
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero);
8833
if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this,
Handle
), NativeMethods.SB_HORZ,si) != false) {
10090
UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this,
Handle
), point, 1);
10107
UnsafeNativeMethods.MapWindowPoints(new HandleRef(this,
Handle
), NativeMethods.NullHandleRef, point, 1);
10379
bool success = UnsafeNativeMethods.GetWindowRect(new HandleRef(null, this.
Handle
), ref windowRect);
10825
new HandleRef(topMostParent, topMostParent.
Handle
),
10826
UnsafeNativeMethods.GetParent(new HandleRef(null, topMostParent.
Handle
)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE,
10857
IntPtr hwnd = this.
Handle
;
10970
HandleRef parentHandle = new HandleRef(this, UnsafeNativeMethods.GetParent(new HandleRef(this, this.
Handle
)));
11036
UnsafeNativeMethods.SetParent(new HandleRef(this, this.
Handle
), parentHandle);
11062
UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this,
Handle
), ref rect, 2);
11079
UnsafeNativeMethods.MapWindowPoints(new HandleRef(this,
Handle
), NativeMethods.NullHandleRef, ref rect, 2);
11244
Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Registering as drop target: " +
Handle
.ToString());
11246
int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(this,
Handle
), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this)));
11253
Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Revoking drop target: " +
Handle
.ToString());
11255
int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(this,
Handle
));
11732
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, wparam, lparam);
11741
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, ref wparam, ref lparam);
11745
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, (IntPtr)wparam, lparam);
11750
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, wparam, lparam);
11755
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, wparam, (IntPtr)lparam);
11764
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, wparam, ref lparam);
11773
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, wparam, lparam);
11782
return UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), msg, wparam, lparam);
11793
SafeNativeMethods.SetWindowPos(new HandleRef(window,
Handle
), NativeMethods.HWND_BOTTOM, 0, 0, 0, 0,
11898
SafeNativeMethods.SetWindowPos(new HandleRef(window,
Handle
), NativeMethods.NullHandleRef, x, y, width, height, flags);
11971
IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(window,
Handle
));
11974
Debug.Assert(
Handle
!= value, "Cycle created in SetParentHandle");
11998
Application.ParkHandle(new HandleRef(window,
Handle
), this.DpiAwarenessContext);
12002
UnsafeNativeMethods.SetParent(new HandleRef(window,
Handle
), new HandleRef(null, value));
12006
Application.UnparkHandle(new HandleRef(window,
Handle
), window.DpiAwarenessContext);
12014
UnsafeNativeMethods.SetParent(new HandleRef(window,
Handle
), new HandleRef(null, IntPtr.Zero));
12015
Application.UnparkHandle(new HandleRef(window,
Handle
), window.DpiAwarenessContext);
12131
SafeNativeMethods.ShowWindow(new HandleRef(this,
Handle
), value ? ShowParams : NativeMethods.SW_HIDE);
12144
SafeNativeMethods.SetWindowPos(new HandleRef(window,
Handle
),
12183
if (!SafeNativeMethods.IsWindowVisible(new HandleRef(this,this.
Handle
))) {
12198
new HandleRef(window,
Handle
), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE |
12418
int styleFlags = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE)));
12419
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag)));
12672
IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this,
Handle
));
12701
prevHandle = c.
Handle
;
12705
if (UnsafeNativeMethods.GetWindow(new HandleRef(ctl.window, ctl.
Handle
), NativeMethods.GW_HWNDPREV) != prevHandle) {
12708
SafeNativeMethods.SetWindowPos(new HandleRef(ctl.window, ctl.
Handle
), new HandleRef(null, prevHandle), 0, 0, 0, 0,
12756
new HandleRef(this,
Handle
), NativeMethods.NullHandleRef, 0, 0, 0, 0,
12795
IntPtr parentHandle =
Handle
;
12965
UnsafeNativeMethods.GetClientRect(new HandleRef(this,
Handle
), ref rc);
13045
new HandleRef(this,
Handle
),
13302
ReleaseUiaProvider(
Handle
);
13503
SendMessage(NativeMethods.WM_CONTEXTMENU, this.
Handle
, NativeMethods.Util.MAKELPARAM(pt.X, pt.Y));
13510
if (GetState(STATE_MOUSEPRESSED) && !IsDisposed && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
13668
hWnd = this.
Handle
;
13794
Debug.WriteLineIf(Control.PaletteTracing.TraceVerbose,
Handle
+ ": WM_QUERYNEWPALETTE");
13795
IntPtr dc = UnsafeNativeMethods.GetDC(new HandleRef(this,
Handle
));
13801
UnsafeNativeMethods.ReleaseDC(new HandleRef(this,
Handle
), new HandleRef(null, dc));
13873
hWnd = UnsafeNativeMethods.GetDlgItem(new HandleRef(this,
Handle
), NativeMethods.Util.HIWORD(m.WParam));
16194
UnsafeNativeMethods.GetWindowRect(new HandleRef(this, this.
Handle
), ref rectangle);
16568
if (msg.hwnd != control.
Handle
&& msg.message >= NativeMethods.WM_MOUSEFIRST && msg.message <= NativeMethods.WM_MOUSELAST) {
16576
UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hwndMap), new HandleRef(control, control.
Handle
), pt, 1);
16584
UnsafeNativeMethods.MapWindowPoints(new HandleRef(target, target.
Handle
), new HandleRef(realTarget, realTarget.
Handle
), pt, 1);
17011
hwnd = control.
Handle
;
17105
UnsafeNativeMethods.SetParent(new HandleRef(control, control.
Handle
), new HandleRef(null, hwndParent));
18407
IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(control, control.
Handle
));
18412
UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hWndParent), new HandleRef(control, control.
Handle
), ref rcIntersect, 2);
18438
UnsafeNativeMethods.SetWindowRgn(new HandleRef(control, control.
Handle
), new HandleRef(this, finalClipRegion), SafeNativeMethods.IsWindowVisible(new HandleRef(control, control.
Handle
)));
19432
IntPtr handle = ownerControl.
Handle
;
19460
IntPtr handle = ownerControl.
Handle
;
winforms\Managed\System\WinForms\Control.Ime.cs (4)
170
return ImeContext.GetImeMode( this.
Handle
);
504
ImeContext.SetImeStatus( newImeContextMode, this.
Handle
);
789
OnImeContextStatusChanged( this.
Handle
);
857
ImeContext.SetImeStatus(PropagatingImeMode, topMostWinformsParent.
Handle
);
winforms\Managed\System\WinForms\DataGrid.cs (4)
2299
SafeNativeMethods.ScrollWindow(new HandleRef(this,
Handle
),
5856
IntPtr parentHandle =
Handle
;
8629
SafeNativeMethods.ScrollWindow(new HandleRef(this,
Handle
), 0, deltaY, ref scrollArea, ref scrollArea);
8883
SafeNativeMethods.ScrollWindow(new HandleRef(this,
Handle
), 0, -parentRowsRect.Height, ref scrollRECT, ref scrollRECT);
winforms\Managed\System\WinForms\DataGridToolTip.cs (3)
43
cparams.Parent = dataGrid.
Handle
;
68
toolInfo.hwnd = dataGrid.
Handle
;
80
toolInfo.hwnd = dataGrid.
Handle
;
winforms\Managed\System\WinForms\DataGridViewBand.cs (1)
814
IntPtr handle = this.DataGridView.
Handle
;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (5)
840
UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.
Handle
), NativeMethods.CB_SETDROPPEDWIDTH, cachedDropDownWidth, 0);
847
int dropDownWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.
Handle
), NativeMethods.CB_GETDROPPEDWIDTH, 0, 0));
850
UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.
Handle
), NativeMethods.CB_SETDROPPEDWIDTH, this.DropDownWidth, 0);
1526
h = comboBox.ParentInternal.
Handle
;
1528
h = comboBox.
Handle
; // make sure that assigning the DataSource property does not assert.
winforms\Managed\System\WinForms\DataGridViewMethods.cs (4)
5766
IntPtr parentHandle = this.
Handle
;
5787
IntPtr parentHandle = this.
Handle
;
26360
SafeNativeMethods.ScrollWindow(new HandleRef(this, this.
Handle
),
26471
SafeNativeMethods.ScrollWindow(new HandleRef(this, this.
Handle
), 0, deltaY, ref scrollArea, ref scrollArea);
winforms\Managed\System\WinForms\DateTimePicker.cs (10)
418
int gdt = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_GETSYSTEMTIME, 0, sys);
431
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
436
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1036
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1149
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1154
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1380
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1457
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.DTM_SETRANGE, flags, sa);
1574
UnsafeNativeMethods.EnumChildWindows(new HandleRef(this,
Handle
), cb, NativeMethods.NullHandleRef);
1662
if (m.HWnd ==
Handle
) {
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (2)
778
itemHeight = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_GETITEMHEIGHT, 0, 0);
780
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_SETITEMHEIGHT, itemHeight, 0);
winforms\Managed\System\WinForms\ErrorProvider.cs (1)
954
cparams.Parent = parent.
Handle
;
winforms\Managed\System\WinForms\Form.cs (59)
1778
SafeNativeMethods.SetWindowPos(new HandleRef(this,
Handle
), NativeMethods.NullHandleRef,
2104
int exStyle = unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_EXSTYLE));
2107
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)cp.ExStyle));
2577
SafeNativeMethods.SetWindowPos(new HandleRef(this,
Handle
), key, 0, 0, 0, 0,
2684
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.WM_SHOWWINDOW, value ? 1 : 0, 0);
2713
SafeNativeMethods.ShowWindow(new HandleRef(this,
Handle
), NativeMethods.SW_SHOW);
2786
IntPtr hWnd =
Handle
;
3088
MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE,
Handle
, 0);
3091
UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this,
Handle
));
3342
IntPtr hmenu = UnsafeNativeMethods.GetSystemMenu(new HandleRef(this,
Handle
), false);
3431
IntPtr h =
Handle
;
3696
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT, TaskbarOwner);
3778
m.Result = UnsafeNativeMethods.DefFrameProc(m.HWnd, ctlClient.
Handle
, m.Msg, m.WParam, m.LParam);
4030
IntPtr ownerHandle = (dialogOwner != null) ? Control.GetSafeHandle(dialogOwner) : OwnerInternal.
Handle
;
4082
MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE,
Handle
, 0);
4452
ownerHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT);
4497
hWndOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT);
5000
UnsafeNativeMethods.ClientToScreen(new HandleRef(this,
Handle
), ptToSnap);
5293
if (ctlClient != null && ctlClient.
Handle
!= IntPtr.Zero &&
5294
UnsafeNativeMethods.TranslateMDISysAccel(ctlClient.
Handle
, ref win32Message)) {
5514
UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this,
Handle
), ref wp);
5533
new HandleRef(this, this.
Handle
));
5544
etwcb.SetOwners(new HandleRef(this, this.
Handle
));
5552
UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this,
Handle
), ref wp);
5708
if (IsHandleCreated && UnsafeNativeMethods.GetForegroundWindow() == this.
Handle
) {
5713
else if (!IsHandleCreated || UnsafeNativeMethods.GetForegroundWindow() != this.
Handle
)
5767
UnsafeNativeMethods.SetActiveWindow(new HandleRef(this,
Handle
));
5770
UnsafeNativeMethods.SetActiveWindow(new HandleRef(MdiParentInternal, MdiParentInternal.
Handle
));
5771
MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE,
Handle
, 0);
6105
if (hWndOwner != IntPtr.Zero && hWndOwner !=
Handle
) {
6107
if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) ==
Handle
) {
6113
hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT);
6114
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner));
6206
if (hWndOwner != IntPtr.Zero && hWndOwner !=
Handle
) {
6208
if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) ==
Handle
) {
6214
hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT);
6215
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner));
6434
ownerHwnd = new HandleRef(owner, owner.
Handle
);
6442
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT, ownerHwnd);
6458
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this,
Handle
), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
6462
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this,
Handle
), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY);
6465
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this,
Handle
), ColorTranslator.ToWin32(transparencyKey),
6520
UnsafeNativeMethods.SetMenu(new HandleRef(this,
Handle
), new HandleRef(menu, menu.Handle));
6523
UnsafeNativeMethods.SetMenu(new HandleRef(this,
Handle
), NativeMethods.NullHandleRef);
6547
UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.
Handle
), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero);
6553
UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.
Handle
), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero);
6559
IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.
Handle
));
6565
UnsafeNativeMethods.SetMenu(new HandleRef(this, this.
Handle
), NativeMethods.NullHandleRef);
6582
SafeNativeMethods.DrawMenuBar(new HandleRef(this,
Handle
));
6700
IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.
Handle
));
6830
SafeNativeMethods.RedrawWindow(new HandleRef(this,
Handle
), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
6848
UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this,
Handle
), ref wp);
7260
UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.
Handle
), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam);
7290
if (
Handle
== m.WParam) {
7293
else if (
Handle
== m.LParam) {
7363
UnsafeNativeMethods.ScreenToClient(new HandleRef(this, this.
Handle
), pt );
7816
cp.Parent = owner.
Handle
;
7852
toolInfo.hwnd = owner.
Handle
;
7864
toolInfo.uId = owner.
Handle
;
winforms\Managed\System\WinForms\GroupBox.cs (1)
771
SafeNativeMethods.GetClientRect(new HandleRef(this,
Handle
), ref rect);
winforms\Managed\System\WinForms\Help.cs (2)
224
handle = new HandleRef(parent, parent.
Handle
);
315
handle = new HandleRef(parent, parent.
Handle
);
winforms\Managed\System\WinForms\Label.cs (1)
1345
using( WindowsGraphics wg = WindowsGraphics.FromHwnd(this.
Handle
) ){
winforms\Managed\System\WinForms\LinkLabel.cs (4)
406
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref r);
409
if ((r.left <= p.x && p.x < r.right && r.top <= p.y && p.y < r.bottom) || UnsafeNativeMethods.GetCapture() ==
Handle
)
410
SendMessage(NativeMethods.WM_SETCURSOR,
Handle
, NativeMethods.HTCLIENT);
2717
g = Graphics.FromHwnd(link.Owner.
Handle
);
winforms\Managed\System\WinForms\ListBox.cs (7)
1565
UnsafeNativeMethods.GetClientRect(new HandleRef(this,
Handle
), ref r);
1616
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LB_GETTEXT, index, sb);
1708
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LB_GETSELITEMS, count, result);
1782
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LB_SETTABSTOPS, wpar, offsets);
2269
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LB_SETTABSTOPS, wpar, offsets);
2417
if (captured && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
2464
if (rCaptured && UnsafeNativeMethods.WindowFromPoint(rpt.X, rpt.Y) ==
Handle
) {
winforms\Managed\System\WinForms\ListView.cs (48)
446
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage);
688
int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE)));
1642
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_GETTILEVIEWINFO, 0, tileViewInfo);
1663
bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SETTILEVIEWINFO, 0, tileViewInfo);
2242
UnsafeNativeMethods.PostMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_ARRANGE, (int) value, 0);
3063
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_ENSUREVISIBLE, index, 0);
3184
int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
),
3286
displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_FINDITEM, lastIndex - 1, ref info);
3290
displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_FINDITEM, -1 /* beginning */, ref info);
3339
int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_HITTEST, 0, lvhi);
3366
int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi);
3379
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_GETITEMPOSITION, index, pt);
3553
iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi));
3555
iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_HITTEST, 0, lvhi));
3586
IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_GETHEADER, 0, 0);
3692
return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_INSERTCOLUMN, index, lvColumn);
3743
int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,this.
Handle
),NativeMethods.LVM_INSERTGROUP,index,lvgroup);
3940
insertIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_INSERTITEM, 0, ref lvItem);
4281
int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE)));
4283
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style));
4288
int callbackMask = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_GETCALLBACKMASK, 0, 0));
4290
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SETCALLBACKMASK, callbackMask, 0);
4567
IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new HandleRef(this, this.
Handle
), NativeMethods.GW_CHILD);
4587
UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.
Handle
), prc);
4697
int retval = (int) UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
),
4761
int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero);
4771
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SCROLL, 0, scrollY);
4826
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage);
4895
int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SETCOLUMN, ch.Index, lvColumn);
4981
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SETCOLUMNORDERARRAY, orderedColumns.Length, orderedColumns);
5045
IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0);
5058
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SETITEM, 0, ref lvItem);
5071
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SETITEM, 0, ref lvItem);
5086
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SETITEMPOSITION32, index, pt);
5100
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SETITEMSTATE, index, ref lvItem);
5120
int colWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.LVM_GETCOLUMNWIDTH, 0, 0));
5142
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SETITEMTEXT, itemIndex, ref lvItem);
5180
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback);
5313
int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
),
5352
bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
),NativeMethods.LVM_SETTILEVIEWINFO,0,tileViewInfo);
5369
int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_HITTEST, 0, lvhi);
5399
int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_HITTEST, 0, lvhi);
5774
IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_GETHEADER, 0, 0);
5791
return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.LVM_HITTEST, 0, lvhi);
8984
UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.
Handle
), NativeMethods.LVM_GETITEM, 0, ref lvItem);
9003
int nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.
Handle
), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED);
9013
nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.
Handle
), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED);
9025
UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.
Handle
), NativeMethods.LVM_DELETEALLITEMS, 0, 0);
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (2)
127
UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.
Handle
), NativeMethods.LVM_INSERTMARKHITTEST, point, lvInsertMark);
137
UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.
Handle
), NativeMethods.LVM_SETINSERTMARK, 0, lvInsertMark);
winforms\Managed\System\WinForms\ListViewItem.cs (3)
962
UnsafeNativeMethods.SendMessage(new HandleRef(lv, lv.
Handle
), NativeMethods.LVM_EDITLABEL, Index, 0);
1165
UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.
Handle
), NativeMethods.LVM_SETITEM, 0, ref lvItem);
1193
UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.
Handle
), NativeMethods.LVM_GETITEM, 0, ref lvItem);
winforms\Managed\System\WinForms\MaskedTextBox.cs (2)
1201
HandleRef handle = new HandleRef(this, this.
Handle
);
2007
SafeNativeMethods.RedrawWindow(new HandleRef(this, this.
Handle
), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MDIClient.cs (6)
166
if (
Handle
== IntPtr.Zero)
192
if (site != null && site.DesignMode &&
Handle
!= IntPtr.Zero) {
260
UnsafeNativeMethods.GetWindowPlacement(new HandleRef(child, child.
Handle
), ref wp);
271
UnsafeNativeMethods.SetWindowPlacement(new HandleRef(child, child.
Handle
), ref wp);
309
if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this,
Handle
), new HandleRef(null, rgn1), true) == 0) {
356
if (ParentInternal != null && ParentInternal.Site != null && ParentInternal.Site.DesignMode &&
Handle
!= IntPtr.Zero) {
winforms\Managed\System\WinForms\MenuItem.cs (1)
1478
SafeNativeMethods.DrawMenuBar(new HandleRef(f, f.
Handle
));
winforms\Managed\System\WinForms\MonthCalendar.cs (8)
1059
int res = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_GETTODAY, 0, st);
1525
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_GETMONTHRANGE, flag, sa);
1575
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_HITTEST, 0, mchi);
1637
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_SETTODAY, 0, st);
2027
if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_SETRANGE, flag, sa) == 0)
2163
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_SETSELRANGE , 0, sa);
2263
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.MCM_SETTODAY, 0, st);
2386
if (m.HWnd ==
Handle
) {
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (5)
750
SafeNativeMethods.ScrollWindow(new HandleRef(this,
Handle
),
756
UnsafeNativeMethods.SetScrollPos(new HandleRef(this,
Handle
), NativeMethods.SB_HORZ, position.X, true);
757
UnsafeNativeMethods.SetScrollPos(new HandleRef(this,
Handle
), NativeMethods.SB_VERT, position.Y, true);
769
UnsafeNativeMethods.SetScrollInfo(new HandleRef(this,
Handle
), NativeMethods.SB_VERT, info, true);
775
UnsafeNativeMethods.SetScrollInfo(new HandleRef(this,
Handle
), NativeMethods.SB_HORZ, info, true);
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
462
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor));
788
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
789
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor));
893
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor));
894
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\PropertyGrid.cs (3)
3840
IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(this,
Handle
));
4665
UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.
Handle
), new HandleRef(this,
Handle
), temp, 1);
winforms\Managed\System\WinForms\PropertyGridInternal\DropDownButton.cs (1)
241
UseStdAccessibleObjects(owningDropDownButton.
Handle
);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (1)
2843
runtimeId[1] = (int)(long)owner.GridEntryHost.
Handle
;
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (8)
89
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]));
133
toolInfos[index].hwnd = c.
Handle
;
134
toolInfos[index].uId = c.
Handle
;
160
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO((Control)sender));
204
SafeNativeMethods.SetWindowPos(new HandleRef(this,
Handle
), NativeMethods.HWND_TOPMOST,
209
if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(c))) {
216
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
230
if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]))) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (27)
420
int exStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(edit, edit.
Handle
), NativeMethods.GWL_EXSTYLE)));
791
UnsafeNativeMethods.ClientToScreen(new HandleRef(this,
Handle
), pt);
998
gotfocus = IntPtr.Zero != UnsafeNativeMethods.SetFocus(new HandleRef(this,
Handle
));
1543
return
Handle
;
1663
SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.
Handle
), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags);
1691
UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.
Handle
), NativeMethods.GWL_HWNDPARENT, new HandleRef(this,
Handle
));
1706
SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.
Handle
), NativeMethods.SW_SHOWNA);
1735
UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.
Handle
), NativeMethods.GWL_HWNDPARENT, new HandleRef(this,
Handle
));
1737
SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.
Handle
), NativeMethods.SW_SHOWNA);
2766
if (hwnd == dropDownHolder.
Handle
) {
3280
if (UnsafeNativeMethods.IsChild(new HandleRef(null, foregroundWindow), new HandleRef(null, this.
Handle
))) {
3870
IntPtr hdc = UnsafeNativeMethods.GetDC(new HandleRef(DropDownListBox, DropDownListBox.
Handle
));
3899
UnsafeNativeMethods.ReleaseDC(new HandleRef(DropDownListBox, DropDownListBox.
Handle
), new HandleRef(DropDownListBox, hdc));
5270
if (nmhdr->hwndFrom == ToolTip.
Handle
) {
5346
UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.
Handle
), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0);
5351
UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.
Handle
), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam);
5503
cp.Parent = gridView.ParentInternal.
Handle
;
5687
if (hWnd == this.
Handle
) {
6214
UseStdAccessibleObjects(_owningGridViewListBox.
Handle
);
6385
runtimeId[1] = (int)(long)_owningGridViewListBox.
Handle
;
6650
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero);
6850
if (nmhdr->hwndFrom == psheet.ToolTip.
Handle
) {
7149
SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(control, control.
Handle
), out thisProcessID);
7229
IntPtr handle = control.
Handle
;
7740
UnsafeNativeMethods.ScreenToClient(new HandleRef(Owner, Owner.
Handle
), pt);
winforms\Managed\System\WinForms\RadioButton.cs (1)
574
if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
winforms\Managed\System\WinForms\RichTextBox.cs (46)
526
if (SafeNativeMethods.GetWindowTextLength(new HandleRef(this,
Handle
)) > 0) {
597
opt = (RichTextBoxLanguageOptions)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETLANGOPTIONS, 0, 0);
610
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETLANGOPTIONS, 0, (int) value);
832
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
879
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
903
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
933
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
981
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf);
1016
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf);
1067
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf2);
1114
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1130
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1155
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1171
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1284
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1302
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1324
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1346
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1354
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1518
return unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETTEXTLENGTHEX, gtl, 0 /*ignored*/));
2027
position = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_FINDTEXT, findOptions, ft);
2065
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_EXSETSEL, 0, chrg);
2113
int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(this,
Handle
));
2170
len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg);
2247
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf);
2253
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf2);
2324
int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.EM_CHARFROMPOS, 0, wpt);
2378
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.EM_POSFROMCHAR, pt, index);
2604
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETOPTIONS, (IntPtr)RichTextBoxConstants.ECOOP_OR,
2720
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_PASTESPECIAL, clipFormat.Id, rps);
2873
return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf);
2879
return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, charRange, cf);
2912
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfA);
2926
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfW);
3017
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_EXSETSEL, 0, cr);
3068
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_STREAMIN, flags, es64);
3074
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_STREAMIN, flags, es);
3165
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_STREAMOUT, flags, es64);
3171
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_STREAMOUT, flags, es);
3282
UnsafeNativeMethods.SendCallbackMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback);
3291
UnsafeNativeMethods.DragAcceptFiles(new HandleRef(this,
Handle
), false);
3383
int len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg);
3408
if (m.LParam ==
Handle
&& !GetState(STATE_CREATINGHANDLE))
3435
if (m.HWnd ==
Handle
) {
3622
int textLength = SafeNativeMethods.GetWindowTextLength(new HandleRef(this,
Handle
));
3627
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), NativeMethods.EM_SETSEL, selEnd - 1, selEnd);
winforms\Managed\System\WinForms\Screen.cs (1)
345
return FromHandleInternal(control.
Handle
);
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
878
SafeNativeMethods.ScrollWindowEx(new HandleRef(this,
Handle
), xDelta, yDelta,
991
SafeNativeMethods.GetScrollInfo(new HandleRef(this,
Handle
), fnBar, si);
winforms\Managed\System\WinForms\ScrollBar.cs (3)
810
UnsafeNativeMethods.SetScrollInfo(new HandleRef(this,
Handle
), NativeMethods.SB_CTL, si, true);
895
SafeNativeMethods.GetScrollInfo(new HandleRef(this,
Handle
), NativeMethods.SB_CTL, si);
928
if (UnsafeNativeMethods.GetFocus() == this.
Handle
) {
winforms\Managed\System\WinForms\ScrollProperties.cs (3)
321
UnsafeNativeMethods.SetScrollInfo(new HandleRef(parent, parent.
Handle
), Orientation, si, true);
333
UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.
Handle
), Orientation, NativeMethods.ESB_ENABLE_BOTH);
336
UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.
Handle
), Orientation, NativeMethods.ESB_DISABLE_BOTH);
winforms\Managed\System\WinForms\SendKeys.cs (1)
891
ParseKeys(keys, (control != null) ? control.
Handle
: IntPtr.Zero);
winforms\Managed\System\WinForms\SplitContainer.cs (4)
589
UnsafeNativeMethods.GetWindowRect(new HandleRef(this,
Handle
), ref r);
590
if ((r.left <= p.x && p.x < r.right && r.top <= p.y && p.y < r.bottom) || UnsafeNativeMethods.GetCapture() ==
Handle
)
591
SendMessage(NativeMethods.WM_SETCURSOR,
Handle
, NativeMethods.HTCLIENT);
1635
IntPtr parentHandle = this.
Handle
;
winforms\Managed\System\WinForms\Splitter.cs (1)
772
IntPtr parentHandle = ParentInternal.
Handle
;
winforms\Managed\System\WinForms\StatusBar.cs (6)
104
elementSize = vsRenderer.GetPartSize(Graphics.FromHwndInternal(this.
Handle
), ThemeSizeType.True);
110
elementSize = vsRenderer.GetPartSize(Graphics.FromHwndInternal(this.
Handle
), ThemeSizeType.True);
602
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.SB_SETPARTS, 1, offsets);
616
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.SB_SETPARTS, length, offsets2);
1856
ti.hwnd = parent.
Handle
;
1862
ti.uId = parent.
Handle
;
winforms\Managed\System\WinForms\StatusBarPanel.cs (2)
643
int result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.
Handle
), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText);
657
result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.
Handle
), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (1)
581
UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, this.
Handle
), rootHwnd, gripLocation, 1);
winforms\Managed\System\WinForms\TabControl.cs (9)
1066
int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TCM_INSERTITEM, tabPageCount + 1, tcitem);
1067
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), tabBaseReLayoutMessage, IntPtr.Zero, IntPtr.Zero);
1309
retIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TCM_INSERTITEM, index, tcitem);
1341
NativeWindow.AddWindowToIDTable(this, this.
Handle
);
1407
NativeWindow.RemoveWindowFromIDTable(this.
Handle
);
1738
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.TCM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0);
1751
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TCM_SETITEM, index, tcitem);
1754
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero);
2135
IntPtr hwnd =
Handle
;
winforms\Managed\System\WinForms\TextBox.cs (4)
608
SafeNativeMethods.RedrawWindow(new HandleRef(this, this.
Handle
), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
786
if (!stringSource.Bind(new HandleRef(this,
Handle
), (int)AutoCompleteMode))
813
int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this,
Handle
) , (int)AutoCompleteSource | mode);
835
SafeNativeMethods.SHAutoComplete(new HandleRef(this,
Handle
) , mode);
winforms\Managed\System\WinForms\TextBoxBase.cs (7)
1013
UnsafeNativeMethods.SendMessage( new HandleRef( this,
Handle
), NativeMethods.EM_GETSEL, ref start, ref end );
1258
return SafeNativeMethods.GetWindowTextLength(new HandleRef(this,
Handle
));
1318
UnsafeNativeMethods.SetWindowText(new HandleRef(this,
Handle
), value);
1687
if (!ValidationCancelled && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
1756
int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.EM_CHARFROMPOS, 0, longPoint);
1795
int i = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.EM_POSFROMCHAR, index, 0);
1836
if (UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), RichTextBoxConstants.EM_GETOLEINTERFACE, 0, out editOle) != 0) {
winforms\Managed\System\WinForms\ToolBar.cs (6)
1149
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TB_SETBUTTONINFO, x, ref tbbi);
1200
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TB_INSERTBUTTON, index, ref tbbutton);
1237
UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TB_SETBUTTONINFO, index, ref tbbi);
1494
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.TB_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0);
1569
new HandleRef(this,
Handle
), tpm);
1733
UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.
Handle
), leftTop);
winforms\Managed\System\WinForms\ToolBarButton.cs (2)
335
UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.
Handle
), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc);
559
int buttonID = (int)UnsafeNativeMethods.SendMessage(new HandleRef(Parent, Parent.
Handle
), NativeMethods.TB_GETBUTTONINFO, commandId, ref button);
winforms\Managed\System\WinForms\ToolStrip.cs (7)
2843
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.WM_PRINT, (IntPtr)imageHdc,
4113
if ((hwndThatLostFocus != IntPtr.Zero) && (hwndThatLostFocus != this.
Handle
)) {
4513
if (Focused && (otherHwnd != this.
Handle
)) {
4530
HandleRef thisHandle = new HandleRef(this, this.
Handle
);
4720
IntPtr hwndClicked = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null,
Handle
), pt.X, pt.Y,(int)(GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled | GetChildAtPointSkip.Transparent));
4723
if (hwndClicked == this.
Handle
) {
5165
if (!UnsafeNativeMethods.IsChild(new HandleRef(this, ownerToolStrip.
Handle
), new HandleRef(this,m.HWnd))) {
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
775
childAccessibleObject = new ChildAccessibleObject(toolStripComboBoxControl, toolStripComboBoxControl.
Handle
);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (6)
1103
SafeNativeMethods.SetWindowPos(new HandleRef(this,
Handle
), topMostFlag, 0, 0, 0, 0,
1672
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd);
1680
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_HWNDPARENT, ownerHandle);
1841
else if (IsHandleCreated && SafeNativeMethods.IsWindowEnabled(new HandleRef(this,
Handle
))) {
1842
SafeNativeMethods.SetWindowPos(new HandleRef(this,
Handle
), NativeMethods.HWND_TOP, 0, 0, 0, 0,
2022
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this,
Handle
), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (4)
258
Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Registering as drop target: " + owner.
Handle
.ToString());
260
int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(owner, owner.
Handle
), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this)));
273
Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Revoking drop target: " + owner.
Handle
.ToString());
276
int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(owner, owner.
Handle
));
winforms\Managed\System\WinForms\ToolStripManager.cs (8)
979
ActiveHwndInternal = new HandleRef(this, topLevel.
Handle
);
1050
UnsafeNativeMethods.MapWindowPoints(new HandleRef(activeToolStrip, hwndMouseMessageIsFrom), new HandleRef(activeToolStrip, activeToolStrip.
Handle
), pt, 1);
1056
&& activeToolStripDropDown.OwnerToolStrip.
Handle
== hwndMouseMessageIsFrom
1167
Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.SetActiveToolStripCore] Setting " + WindowsFormsUtils.GetControlInformation(toolStrip.
Handle
) + " active.");
1246
HandleRef hwndActiveToolStrip = new HandleRef(activeToolStrip, activeToolStrip.
Handle
);
1292
&& (IsChildOrSameWindow(new HandleRef(toplevelToolStrip, toplevelToolStrip.
Handle
),
1352
m.HWnd = activeToolStrip.
Handle
;
1709
IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(toplevelControl, toplevelControl.
Handle
));
winforms\Managed\System\WinForms\ToolStripTextBox.cs (3)
648
UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.
Handle
), ref rect);
735
SafeNativeMethods.RedrawWindow(new HandleRef(this,
Handle
),
887
UnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.
Handle
),hdc);
winforms\Managed\System\WinForms\ToolTip.cs (8)
243
cp.Parent = TopLevelControl.
Handle
;
1136
return this.GetMinToolInfoForHandle(ctl.
Handle
);
1274
baseHwnd = baseVar.
Handle
;
1298
hwnd = baseVar.
Handle
;
1303
baseHwnd = baseVar.
Handle
;
1557
UnsafeNativeMethods.GetWindowRect(new HandleRef(associatedControl, associatedControl.
Handle
), ref r);
2016
ti.hwnd = tool.
Handle
;
2017
ti.uId = tool.
Handle
;
winforms\Managed\System\WinForms\TreeNode.cs (22)
284
if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_GETITEMRECT, 1, ref rc) == 0) {
307
if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_GETITEMRECT, 0, ref rc) == 0) {
345
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_SETITEM, 0, ref item);
637
bool visible = ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_GETITEMRECT, 1, ref rc) != 0);
712
IntPtr next = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
),
840
IntPtr prev = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
),
920
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_GETITEM, 0, ref item);
1208
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_EDITLABEL, 0, handle);
1382
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_EXPAND, NativeMethods.TVE_COLLAPSE, Handle);
1493
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_ENDEDITLABELNOW, cancel?1:0, 0);
1554
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_ENSUREVISIBLE, 0, Handle);
1570
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_EXPAND, NativeMethods.TVE_EXPAND, Handle);
1711
IntPtr editHandle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_GETEDITCONTROL, 0, 0);
1716
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_ENDEDITLABELNOW, 0 /* fCancel==FALSE */, 0);
1719
handle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_INSERTITEM, 0, ref tvis);
1728
UnsafeNativeMethods.PostMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle);
1731
SafeNativeMethods.InvalidateRect(new HandleRef(tv, tv.
Handle
), null, false);
1739
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.WM_SETREDRAW, 1, 0);
1806
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_DELETEITEM, 0, handle);
1832
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_SETITEM, 0, ref item);
1944
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_SETITEM, 0, ref item);
1964
UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.
Handle
), NativeMethods.TVM_SETITEM, 0, ref item);
winforms\Managed\System\WinForms\TreeView.cs (27)
358
int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE)));
1750
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero);
1765
UnsafeNativeMethods.SendMessage(new HandleRef(this, this.
Handle
), NativeMethods.TVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0);
1787
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhi);
1837
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhi);
1992
int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE)));
1994
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style));
1998
int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE)));
2000
UnsafeNativeMethods.SetWindowLong(new HandleRef(this,
Handle
), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style));
2045
SafeNativeMethods.SetWindowPos(new HandleRef(this, this.
Handle
), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags);
2051
SafeNativeMethods.SetWindowPos(new HandleRef(this, this.
Handle
), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags);
2167
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhip);
2580
if (unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_GETITEMRECT, 1, ref rc)) != 0)
2581
SafeNativeMethods.InvalidateRect(new HandleRef(this,
Handle
), ref rc, true);
2732
if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this,
Handle
), NativeMethods.SB_HORZ,si) != false) {
2908
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhip);
2943
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhip);
3022
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhip);
3048
SendMessage(NativeMethods.WM_CONTEXTMENU,
Handle
, SafeNativeMethods.GetMessagePos());
3095
UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, this.
Handle
));
3103
new HandleRef(this, this.
Handle
),
3107
UnsafeNativeMethods.PostMessage(new HandleRef(this, this.
Handle
), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero);
3113
UnsafeNativeMethods.PostMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, treeNode.Handle);
3194
UnsafeNativeMethods.SendMessage(new HandleRef(null, this.
Handle
), NativeMethods.TVM_GETITEM, 0, ref item1);
3259
hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhip);
3287
IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhi);
3357
hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this,
Handle
), NativeMethods.TVM_HITTEST, 0, tvhit);
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (1)
781
X509Certificate2UI.DisplayCertificate(m_certificate, this.
Handle
);
winforms\Managed\System\WinForms\UpDownBase.cs (6)
966
if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
&& !ValidationCancelled) {
1165
UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.
Handle
), new HandleRef(this,
Handle
), point, 1);
1225
UnsafeNativeMethods.SetFocus(new HandleRef(TextBox, TextBox.
Handle
));
1311
if (!parent.ValidationCancelled && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
1657
if (!parent.ValidationCancelled && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) ==
Handle
) {
winforms\Managed\System\WinForms\UserControl.cs (1)
295
IntPtr hwnd =
Handle
;
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (2)
449
if (childControl.
Handle
!= IntPtr.Zero) {
452
lastHResult = SafeNativeMethods.DrawThemeParentBackground( new HandleRef( this, childControl.
Handle
), hdc, new NativeMethods.COMRECT( bounds ) );
winforms\Managed\System\WinForms\WebBrowser.cs (1)
1203
&& SafeNativeMethods.IsChild(new HandleRef(this, this.
Handle
), new HandleRef(null, hwndFocus));
winforms\Managed\System\WinForms\WebBrowserBase.cs (4)
668
return IsHandleCreated ?
Handle
: IntPtr.Zero;
744
int hr = this.axOleObject.DoVerb(verb, IntPtr.Zero, this.ActiveXSite, 0, this.
Handle
,
837
UnsafeNativeMethods.SetParent(new HandleRef(null, hwnd), new HandleRef(this, this.
Handle
));
1227
cc = Control.FromHandle(UnsafeNativeMethods.GetParent(new HandleRef(this,
Handle
))) as ContainerControl;
winforms\Managed\System\WinForms\WebBrowserContainer.cs (1)
73
return parent.
Handle
;
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (2)
262
return UnsafeNativeMethods.GetParent(new HandleRef(Host, Host.
Handle
));
317
lpFrameInfo.hwndFrame = (this.Host.ParentInternal == null) ? IntPtr.Zero : this.Host.ParentInternal.
Handle
;
winforms\Managed\System\WinForms\WinFormsUtils.cs (4)
238
return GetControlInformation(control.
Handle
);
294
return GetRootHWnd(new HandleRef(control, control.
Handle
));
331
UnsafeNativeMethods.MapWindowPoints(new HandleRef(fromControl, fromControl.
Handle
), new HandleRef(toControl, toControl.
Handle
), pt, 1);
System.Windows.Forms.DataVisualization (2)
WinForm\ChartWinControl.cs (2)
2145
using (Graphics g = Graphics.FromHwndInternal(
Handle
))
2160
using (Graphics g = Graphics.FromHwndInternal(
Handle
))
System.Workflow.Activities (4)
Rules\Design\Dialogs\ConditionBrowserDialog.cs (2)
145
NativeMethods.SendMessage(previewBox.
Handle
, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
147
NativeMethods.SendMessage(previewBox.
Handle
, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
Rules\Design\Dialogs\RuleSetBrowserDialog.cs (2)
128
NativeMethods.SendMessage(previewBox.
Handle
, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
130
NativeMethods.SendMessage(previewBox.
Handle
, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
System.Workflow.ComponentModel (3)
AuthoringOM\Design\DesignerWidgets.cs (2)
2159
this.infoTip = new NativeToolTip(this.parentControl.
Handle
);
2171
this.inplaceTip = new NativeToolTip(this.parentControl.
Handle
);
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (1)
993
IntPtr headerWindow = NativeMethods.ListView_GetHeader(this.artifactListView.
Handle
);
WsatUI (3)
MMCUI\AcceptedCertificatesForm.cs (1)
94
this.
Handle
);
MMCUI\WSATControl.cs (1)
344
if (ACLWrapper.EditACLSecurity(new WsatSecurityModel(Utilities.LocalHostName, config), this.
Handle
))
MMCUI\WSATPropertySheet.cs (1)
276
SafeNativeMethods.SetParent(wsatControl.
Handle
, this.windowUnmanagedParent);