217 references to Handle
PresentationCore (2)
Core\CSharp\System\Windows\Interop\HwndTarget.cs (2)
525
Debug.Assert(normalizedHwnd.
Handle
!= IntPtr.Zero);
561
Debug.Assert(normalizedHwnd.
Handle
!= IntPtr.Zero);
PresentationFramework (34)
src\Framework\MS\Internal\Controls\ActiveXContainer.cs (1)
122
return _host.ParentHandle.
Handle
;
src\Framework\MS\Internal\Controls\ActiveXSite.cs (3)
197
if (this.Host.ControlHandle.
Handle
!= hwnd)
239
return this.Host.ParentHandle.
Handle
;
301
lpFrameInfo.hwndFrame = this.Host.ParentHandle.
Handle
;
src\Framework\System\Windows\Interop\ActiveXHost.cs (4)
178
if (ControlHandle.
Handle
== IntPtr.Zero)
564
this.ParentHandle.
Handle
,
577
if (_axWindow.
Handle
== hwnd)
586
if (this.ParentHandle.
Handle
!= IntPtr.Zero)
src\Framework\System\Windows\Interop\HwndHost.cs (25)
411
if (_hwnd.
Handle
!= IntPtr.Zero && (hwndFocus.
Handle
== _hwnd.
Handle
|| UnsafeNativeMethods.IsChild(_hwnd, hwndFocus)))
546
DpiScale2 dpi = DpiUtil.GetWindowDpi(_hwnd.
Handle
, fallbackToNearestMonitorHeuristic: false);
895
if(_hwnd.
Handle
!= IntPtr.Zero && UnsafeNativeMethods.IsWindow(_hwnd))
903
if(hdcScreen.
Handle
!= IntPtr.Zero)
911
if(hdcBitmap.
Handle
!= IntPtr.Zero)
915
if(hBitmap.
Handle
!= IntPtr.Zero)
918
IntPtr hOldBitmap = UnsafeNativeMethods.CriticalSelectObject(hdcBitmap, hBitmap.
Handle
);
924
UnsafeNativeMethods.CriticalFillRect(hdcBitmap.
Handle
, ref rcPaint, hbrWhite);
936
UnsafeNativeMethods.SendMessage(_hwnd.
Handle
, WindowMessage.WM_PRINT, hdcBitmap.
Handle
, (IntPtr) (NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT));
952
System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.
Handle
, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha);
970
if(hBitmap.
Handle
!= IntPtr.Zero)
976
if(hdcBitmap.
Handle
!= IntPtr.Zero)
1183
if(_hwnd.
Handle
== IntPtr.Zero)
1199
else if (!FrameworkAppContextSwitches.Enable2019_12_B || _hwnd.
Handle
!= IntPtr.Zero) // When the "knob" is disabled, it would be as if this condition didn't exist - which is equivalent to the code prior to this change.
1240
if(_hwnd.
Handle
== IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd))
1246
int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,_hwnd.
Handle
), NativeMethods.GWL_STYLE);
1253
if(hwndParent.
Handle
!= UnsafeNativeMethods.GetParent(_hwnd))
1259
if (DpiUtil.GetDpiAwarenessContext(_hwnd.
Handle
) != DpiUtil.GetDpiAwarenessContext(hwndParent.
Handle
))
1278
_hwndSubclass.CriticalAttach(_hwnd.
Handle
);
1346
if(_hwnd.
Handle
!= IntPtr.Zero)
1354
return _hwnd.
Handle
;
src\Framework\System\Windows\SystemResources.cs (1)
1728
DpiUtil.GetExtendedDpiInfoForWindow(hwnd.
Handle
, fallbackToNearestMonitorHeuristic: true) :
System.Activities.Presentation (1)
Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (1)
56
IntPtr windowStyle = Win32Interop.GetWindowLongPtr(hwnd.
Handle
, Win32Interop.GWL_STYLE);
System.Data (10)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (1)
56
IntPtr windowStyle = Win32Interop.GetWindowLongPtr(hwnd.
Handle
, Win32Interop.GWL_STYLE);
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (5)
2072
buffer.PtrOffset(256, IntPtr.Size).
Handle
);
2141
buffer.PtrOffset(256, IntPtr.Size).
Handle
);
2230
IntPtr colnameActual = buffer.PtrOffset(colnameActualOffset, IntPtr.Size).
Handle
;
2231
IntPtr indexActual = buffer.PtrOffset(indexActualOffset, IntPtr.Size).
Handle
;
2232
IntPtr ordinalActual = buffer.PtrOffset(ordinalActualOffset, IntPtr.Size).
Handle
;
fx\src\data\System\Data\Odbc\OdbcParameter.cs (4)
746
&& (_boundBuffer == valueBuffer.
Handle
)
747
&& (_boundIntbuffer == intBuffer.
Handle
)
780
_boundBuffer = valueBuffer.
Handle
;
781
_boundIntbuffer = intBuffer.
Handle
;
System.Drawing (43)
misc\GDI\UnsafeNativeMethods.cs (43)
58
DbgUtil.AssertWin32(retVal, "DeleteDC([hdc=0x{0:X8}]) failed.", hDC.
Handle
);
64
DbgUtil.AssertWin32(retVal, "DeleteHDC([hdc=0x{0:X8}]) failed.", hDC.
Handle
);
87
DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateDC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.
Handle
);
101
DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateIC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.
Handle
);
117
DbgUtil.AssertWin32(compatibleDc != IntPtr.Zero, "CreateCompatibleDC([hdc=0x{0:X8}]) failed", hDC.
Handle
);
128
DbgUtil.AssertWin32(state != 0, "SaveDC([hdc=0x{0:X8}]) failed", hDC.
Handle
);
159
DbgUtil.AssertWin32(retVal, "OffsetViewportOrgEx([hdc=0x{0:X8}], dx=[{1}], dy=[{2}], [out pPoint]) failed.", hDC.
Handle
, nXOffset, nYOffset);
169
DbgUtil.AssertWin32(iMode != 0, "SetGraphicsMode([hdc=0x{0:X8}], [GM_ADVANCED]) failed.", hDC.
Handle
);
191
Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.
Handle
!= IntPtr.Zero, "Destination region is invalid");
192
Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.
Handle
!= IntPtr.Zero, "Source region 1 is invalid");
193
Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.
Handle
!= IntPtr.Zero, "Source region 2 is invalid");
208
DbgUtil.AssertWin32(retVal != -1, "IntGetClipRgn([hdc=0x{0:X8}], [hRgn]) failed.", hDC.
Handle
);
218
DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "SelectClipRgn([hdc=0x{0:X8}], [hRegion=0x{1:X8}]) failed.", hDC.
Handle
, hRgn.
Handle
);
228
DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "GetRgnBox([hRegion=0x{0:X8}], [out rect]) failed.", hRgn.
Handle
);
255
DbgUtil.AssertWin32(retVal, "DeleteObject(hObj=[0x{0:X8}]) failed.", hObject.
Handle
);
265
DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGBRUSH]) failed.", hBrush.
Handle
);
276
DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGFONT]) failed.", hFont.
Handle
);
288
DbgUtil.AssertWin32(oldObj != IntPtr.Zero, "SelectObject(hdc=hObj=[0x{0:X8}], hObj=[0x{1:X8}]) failed.", hdc.
Handle
, obj.
Handle
);
346
DbgUtil.AssertWin32(oldMode != 0, "SetBkMode(hdc=[0x{0:X8}], Mode=[{1}]) failed.", hDC.
Handle
, nBkMode );
356
DbgUtil.AssertWin32(mode != 0, "GetBkMode(hdc=[0x{0:X8}]) failed.", hDC.
Handle
);
400
DbgUtil.AssertWin32( retVal != 0, "DrawText(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.
Handle
, text, lpRect, nFormat );
439
DbgUtil.AssertWin32(retVal != 0, "DrawTextEx(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.
Handle
, text, lpRect, nFormat );
474
DbgUtil.AssertWin32(retVal != 0, "GetTextExtentPoint32(hdc=[0x{0:X8}], text=[{1}], size=[{2}] failed.", hDC.
Handle
, text, size );
492
DbgUtil.AssertWin32(retVal, "LineTo(hdc=[0x{0:X8}], x=[{1}], y=[{2}] failed.", hdc.
Handle
, x, y );
502
DbgUtil.AssertWin32(retVal, "MoveToEx(hdc=[0x{0:X8}], x=[{1}], y=[{2}], pt=[{3}] failed.", hdc.
Handle
, x, y, pt );
512
DbgUtil.AssertWin32(retVal, "Rectangle(hdc=[0x{0:X8}], left=[{1}], top=[{2}], right=[{3}], bottom=[{4}] failed.", hdc.
Handle
, left, top, right, bottom );
522
DbgUtil.AssertWin32(retVal, "FillRect(hdc=[0x{0:X8}], rect=[{1}], hbrush=[{2}]", hDC.
Handle
, rect, hbrush.
Handle
);
532
DbgUtil.AssertWin32(oldMapMode != 0, "SetMapMode(hdc=[0x{0:X8}], MapMode=[{1}]", hDC.
Handle
, nMapMode);
542
DbgUtil.AssertWin32(mapMode != 0, "GetMapMode(hdc=[0x{0:X8}]", hDC.
Handle
);
552
DbgUtil.AssertWin32(retVal, "GetViewportExtEx([hdc=0x{0:X8}], [out size]) failed.", hdc.
Handle
);
562
DbgUtil.AssertWin32(retVal, "GetViewportOrgEx([hdc=0x{0:X8}], [out point]) failed.", hdc.
Handle
);
572
DbgUtil.AssertWin32(retVal, "SetViewportExtEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out size]) failed.", hDC.
Handle
, x, y);
581
DbgUtil.AssertWin32(retVal, "SetViewportOrgEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out point]) failed.", hDC.
Handle
, x, y);
632
DbgUtil.AssertWin32(retVal != 0, "GetTextMetrics(hdc=[0x{0:X8}], [out TEXTMETRIC] failed.", hDC.
Handle
);
642
DbgUtil.AssertWin32(retVal, "BeginPath(hdc=[0x{0:X8}]failed.", hDC.
Handle
);
652
DbgUtil.AssertWin32(retVal, "EndPath(hdc=[0x{0:X8}]failed.", hDC.
Handle
);
662
DbgUtil.AssertWin32(retVal, "StrokePath(hdc=[0x{0:X8}]failed.", hDC.
Handle
);
672
DbgUtil.AssertWin32(retVal, "AngleArc(hdc=[0x{0:X8}], ...) failed.", hDC.
Handle
);
702
DbgUtil.AssertWin32(retVal, "Arc(hdc=[0x{0:X8}], ...) failed.", hDC.
Handle
);
718
DbgUtil.AssertWin32(retVal, "Ellipse(hdc=[0x{0:X8}], x1=[{1}], y1=[{2}], x2=[{3}], y2=[{4}]) failed.", hDc.
Handle
, x1, y1, x2, y2);
System.Web (16)
Compilation\CompilationLock.cs (4)
68
if (_mutexHandle.
Handle
== IntPtr.Zero) {
91
if (_mutexHandle.
Handle
!= IntPtr.Zero) {
103
if (_mutexHandle.
Handle
== IntPtr.Zero)
137
if (_mutexHandle.
Handle
== IntPtr.Zero)
FileChangesMonitor.cs (1)
487
if (ndirMonCompletionHandle.
Handle
!= IntPtr.Zero) {
ImpersonationContext.cs (7)
40
if (_savedToken.
Handle
!= IntPtr.Zero) {
42
UnsafeNativeMethods.CloseHandle(_savedToken.
Handle
);
54
if (_savedToken.
Handle
!= IntPtr.Zero) {
61
if (token.
Handle
!= IntPtr.Zero) {
62
if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, token.
Handle
) == 0) {
84
if (_savedToken.
Handle
!= IntPtr.Zero) {
86
if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, _savedToken.
Handle
) == 0) {
State\OutOfProcStateClientManager.cs (4)
292
socketHandle = new HandleRef(this, conn._socketHandle.
Handle
);
306
"socket=" + (IntPtr)socketHandle.
Handle
+
342
else if (results.socket != socketHandle.
Handle
) {
713
if (_socketHandle.
Handle
!= OutOfProcSessionStateStore.INVALID_SOCKET) {
System.Windows.Forms (109)
misc\GDI\UnsafeNativeMethods.cs (43)
58
DbgUtil.AssertWin32(retVal, "DeleteDC([hdc=0x{0:X8}]) failed.", hDC.
Handle
);
64
DbgUtil.AssertWin32(retVal, "DeleteHDC([hdc=0x{0:X8}]) failed.", hDC.
Handle
);
87
DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateDC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.
Handle
);
101
DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateIC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.
Handle
);
117
DbgUtil.AssertWin32(compatibleDc != IntPtr.Zero, "CreateCompatibleDC([hdc=0x{0:X8}]) failed", hDC.
Handle
);
128
DbgUtil.AssertWin32(state != 0, "SaveDC([hdc=0x{0:X8}]) failed", hDC.
Handle
);
159
DbgUtil.AssertWin32(retVal, "OffsetViewportOrgEx([hdc=0x{0:X8}], dx=[{1}], dy=[{2}], [out pPoint]) failed.", hDC.
Handle
, nXOffset, nYOffset);
169
DbgUtil.AssertWin32(iMode != 0, "SetGraphicsMode([hdc=0x{0:X8}], [GM_ADVANCED]) failed.", hDC.
Handle
);
191
Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.
Handle
!= IntPtr.Zero, "Destination region is invalid");
192
Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.
Handle
!= IntPtr.Zero, "Source region 1 is invalid");
193
Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.
Handle
!= IntPtr.Zero, "Source region 2 is invalid");
208
DbgUtil.AssertWin32(retVal != -1, "IntGetClipRgn([hdc=0x{0:X8}], [hRgn]) failed.", hDC.
Handle
);
218
DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "SelectClipRgn([hdc=0x{0:X8}], [hRegion=0x{1:X8}]) failed.", hDC.
Handle
, hRgn.
Handle
);
228
DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "GetRgnBox([hRegion=0x{0:X8}], [out rect]) failed.", hRgn.
Handle
);
255
DbgUtil.AssertWin32(retVal, "DeleteObject(hObj=[0x{0:X8}]) failed.", hObject.
Handle
);
265
DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGBRUSH]) failed.", hBrush.
Handle
);
276
DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGFONT]) failed.", hFont.
Handle
);
288
DbgUtil.AssertWin32(oldObj != IntPtr.Zero, "SelectObject(hdc=hObj=[0x{0:X8}], hObj=[0x{1:X8}]) failed.", hdc.
Handle
, obj.
Handle
);
346
DbgUtil.AssertWin32(oldMode != 0, "SetBkMode(hdc=[0x{0:X8}], Mode=[{1}]) failed.", hDC.
Handle
, nBkMode );
356
DbgUtil.AssertWin32(mode != 0, "GetBkMode(hdc=[0x{0:X8}]) failed.", hDC.
Handle
);
400
DbgUtil.AssertWin32( retVal != 0, "DrawText(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.
Handle
, text, lpRect, nFormat );
439
DbgUtil.AssertWin32(retVal != 0, "DrawTextEx(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.
Handle
, text, lpRect, nFormat );
474
DbgUtil.AssertWin32(retVal != 0, "GetTextExtentPoint32(hdc=[0x{0:X8}], text=[{1}], size=[{2}] failed.", hDC.
Handle
, text, size );
492
DbgUtil.AssertWin32(retVal, "LineTo(hdc=[0x{0:X8}], x=[{1}], y=[{2}] failed.", hdc.
Handle
, x, y );
502
DbgUtil.AssertWin32(retVal, "MoveToEx(hdc=[0x{0:X8}], x=[{1}], y=[{2}], pt=[{3}] failed.", hdc.
Handle
, x, y, pt );
512
DbgUtil.AssertWin32(retVal, "Rectangle(hdc=[0x{0:X8}], left=[{1}], top=[{2}], right=[{3}], bottom=[{4}] failed.", hdc.
Handle
, left, top, right, bottom );
522
DbgUtil.AssertWin32(retVal, "FillRect(hdc=[0x{0:X8}], rect=[{1}], hbrush=[{2}]", hDC.
Handle
, rect, hbrush.
Handle
);
532
DbgUtil.AssertWin32(oldMapMode != 0, "SetMapMode(hdc=[0x{0:X8}], MapMode=[{1}]", hDC.
Handle
, nMapMode);
542
DbgUtil.AssertWin32(mapMode != 0, "GetMapMode(hdc=[0x{0:X8}]", hDC.
Handle
);
552
DbgUtil.AssertWin32(retVal, "GetViewportExtEx([hdc=0x{0:X8}], [out size]) failed.", hdc.
Handle
);
562
DbgUtil.AssertWin32(retVal, "GetViewportOrgEx([hdc=0x{0:X8}], [out point]) failed.", hdc.
Handle
);
572
DbgUtil.AssertWin32(retVal, "SetViewportExtEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out size]) failed.", hDC.
Handle
, x, y);
581
DbgUtil.AssertWin32(retVal, "SetViewportOrgEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out point]) failed.", hDC.
Handle
, x, y);
632
DbgUtil.AssertWin32(retVal != 0, "GetTextMetrics(hdc=[0x{0:X8}], [out TEXTMETRIC] failed.", hDC.
Handle
);
642
DbgUtil.AssertWin32(retVal, "BeginPath(hdc=[0x{0:X8}]failed.", hDC.
Handle
);
652
DbgUtil.AssertWin32(retVal, "EndPath(hdc=[0x{0:X8}]failed.", hDC.
Handle
);
662
DbgUtil.AssertWin32(retVal, "StrokePath(hdc=[0x{0:X8}]failed.", hDC.
Handle
);
672
DbgUtil.AssertWin32(retVal, "AngleArc(hdc=[0x{0:X8}], ...) failed.", hDC.
Handle
);
702
DbgUtil.AssertWin32(retVal, "Arc(hdc=[0x{0:X8}], ...) failed.", hDC.
Handle
);
718
DbgUtil.AssertWin32(retVal, "Ellipse(hdc=[0x{0:X8}], x1=[{1}], y1=[{2}], x2=[{3}], y2=[{4}]) failed.", hDc.
Handle
, x1, y1, x2, y2);
winforms\Managed\System\WinForms\Application.cs (2)
3429
if (hwndOwner.
Handle
!= IntPtr.Zero) {
3487
if (hwndOwner.
Handle
!= IntPtr.Zero) {
winforms\Managed\System\WinForms\ComboBox.cs (1)
5879
ACNativeWindow.RegisterACWindow(hRef.
Handle
, shouldSubClass);
winforms\Managed\System\WinForms\Control.cs (10)
10353
Debug.Assert(hClippingRegion.
Handle
!= IntPtr.Zero, "CreateRectRgn() failed.");
10404
SendMessage(NativeMethods.WM_PRINT, hDC.
Handle
, lParam);
11030
if (parentHandle.
Handle
!= IntPtr.Zero // the parent was not null
11031
&& (Control.FromHandleInternal(parentHandle.
Handle
) == null || this.parent == null) // but wasnt a windows forms window
19262
if (hBitmapDC.
Handle
== IntPtr.Zero || hMetafileDC.
Handle
== IntPtr.Zero || hBitmap.
Handle
== IntPtr.Zero) {
19289
get { return hBitmapDC.
Handle
; }
19301
if (hNullBitmap.
Handle
== IntPtr.Zero) return fSuccess;
19305
if (hBitmap.
Handle
== IntPtr.Zero) return fSuccess;
winforms\Managed\System\WinForms\Form.cs (1)
3701
if (icon != null && TaskbarOwner.
Handle
!= IntPtr.Zero) {
winforms\Managed\System\WinForms\Label.cs (1)
1623
using(Graphics g = Graphics.FromHdcInternal(hDC.
Handle
)) {
winforms\Managed\System\WinForms\Panel.cs (1)
295
using(Graphics g = Graphics.FromHdcInternal(hDC.
Handle
)) {
winforms\Managed\System\WinForms\StatusStrip.cs (2)
195
if (rootHwnd.
Handle
!= IntPtr.Zero) {
567
if (rootHwnd.
Handle
!= IntPtr.Zero && !UnsafeNativeMethods.IsZoomed(rootHwnd)) {
winforms\Managed\System\WinForms\ToolStrip.cs (16)
2847
IntPtr desthDC = hDC.
Handle
;
3676
Graphics itemGraphics = Graphics.FromHdcInternal(itemHDC.
Handle
);
3718
itemGraphics = Graphics.FromHdcInternal(itemHDC.
Handle
);
4534
if ((thisHandle.
Handle
!= otherHandle.
Handle
) &&
4542
if (thisHwndRoot.
Handle
== otherHwndRoot.
Handle
&& (thisHwndRoot.
Handle
!= IntPtr.Zero)) {
4543
Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip SnapFocus]: Caching for return focus:" + WindowsFormsUtils.GetControlInformation(otherHandle.
Handle
));
4545
hwndThatLostFocus = otherHandle.
Handle
;
4732
if (rootHwnd.
Handle
!= IntPtr.Zero) {
4736
if (hwndActive != rootHwnd.
Handle
) {
5167
if (rootHwnd.
Handle
== m.HWnd || UnsafeNativeMethods.IsChild(rootHwnd, new HandleRef(this,m.HWnd))) {
5229
if (cachedItemHDC.
Handle
== IntPtr.Zero) {
5257
if (cachedItemHDC.
Handle
!= IntPtr.Zero) {
5259
if (cachedItemBitmap.
Handle
!= IntPtr.Zero) {
winforms\Managed\System\WinForms\ToolStripManager.cs (21)
256
return (WindowsFormsUtils.GetRootHWnd(control1).
Handle
== WindowsFormsUtils.GetRootHWnd(control2).
Handle
);
790
if (_activeHwnd.
Handle
!= value.
Handle
) {
794
if (_activeHwnd.
Handle
!= IntPtr.Zero) {
795
control = Control.FromHandleInternal(_activeHwnd.
Handle
);
804
control = Control.FromHandleInternal(_activeHwnd.
Handle
);
914
if (ActiveHwnd.
Handle
!= IntPtr.Zero) {
916
Control control = Control.FromHandleInternal(ActiveHwnd.
Handle
);
1203
if (hwndParent.
Handle
== hwndChild.
Handle
) {
1250
if (hwndCurrentActiveWindow.
Handle
!= _lastActiveWindow.
Handle
) {
1252
if (hwndCurrentActiveWindow.
Handle
== IntPtr.Zero) {
1254
Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] Dismissing because: " + WindowsFormsUtils.GetControlInformation(hwndCurrentActiveWindow.
Handle
) + " has gotten activation. ");
1257
else if (!(Control.FromChildHandleInternal(hwndCurrentActiveWindow.
Handle
) is ToolStripDropDown) // its NOT a dropdown
1260
Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] Calling ProcessActivationChange because: " + WindowsFormsUtils.GetControlInformation(hwndCurrentActiveWindow.
Handle
) + " has gotten activation. ");
1643
rootWindowsMatch = (rootWindowOfToolStrip.
Handle
== rootWindowOfControl.
Handle
);
1647
Form mainForm = Control.FromHandleInternal(rootWindowOfControl.
Handle
) as Form;
1748
if (topmostParentOfMenu.
Handle
== foregroundWindow) {
winforms\Managed\System\WinForms\ToolStripTextBox.cs (5)
744
if (hNonClientRegion.
Handle
!= IntPtr.Zero) {
750
if (hClientRegion.
Handle
!= IntPtr.Zero) {
755
if (hTotalRegion.
Handle
!= IntPtr.Zero) {
853
if (hdc.
Handle
== IntPtr.Zero) {
867
using (Graphics g = Graphics.FromHdcInternal(hdc.
Handle
)) {
winforms\Managed\System\WinForms\WinFormsUtils.cs (6)
288
IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new HandleRef(hwnd, hwnd.
Handle
), NativeMethods.GA_ROOT);
610
if (hDC.
Handle
== IntPtr.Zero) {
621
this.dc = DeviceContext.FromHdc(hDC.
Handle
);
631
Debug.Assert(hClippingRegion.
Handle
!= IntPtr.Zero, "CreateRectRgn() failed.");
637
Debug.Assert(hOriginalClippingRegion.
Handle
!= IntPtr.Zero, "CreateRectRgn() failed.");
700
if (hOriginalClippingRegion.
Handle
!= IntPtr.Zero) {
WindowsBase (2)
Base\System\Windows\SplashScreen.cs (2)
223
IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hBitmap.MakeHandleRef(null).
Handle
);
369
UnsafeNativeMethods.DeleteObject(_hBitmap.MakeHandleRef(null).
Handle
);