2950 instantiations of HandleRef
PresentationCore (137)
Core\CSharp\MS\Internal\Automation\ElementUtil.cs (1)
155SafeSecurityHelper.TransformLocalRectToScreen(new HandleRef(null, hwnd), ref rcWin32);
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (3)
498HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 511_dpi = MS.Win32.UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 516MS.Win32.UnsafeNativeMethods.ReleaseDC(desktopWnd, new HandleRef(null, dc));
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (1)
428new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ?
Core\CSharp\System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
60UnsafeNativeMethods.GetWindowText(new HandleRef(null, hwnd), sb, sb.Capacity); 96SafeNativeMethods.GetWindowRect(new HandleRef(null, hwnd), ref rc);
Core\CSharp\System\Windows\Clipboard.cs (1)
676IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), "WldpIsDynamicCodePolicyEnabled");
Core\CSharp\System\Windows\DataObject.cs (43)
831Win32GlobalFree(new HandleRef(this, medium.unionmember)); 1616hDC = Win32GetDC(new HandleRef(this, IntPtr.Zero)); 1619sourceDC = Win32CreateCompatibleDC(new HandleRef(this, hDC)); 1622sourceObject = Win32SelectObject(new HandleRef(this, sourceDC), hBitmap); 1625destinationDC = Win32CreateCompatibleDC(new HandleRef(this, hDC)); 1628hBitmapNew = Win32CreateCompatibleBitmap(new HandleRef(this, hDC), width, height); 1631destinationObject = Win32SelectObject(new HandleRef(this, destinationDC), hBitmapNew); 1637Win32BitBlt(new HandleRef(this, destinationDC), width, height, new HandleRef(null, sourceDC), /* SRCCOPY */0x00CC0020); 1642Win32SelectObject(new HandleRef(this, sourceDC), sourceObject); 1643Win32SelectObject(new HandleRef(this, destinationDC), destinationObject); 1646Win32DeleteDC(new HandleRef(this, sourceDC)); 1647Win32DeleteDC(new HandleRef(this, destinationDC)); 1650Win32ReleaseDC(new HandleRef(this, IntPtr.Zero), new HandleRef(this, hDC)); 1656Win32DeleteObject(new HandleRef(this, hBitmap)); 2041ptr = Win32GlobalLock(new HandleRef(this, handle)); 2054Win32GlobalUnlock(new HandleRef(this, handle)); 2088Win32DeleteObject(new HandleRef(this, hbitmap)); 2168basePtr = Win32GlobalLock(new HandleRef(this, handle)); 2208Win32GlobalUnlock(new HandleRef(this, handle)); 2243ptr = Win32GlobalLock(new HandleRef(this, handle)); 2264Win32GlobalUnlock(new HandleRef(this, handle)); 2298ptr = Win32GlobalLock(new HandleRef(this, handle)); 2314Win32GlobalUnlock(new HandleRef(this, handle)); 2356pointerUtf8 = Win32GlobalLock(new HandleRef(this, handle)); 2374Win32GlobalUnlock(new HandleRef(this, handle)); 2474int byteCount = NativeMethods.IntPtrToInt32(Win32GlobalSize(new HandleRef(this, handle))); 2483handle = Win32GlobalReAlloc(new HandleRef(this, handle), 2541Win32DeleteObject(new HandleRef(null, hbitmap)); 3104IntPtr ptr = Win32GlobalLock(new HandleRef(this, hglobal)); 3115Win32GlobalUnlock(new HandleRef(this, hglobal)); 3121Win32GlobalFree(new HandleRef(this, hglobal)); 3380ptr = Win32GlobalLock(new HandleRef(this, handle)); 3388size = NativeMethods.IntPtrToInt32(Win32GlobalSize(new HandleRef(this, handle))); 3426Win32GlobalUnlock(new HandleRef(this, handle)); 3519count = UnsafeNativeMethods.DragQueryFile(new HandleRef(this, hdrop), unchecked((int)0xFFFFFFFF), null, 0); 3526if (UnsafeNativeMethods.DragQueryFile(new HandleRef(this, hdrop), i, sb, sb.Capacity) != 0) 3552ptr = Win32GlobalLock(new HandleRef(this, handle)); 3566Win32GlobalUnlock(new HandleRef(this, handle)); 3583int utf8ByteSize = NativeMethods.IntPtrToInt32(Win32GlobalSize(new HandleRef(this, handle))); 3585IntPtr pointerUtf8 = Win32GlobalLock(new HandleRef(this, handle)); 3621Win32GlobalUnlock(new HandleRef(this, handle));
Core\CSharp\System\Windows\DragDrop.cs (2)
494new HandleRef(null, windowHandle), 518new HandleRef(null, windowHandle));
Core\CSharp\System\Windows\Input\Cursor.cs (1)
369_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
Core\CSharp\System\Windows\Input\InputMethod.cs (42)
601IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 602bool fOpen = UnsafeNativeMethods.ImmGetOpenStatus(new HandleRef(this, himc)); 603UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 640IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 641bool fOpen = UnsafeNativeMethods.ImmGetOpenStatus(new HandleRef(this, himc)); 646UnsafeNativeMethods.ImmSetOpenStatus(new HandleRef(this, himc), (value == InputMethodState.On)); 649UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 872IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 873UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 874UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1013IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1014UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 1074UnsafeNativeMethods.ImmSetConversionStatus(new HandleRef(this, himc), convmodeNew, sentence); 1077UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1137IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1138UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 1139UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1211IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1212UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 1229UnsafeNativeMethods.ImmSetConversionStatus(new HandleRef(this, himc), convmode, sentenceNew); 1232UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1455UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, _defaultImc.Value)); 1463UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1531IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1532UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref immConvMode, ref sentence); 1533UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1666UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1731UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_REGISTERWORD, ref regWord); 1929IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero)); 1930IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1935UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc));
Core\CSharp\System\Windows\Input\InputProcessorProfiles.cs (1)
157SafeNativeMethods.ActivateKeyboardLayout(new HandleRef(this,hklList[i]), 0);
Core\CSharp\System\Windows\Input\MouseDevice.cs (1)
2206if (!SafeNativeMethods.IsWindowEnabled(new HandleRef(null, hwndHit)))
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (3)
530UnsafeNativeMethods.TrySetFocus(new HandleRef(this, hwndRestoreFocus), ref hwndRestoreFocus); 872int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,hwnd), NativeMethods.GWL_STYLE); 878IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd));
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (3)
529SafeNativeMethods.ScreenToClient(new HandleRef(this,hwnd), pt); 1021SafeNativeMethods.GetClientRect(new HandleRef(this,hwndToCheck), ref rcClient); 1022SafeNativeMethods.ScreenToClient(new HandleRef(this,hwndToCheck), ptCursor);
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (2)
67return new HandleRef(_hwndSource, handle); 71return new HandleRef();
Core\CSharp\System\Windows\Interop\HwndSource.cs (14)
327UnsafeNativeMethods.CriticalSetWindowTheme(new HandleRef(this, _hwndWrapper.Handle), "", ""); 873UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 905UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 977UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 1005IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); 1008UnsafeNativeMethods.PostMessage(new HandleRef(this, hwndRoot), MS.Internal.Interop.WindowMessage.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), new IntPtr(NativeMethods.VK_SPACE)); 1055int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), false)); 1056int styleEx = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), true)); 1157return new HandleRef(this,Handle); 1372SafeNativeMethods.GetClientRect(new HandleRef(this,_hwndWrapper.Handle), ref rc); 1594SafeNativeMethods.GetWindowRect(new HandleRef(this, _hwndWrapper.Handle), ref windowRect); 1783hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); 1790SafeNativeMethods.GetWindowRect(new HandleRef(this, hwndRoot), ref rc);
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (3)
62UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 129SafeNativeMethods.ScreenToClient(new HandleRef(this, hwnd), pt1);
Core\CSharp\System\Windows\Interop\HwndTarget.cs (6)
554normalizedHwnd = new HandleRef(wrapperObject, hwndParent); 576new HandleRef(this, hwnd), 580if (!UnsafeNativeMethods.IsWindow(new HandleRef(this, hwnd))) 1931new HandleRef(null, IntPtr.Zero), // HWND_TOP 1958new HandleRef(null, IntPtr.Zero), // HWND_TOP 2092SafeSecurityHelper.TransformLocalRectToScreen(new HandleRef(null, hwndParent), ref windowRectInScreenCoords);
Core\CSharp\System\Windows\Media\MediaContextNotificationWindow.cs (1)
252new HandleRef(null, user32Module),
Core\CSharp\System\Windows\UIElement.cs (4)
1158HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1175dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 1176dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 1182UnsafeNativeMethods.ReleaseDC(desktopWnd, new HandleRef(null, dc));
Shared\MS\Internal\PointUtil.cs (2)
190HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle); 218HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle);
Shared\MS\Internal\SafeSecurityHelper.cs (1)
71int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
PresentationFramework (155)
src\Framework\Microsoft\Win32\CommonDialog.cs (2)
276MoveToScreenCenter(new HandleRef(this,hwnd)); 338new HandleRef(this, _hwndOwnerWindow), // window to find monitor location for
src\Framework\Microsoft\Win32\FileDialog.cs (8)
699_hwndFileDialog = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)); 740MoveToScreenCenter(new HandleRef(this, _hwndFileDialog)); 882UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this, hwnd), // hWnd (which window are we affecting) 903UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this, hwnd), // hWnd (which window are we affecting) 1195UnsafeNativeMethods.SetFocus(new HandleRef(this, focusHandle)); 1762if (!UnsafeNativeMethods.IsWindow(new HandleRef(this, _hwndFileDialog))) 1768int textLen = UnsafeNativeMethods.GetWindowTextLength(new HandleRef(this, _hwndFileDialog)); 1772UnsafeNativeMethods.GetWindowText(new HandleRef(this, _hwndFileDialog),
src\Framework\MS\Internal\AppModel\AppSecurityManager.cs (1)
157UnsafeNativeMethods.ShellExecute( new HandleRef( null, IntPtr.Zero) , /*hwnd*/
src\Framework\MS\Internal\AppModel\IconHelper.cs (5)
53var hdcDesktop = new HandleRef(null, UnsafeNativeMethods.GetDC(new HandleRef())); 79UnsafeNativeMethods.ReleaseDC(new HandleRef(), hdcDesktop); 98string iconModuleFile = UnsafeNativeMethods.GetModuleFileName(new HandleRef()); 261new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used.
src\Framework\MS\Internal\AppModel\PresentationAppDomainManager.cs (1)
114new HandleRef(null, ElevationPromptOwnerWindow), NativeMethods.GA_ROOT);
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (2)
291IntPtr topWindow = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), 2/*GA_ROOT*/); 392handleRef = new HandleRef( this, CriticalHandle ) ;
src\Framework\MS\Internal\Controls\ActiveXHelper.cs (4)
104logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 105UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 132logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 133UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
src\Framework\MS\Internal\Printing\Win32PrintDialog.cs (1)
153if(0 != MS.Win32.UnsafeNativeMethods.MessageBox(new HandleRef(null, owner), message, caption, type))
src\Framework\System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
52UnsafeNativeMethods.GetWindowText(new HandleRef(null, window.CriticalHandle), sb, sb.Capacity); 89try { SafeNativeMethods.GetWindowRect(new HandleRef(null, windowHandle), ref rc); }
src\Framework\System\Windows\Controls\Primitives\Popup.cs (18)
2682SafeNativeMethods.GetMonitorInfo(new HandleRef(null, monitor), monitorInfo); 2778UnsafeNativeMethods.GetIconInfo(new HandleRef(null, hCursor), out iconInfo); 3145UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero), 3161SafeNativeMethods.GetClientRect(new HandleRef(null, parent), ref rect); 3256UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), 3257lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd), 3265UnsafeNativeMethods.ShowWindow(new HandleRef(null, Handle), NativeMethods.SW_SHOWNA); 3269UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), 3286UnsafeNativeMethods.ShowWindow(new HandleRef(null, Handle), NativeMethods.SW_HIDE); 3302IntPtr lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, Handle), NativeMethods.GW_HWNDLAST); 3308if (UnsafeNativeMethods.GetClassName(new HandleRef(null, lastHwnd), sb, NativeMethods.MAX_PATH) != 0) 3316lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, lastHwnd), NativeMethods.GW_HWNDPREV); 3352Int32 styles = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE); 3367UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(null, handle), NativeMethods.GWL_EXSTYLE, (IntPtr)styles); 3526window = UnsafeNativeMethods.GetParent(new HandleRef(null, window)); 3559return UnsafeNativeMethods.GetParent(new HandleRef(null, child)); 3788SafeNativeMethods.GetMonitorInfo(new HandleRef(null, hMonitor), info);
src\Framework\System\Windows\Controls\WebBrowser.cs (1)
126string hostProcessName = Path.GetFileName(UnsafeNativeMethods.GetModuleFileName(new HandleRef()));
src\Framework\System\windows\Documents\CaretElement.cs (1)
1019bool returnValue = UnsafeNativeMethods.CreateCaret(new HandleRef(null, hwnd), bitmap, /*width*/ 0, /*height*/ 0);
src\Framework\System\Windows\Documents\ImmComposition.cs (26)
254IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 257UnsafeNativeMethods.ImmNotifyIME(new HandleRef(this, himc), NativeMethods.NI_COMPOSITIONSTR, NativeMethods.CPS_COMPLETE, 0); 259UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 505himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 517size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0); 525UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, result, size); 534size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0); 541UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, composition, size); 548cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0); 556deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0); 564size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0); 571UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, attributes, size); 579UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 688himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 803UnsafeNativeMethods.ImmSetCandidateWindow(new HandleRef(this, himc), ref candform); 804UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 886IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 925UnsafeNativeMethods.ImmSetCompositionWindow(new HandleRef(this, himc), ref compform); 926UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1764int prop = UnsafeNativeMethods.ImmGetProperty(new HandleRef(this, SafeNativeMethods.GetKeyboardLayout(0)), NativeMethods.IGP_PROPERTY); 1934IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1943hwndDefIme = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, hwnd));
src\Framework\System\Windows\Documents\MoveSizeWinEventHandler.cs (1)
96hwndTemp = UnsafeNativeMethods.GetParent(new HandleRef(this, hwndTemp));
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
330SafeNativeMethods.GetClientRect(new HandleRef(null, hwnd), ref rc);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
666if (SafeNativeMethods.IsWindowEnabled(new HandleRef(null, helper.Handle))) 707UnsafeNativeMethods.SetForegroundWindow(new HandleRef(null, hwnd));
src\Framework\System\windows\Documents\TextEditorTyping.cs (1)
1661mouseInputPending = UnsafeNativeMethods.PeekMessage(ref message, new HandleRef(null, hwnd), WindowMessage.WM_MOUSEFIRST, WindowMessage.WM_MOUSELAST, NativeMethods.PM_NOREMOVE);
src\Framework\System\Windows\Documents\TextStore.cs (2)
824SafeNativeMethods.ScreenToClient(new HandleRef(null,win32Window.Handle), point); 2522UnsafeNativeMethods.ClientToScreen(new HandleRef(null, hwnd), /* ref by interop */ clientPoint);
src\Framework\System\Windows\Interop\ActiveXHost.cs (1)
584_axWindow = new HandleRef(this, hwnd);
src\Framework\System\Windows\Interop\HwndHost.cs (16)
521NativeMethods.RECT rcClientRTLAdjusted = PointUtil.AdjustForRightToLeft(rcClient, new HandleRef(null, hwndParent)); 697_hwnd = new HandleRef(null, IntPtr.Zero); 809new HandleRef(null, IntPtr.Zero), 902HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 905HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 906HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 967UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen); 968hdcScreen = new HandleRef(null, IntPtr.Zero); 973hBitmap = new HandleRef(this, IntPtr.Zero); 979hdcBitmap = new HandleRef(this, IntPtr.Zero); 1187BuildWindow(new HandleRef(null, hwndParent)); 1196UnsafeNativeMethods.SetParent(_hwnd, new HandleRef(null,hwndParent)); 1205UnsafeNativeMethods.SetParent(_hwnd, new HandleRef(null, hwnd.Handle)); 1246int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,_hwnd.Handle), NativeMethods.GWL_STYLE); 1327_hwnd = new HandleRef(null, IntPtr.Zero); 1350_hwnd = new HandleRef(null, IntPtr.Zero);
src\Framework\System\Windows\MessageBox.cs (1)
508MessageBoxResult result = Win32ToMessageBoxResult (UnsafeNativeMethods.MessageBox (new HandleRef (null, owner), messageBoxText, caption, style));
src\Framework\System\Windows\Shell\JumpList.cs (1)
137_FullName = UnsafeNativeMethods.GetModuleFileName(new HandleRef());
src\Framework\System\Windows\SystemParameters.cs (3)
6388HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 6405_dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 6410UnsafeNativeMethods.ReleaseDC(desktopWnd, new HandleRef(null, dc));
src\Framework\System\Windows\Window.cs (54)
359if (UnsafeNativeMethods.IsWindow( new HandleRef( null, _dialogOwnerHandle ) ) != true) 393style = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, _dialogOwnerHandle), NativeMethods.GWL_STYLE); 396_dialogOwnerHandle = UnsafeNativeMethods.GetParent(new HandleRef(null, _dialogOwnerHandle)); 497(UnsafeNativeMethods.IsWindow(new HandleRef(null, _dialogPreviousActiveHandle)) == true)) 507UnsafeNativeMethods.TrySetFocus(new HandleRef(null, _dialogPreviousActiveHandle), ref _dialogPreviousActiveHandle); 579return UnsafeNativeMethods.SetForegroundWindow(new HandleRef(null, CriticalHandle)); 2911UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 2912new HandleRef(null, IntPtr.Zero), 3004UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 3005new HandleRef(null, IntPtr.Zero), 3097UnsafeNativeMethods.SetWindowText(new HandleRef(this, CriticalHandle), title); 3117UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 3118new HandleRef(null, IntPtr.Zero), 3690if (SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWnd)) && 3691SafeNativeMethods.IsWindowEnabled(new HandleRef(null, hWnd))) 3716if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) 3721UnsafeNativeMethods.EnableWindowNoThrow(new HandleRef(null, hWnd), state); 3944if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle))) 3993SafeNativeMethods.GetMonitorInfo(new HandleRef(null, hMonitor), monitorInfo); 4004IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 4080int styleEx = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndHandle), NativeMethods.GWL_EXSTYLE); 4084UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, hwndHandle), ref wp); 4245new HandleRef(this, CriticalHandle), 4323UnsafeNativeMethods.SetWindowLong(new HandleRef(null, CriticalHandle), 4648(UnsafeNativeMethods.IsWindow(new HandleRef(this, _dialogPreviousActiveHandle)) == true)) 4650UnsafeNativeMethods.SetActiveWindow(new HandleRef(this, _dialogPreviousActiveHandle)); 5337UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 5354UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 5403HandleRef hr = new HandleRef(this, CriticalHandle); 5565UnsafeNativeMethods.SetWindowPos(new HandleRef(null, CriticalHandle), 5806UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 5813UnsafeNativeMethods.ShowWindow(new HandleRef(this, CriticalHandle), nCmd); 6191UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, CriticalHandle), ref wp); 6257UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, CriticalHandle), ref wp); 6280IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONULL); 6287SafeNativeMethods.GetMonitorInfo(new HandleRef(this, hMonitor), monitorInfo); 6528UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 6529new HandleRef(null, IntPtr.Zero), 6717UnsafeNativeMethods.PostMessage(new HandleRef(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); 6981SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref physicalClientRc); 7207UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse.Value); 7208UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse.Value); 7210UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 7865monitor = SafeNativeMethods.MonitorFromWindow( new HandleRef( this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONEAREST ); 7868SafeNativeMethods.GetMonitorInfo( new HandleRef ( this, monitor ) , monitorInfo); 7886SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref rc); 7902SafeNativeMethods.GetWindowRect(new HandleRef(this, CriticalHandle), ref rc); 7922SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref rc); 7927UnsafeNativeMethods.ClientToScreen(new HandleRef(this, _sourceWindow.CriticalHandle), pt); 8042return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE); 8061return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE); 8410var nullHandle = new HandleRef(null, IntPtr.Zero); 8417UnsafeNativeMethods.ReleaseDC(nullHandle, new HandleRef(null, hdc)); 8458new HandleRef(null, hMonitor),
System (51)
compmod\microsoft\win32\NativeMethods.cs (1)
58public readonly static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
compmod\microsoft\win32\SystemEvents.cs (21)
126if (UnsafeNativeMethods.GetUserObjectInformation(new HandleRef(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) { 414defWindowProc = UnsafeNativeMethods.GetProcAddress(new HandleRef(this, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc); 439if (!UnsafeNativeMethods.GetClassInfo(new HandleRef(this, hInstance), WndClass.lpszClassName, wndclassi)) { 455if (0 != UnsafeNativeMethods.UnregisterClass(WndClass.lpszClassName, new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)))) { 476new HandleRef(this, hInstance), null); 493IntPtr timerId = UnsafeNativeMethods.SendMessage(new HandleRef(systemEvents, systemEvents.windowHandle), 508UnsafeNativeMethods.WTSUnRegisterSessionNotification(new HandleRef(systemEvents, systemEvents.windowHandle)); 514HandleRef href = new HandleRef(this, handle); 519UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, DefWndProc)); 536UnsafeNativeMethods.UnregisterClass(className, new HandleRef(this, hInstance)); 608UnsafeNativeMethods.WTSRegisterSessionNotification(new HandleRef(systemEvents, systemEvents.windowHandle), NativeMethods.NOTIFY_FOR_THIS_SESSION); 610SafeNativeMethods.FreeLibrary(new HandleRef(null, retval)); 833UnsafeNativeMethods.PostMessage(new HandleRef(systemEvents, systemEvents.windowHandle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 843int res = (int) UnsafeNativeMethods.SendMessage(new HandleRef(systemEvents, systemEvents.windowHandle), 857IntPtr res = UnsafeNativeMethods.SetTimer(new HandleRef(this, windowHandle), new HandleRef(this, timerId), (int) wParam, NativeMethods.NullHandleRef); 891bool res = UnsafeNativeMethods.KillTimer(new HandleRef(this, windowHandle), new HandleRef(this, wParam)); 1414UnsafeNativeMethods.PostMessage(new HandleRef(systemEvents, systemEvents.windowHandle), NativeMethods.WM_QUIT, IntPtr.Zero, IntPtr.Zero); 1450UnsafeNativeMethods.PostMessage(new HandleRef(this, windowHandle), NativeMethods.WM_REFLECT + msg, wParam, newStringPtr); 1463UnsafeNativeMethods.PostMessage(new HandleRef(this, windowHandle), NativeMethods.WM_REFLECT + msg, wParam, lParam);
compmod\system\codedom\compiler\Executor.cs (1)
261new HandleRef(null, environmentPtr), // IntPtr lpEnvironment,
services\io\system\io\FileSystemWatcher.cs (1)
730new HandleRef(this, (IntPtr) buffPtr),
services\monitoring\system\diagnosticts\EventLogInternal.cs (1)
1719sid, (short) strings.Length, rawData.Length, new HandleRef(this, stringsRootHandle.AddrOfPinnedObject()), rawData);
services\monitoring\system\diagnosticts\FileVersionInfo.cs (4)
330if (UnsafeNativeMethods.VerQueryValue(new HandleRef(null, memPtr), "\\", ref memRef, out memLen)) { 355if (UnsafeNativeMethods.VerQueryValue(new HandleRef(null, memPtr), name, ref memRef, out memLen)) { 370if (UnsafeNativeMethods.VerQueryValue(new HandleRef(null, memPtr), "\\VarFileInfo\\Translation", ref memRef, out memLen)) { 467if (UnsafeNativeMethods.GetFileVersionInfo(fileName, 0, infoSize, new HandleRef(null, memIntPtr))) {
services\monitoring\system\diagnosticts\Process.cs (9)
457int length = NativeMethods.GetWindowTextLength(new HandleRef(this, handle)) * 2; 459NativeMethods.GetWindowText(new HandleRef(this, handle), builder, builder.Capacity); 953responding = NativeMethods.SendMessageTimeout(new HandleRef(this, mainWindow), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, NativeMethods.SMTO_ABORTIFHUNG, 5000, out result) != (IntPtr)0; 1242int style = NativeMethods.GetWindowLong(new HandleRef(this, mainWindowHandle), NativeMethods.GWL_STYLE); 1244NativeMethods.PostMessage(new HandleRef(this, mainWindowHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 1468if (!NativeMethods.OpenProcessToken(new HandleRef(null, processHandle), NativeMethods.TOKEN_ADJUST_PRIVILEGES, out hToken)) { 1481NativeMethods.AdjustTokenPrivileges(new HandleRef(null, hToken), false, tkp, 0, IntPtr.Zero, IntPtr.Zero); 1927if (!NativeMethods.DuplicateHandle(new HandleRef(this, NativeMethods.GetCurrentProcess()), 1929new HandleRef(this, NativeMethods.GetCurrentProcess()),
services\monitoring\system\diagnosticts\ProcessManager.cs (10)
49if (NativeMethods.GetWindow(new HandleRef(this, handle), NativeMethods.GW_OWNER) != (IntPtr)0 || !NativeMethods.IsWindowVisible(new HandleRef(this, handle))) 70NativeMethods.GetWindowThreadProcessId(new HandleRef(this, handle), out processId); 108new HandleRef(null, NativeMethods.GetCurrentProcess()), 120NativeMethods.AdjustTokenPrivileges(new HandleRef(null,tokenHandle), false, tp, 0, IntPtr.Zero, IntPtr.Zero); 365HandleRef handleRef = new HandleRef(null, handle); 435HandleRef handleRef = new HandleRef(null, handle); 669if (!NativeMethods.GetModuleInformation(processHandle, new HandleRef(null, moduleHandle), ntModuleInfo, Marshal.SizeOf(ntModuleInfo))) 676ret = NativeMethods.GetModuleBaseName(processHandle, new HandleRef(null, moduleHandle), baseName, baseName.Capacity * 2); 681ret = NativeMethods.GetModuleFileNameEx(processHandle, new HandleRef(null, moduleHandle), fileName, fileName.Capacity * 2);
services\monitoring\system\diagnosticts\ProcessThread.cs (1)
360if (NativeMethods.SetThreadAffinityMask(threadHandle, new HandleRef(this, value)) == IntPtr.Zero) {
services\monitoring\system\diagnosticts\processwaithandle.cs (2)
16new HandleRef(this, NativeMethods.GetCurrentProcess()), 18new HandleRef(this, NativeMethods.GetCurrentProcess()),
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (3)
26Win32Interop.SetWindowLongPtr(new HandleRef(window, hwnd), Win32Interop.GWL_EXSTYLE, exStyle); 47Win32Interop.SetWindowLongPtr(new HandleRef(window, hwnd), Win32Interop.GWL_STYLE, style); 76Win32Interop.SetWindowLongPtr(new HandleRef(window, hwnd), Win32Interop.GWL_EXSTYLE, exStyle);
System.Configuration (1)
System\Configuration\ClientConfigPaths.cs (1)
118while (((length = UnsafeNativeMethods.GetModuleFileName(new HandleRef(null, IntPtr.Zero), sb, sb.Capacity)) == sb.Capacity)
System.Data (2)
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
1859static internal readonly HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
fx\src\data\System\Data\Odbc\OdbcUtils.cs (1)
324return new HandleRef(this, ptr);
System.Drawing (1052)
commonui\System\Drawing\Advanced\AdjustableArrowCap.cs (8)
65int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapHeight(new HandleRef(this, nativeCap), height); 74int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapHeight(new HandleRef(this, nativeCap), out height); 94int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapWidth(new HandleRef(this, nativeCap), width); 103int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapWidth(new HandleRef(this, nativeCap), out width); 123int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapMiddleInset(new HandleRef(this, nativeCap), middleInset); 132int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapMiddleInset(new HandleRef(this, nativeCap), out middleInset); 154int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapFillState(new HandleRef(this, nativeCap), isFilled); 163int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapFillState(new HandleRef(this, nativeCap), out isFilled);
commonui\System\Drawing\Advanced\CustomLineCap.cs (16)
87new HandleRef(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath.nativePath), 88new HandleRef(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath.nativePath), 155int status = SafeNativeMethods.Gdip.GdipCloneCustomLineCap(new HandleRef(this, nativeCap), out cloneCap); 167int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapType(new HandleRef(null, cap), out capType); 171SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(null, cap)); 184SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(null, cap)); 194int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeCaps(new HandleRef(this, nativeCap), startCap, endCap); 206int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeCaps(new HandleRef(this, nativeCap), out startCap, out endCap); 214int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeJoin(new HandleRef(this, nativeCap), lineJoin); 224int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeJoin(new HandleRef(this, nativeCap), out lineJoin); 244int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseCap(new HandleRef(this, nativeCap), baseCap); 253int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseCap(new HandleRef(this, nativeCap), out baseCap); 273int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseInset(new HandleRef(this, nativeCap), inset); 282int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseInset(new HandleRef(this, nativeCap), out inset); 303int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapWidthScale(new HandleRef(this, nativeCap), widthScale); 312int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapWidthScale(new HandleRef(this, nativeCap), out widthScale);
commonui\System\Drawing\Advanced\Font.cs (24)
65new HandleRef(this, this.fontFamily.NativeFamily), 315status = SafeNativeMethods.Gdip.GdipGetFontUnit(new HandleRef(this, nativeFont), out unit); 320status = SafeNativeMethods.Gdip.GdipGetFontSize(new HandleRef(this, nativeFont), out size); 325status = SafeNativeMethods.Gdip.GdipGetFontStyle(new HandleRef(this, nativeFont), out style); 330status = SafeNativeMethods.Gdip.GdipGetFamily(new HandleRef(this, nativeFont), out nativeFamily); 390status = SafeNativeMethods.Gdip.GdipGetFontSize(new HandleRef(this, this.nativeFont), out this.fontSize); 407SafeNativeMethods.GetObject(new HandleRef(null, hfont), lf); 415UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 435UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 454status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontA(new HandleRef(null, hdc), lf, out font); 456status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(new HandleRef(null, hdc), lf, out font); 491int status = SafeNativeMethods.Gdip.GdipCreateFontFromDC(new HandleRef(null, hdc), ref font); 513int status = SafeNativeMethods.Gdip.GdipCloneFont(new HandleRef(this, nativeFont), out cloneFont); 590SafeNativeMethods.Gdip.GdipDeleteFont(new HandleRef(this, this.nativeFont)); 815UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 833status = SafeNativeMethods.Gdip.GdipGetLogFontA(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), logFont); 835status = SafeNativeMethods.Gdip.GdipGetLogFontW(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), logFont); 917int status = SafeNativeMethods.Gdip.GdipGetFontHeight(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), out ht); 940UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 954int status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(new HandleRef(this, this.NativeFont), dpi, out ht); 1013UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
commonui\System\Drawing\Advanced\FontCollection.cs (3)
59int status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyCount(new HandleRef(this, nativeFontCollection), out numSought); 68status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyList(new HandleRef(this, nativeFontCollection), numSought, gpfamilies, 79SafeNativeMethods.Gdip.GdipCloneFontFamily(new HandleRef(null, (IntPtr)gpfamilies[f]), out native);
commonui\System\Drawing\Advanced\FontFamily.cs (8)
126int status = SafeNativeMethods.Gdip.GdipCreateFontFamilyFromName(name, new HandleRef(fontCollection, nativeFontCollection), out fontfamily); 280SafeNativeMethods.Gdip.GdipDeleteFontFamily(new HandleRef(this, this.nativeFamily)); 325int status = SafeNativeMethods.Gdip.GdipGetFamilyName(new HandleRef(this, this.NativeFamily), name, language); 453int status = SafeNativeMethods.Gdip.GdipIsStyleAvailable(new HandleRef(this, this.NativeFamily), style, out bresult); 469int status = SafeNativeMethods.Gdip.GdipGetEmHeight(new HandleRef(this, this.NativeFamily), style, out result); 487int status = SafeNativeMethods.Gdip.GdipGetCellAscent(new HandleRef(this, this.NativeFamily), style, out result); 504int status = SafeNativeMethods.Gdip.GdipGetCellDescent(new HandleRef(this, this.NativeFamily), style, out result); 520int status = SafeNativeMethods.Gdip.GdipGetLineSpacing(new HandleRef(this, this.NativeFamily), style, out result);
commonui\System\Drawing\Advanced\Gdiplus.cs (6)
4144int result = GetClipRgn(new HandleRef(null, hDC), new HandleRef(null, hTempRgn)); 4152DeleteObject(new HandleRef(null, hTempRgn)); 4159SelectClipRgn(new HandleRef(null, hDC), new HandleRef(null, hRgn)); 4163DeleteObject(new HandleRef(null, hRgn));
commonui\System\Drawing\Advanced\GraphicsPath.cs (107)
108int status = SafeNativeMethods.Gdip.GdipCreatePath2(new HandleRef(null, ptbuf), new HandleRef(null, typebuf), count, 161int status = SafeNativeMethods.Gdip.GdipCreatePath2I(new HandleRef(null, ptbuf), new HandleRef(null, typebuf), count, 185int status = SafeNativeMethods.Gdip.GdipClonePath(new HandleRef(this, nativePath), out clonePath); 223SafeNativeMethods.Gdip.GdipDeletePath(new HandleRef(this, nativePath)); 260int status = SafeNativeMethods.Gdip.GdipResetPath(new HandleRef(this, nativePath)); 278int status = SafeNativeMethods.Gdip.GdipGetPathFillMode(new HandleRef(this, nativePath), out fillmode); 293int status = SafeNativeMethods.Gdip.GdipSetPathFillMode(new HandleRef(this, nativePath), (int) value); 321int status = SafeNativeMethods.Gdip.GdipGetPathData(new HandleRef(this, nativePath), memoryPathData); 359int status = SafeNativeMethods.Gdip.GdipStartPathFigure(new HandleRef(this, nativePath)); 373int status = SafeNativeMethods.Gdip.GdipClosePathFigure(new HandleRef(this, nativePath)); 386int status = SafeNativeMethods.Gdip.GdipClosePathFigures(new HandleRef(this, nativePath)); 399int status = SafeNativeMethods.Gdip.GdipSetPathMarker(new HandleRef(this, nativePath)); 410int status = SafeNativeMethods.Gdip.GdipClearPathMarkers(new HandleRef(this, nativePath)); 421int status = SafeNativeMethods.Gdip.GdipReversePath(new HandleRef(this, nativePath)); 434int status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(new HandleRef(this, nativePath), gppt); 489int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(new HandleRef(this, nativePath), 492new HandleRef(graphics, (graphics != null) ? 542int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(new HandleRef(this, nativePath), 545new HandleRef(graphics, (graphics != null) ? 603int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(new HandleRef(this, nativePath), 606new HandleRef(pen, pen.NativePen), 607new HandleRef(graphics, (graphics != null) ? 666int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(new HandleRef(this, nativePath), 669new HandleRef(pen, pen.NativePen), 670new HandleRef(graphics, (graphics != null) ? 697int status = SafeNativeMethods.Gdip.GdipAddPathLine(new HandleRef(this, nativePath), x1, y1, x2, y2); 713int status = SafeNativeMethods.Gdip.GdipAddPathLine2(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 740int status = SafeNativeMethods.Gdip.GdipAddPathLineI(new HandleRef(this, nativePath), x1, y1, x2, y2); 757int status = SafeNativeMethods.Gdip.GdipAddPathLine2I(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 788int status = SafeNativeMethods.Gdip.GdipAddPathArc(new HandleRef(this, nativePath), x, y, width, height, 814int status = SafeNativeMethods.Gdip.GdipAddPathArcI(new HandleRef(this, nativePath), x, y, width, height, 845int status = SafeNativeMethods.Gdip.GdipAddPathBezier(new HandleRef(this, nativePath), x1, y1, x2, y2, 864int status = SafeNativeMethods.Gdip.GdipAddPathBeziers(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 892int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(new HandleRef(this, nativePath), x1, y1, x2, y2, 911int status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 936int status = SafeNativeMethods.Gdip.GdipAddPathCurve(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 953int status = SafeNativeMethods.Gdip.GdipAddPathCurve2(new HandleRef(this, nativePath), new HandleRef(null, buf), 974int status = SafeNativeMethods.Gdip.GdipAddPathCurve3(new HandleRef(this, nativePath), new HandleRef(null, buf), 997int status = SafeNativeMethods.Gdip.GdipAddPathCurveI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1016int status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(new HandleRef(this, nativePath), new HandleRef(null, buf), 1037int status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(new HandleRef(this, nativePath), new HandleRef(null, buf), 1060int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1080int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length, tension); 1101int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1121int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length, tension); 1134int status = SafeNativeMethods.Gdip.GdipAddPathRectangle(new HandleRef(this, nativePath), rect.X, rect.Y, 1153int status = SafeNativeMethods.Gdip.GdipAddPathRectangles(new HandleRef(this, nativePath), new HandleRef(null, buf), rects.Length); 1169int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(new HandleRef(this, nativePath), rect.X, rect.Y, 1187int status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(new HandleRef(this, nativePath), new HandleRef(null, buf), rects.Length); 1215int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(new HandleRef(this, nativePath), x, y, width, height); 1245int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(new HandleRef(this, nativePath), x, y, width, height); 1272int status = SafeNativeMethods.Gdip.GdipAddPathPie(new HandleRef(this, nativePath), x, y, width, height, 1289int status = SafeNativeMethods.Gdip.GdipAddPathPieI(new HandleRef(this, nativePath), x, y, width, height, 1306int status = SafeNativeMethods.Gdip.GdipAddPathPolygon(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1324int status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1342int status = SafeNativeMethods.Gdip.GdipAddPathPath(new HandleRef(this, nativePath), new HandleRef(addingPath, addingPath.nativePath), connect); 1365int status = SafeNativeMethods.Gdip.GdipAddPathString(new HandleRef(this, nativePath), 1368new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1372new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1388int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new HandleRef(this, nativePath), 1391new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1395new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1410int status = SafeNativeMethods.Gdip.GdipAddPathString(new HandleRef(this, nativePath), 1413new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1417new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1432int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new HandleRef(this, nativePath), 1435new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1439new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1457int status = SafeNativeMethods.Gdip.GdipTransformPath(new HandleRef(this, nativePath), 1458new HandleRef(matrix, matrix.nativeMatrix)); 1503int status = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(new HandleRef(this, nativePath), 1505new HandleRef(matrix, nativeMatrix), 1506new HandleRef(pen, nativePen)); 1543int status = SafeNativeMethods.Gdip.GdipFlattenPath(new HandleRef(this, nativePath), 1544new HandleRef(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix), 1598SafeNativeMethods.Gdip.GdipGetPointCount(new HandleRef(this, nativePath), out pointCount); 1603int status = SafeNativeMethods.Gdip.GdipWidenPath(new HandleRef(this, nativePath), 1604new HandleRef(pen, pen.NativePen), 1605new HandleRef(matrix, nativeMatrix), 1650int status = SafeNativeMethods.Gdip.GdipWarpPath(new HandleRef(this, nativePath), 1651new HandleRef(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix), 1652new HandleRef(null, buf), 1678int status = SafeNativeMethods.Gdip.GdipGetPointCount(new HandleRef(this, nativePath), out count); 1700int status = SafeNativeMethods.Gdip.GdipGetPathTypes(new HandleRef(this, nativePath), types, count); 1725int status = SafeNativeMethods.Gdip.GdipGetPathPoints(new HandleRef(this, nativePath), new HandleRef(null, buf), count);
commonui\System\Drawing\Advanced\GraphicsPathIterator.cs (15)
43int status = SafeNativeMethods.Gdip.GdipCreatePathIter(out nativeIter, new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 70SafeNativeMethods.Gdip.GdipDeletePathIter(new HandleRef(this, nativeIter)); 110int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpath(new HandleRef(this, nativeIter), out resultCount, 132int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpathPath(new HandleRef(this, nativeIter), out resultCount, 133new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath), out isClosed); 151int status = SafeNativeMethods.Gdip.GdipPathIterNextPathType(new HandleRef(this, nativeIter), out resultCount, 170int status = SafeNativeMethods.Gdip.GdipPathIterNextMarker(new HandleRef(this, nativeIter), out resultCount, 189int status = SafeNativeMethods.Gdip.GdipPathIterNextMarkerPath(new HandleRef(this, nativeIter), out resultCount, 190new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 206int status = SafeNativeMethods.Gdip.GdipPathIterGetCount(new HandleRef(this, nativeIter), out resultCount); 223int status = SafeNativeMethods.Gdip.GdipPathIterGetSubpathCount(new HandleRef(this, nativeIter), out resultCount); 240int status = SafeNativeMethods.Gdip.GdipPathIterHasCurve(new HandleRef(this, nativeIter), out hasCurve); 254int status = SafeNativeMethods.Gdip.GdipPathIterRewind(new HandleRef(this, nativeIter)); 276int status = SafeNativeMethods.Gdip.GdipPathIterEnumerate(new HandleRef(this, nativeIter), out resultCount, 318int status = SafeNativeMethods.Gdip.GdipPathIterCopyData(new HandleRef(this, nativeIter), out resultCount,
commonui\System\Drawing\Advanced\HatchBrush.cs (4)
82int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 102int status = SafeNativeMethods.Gdip.GdipGetHatchStyle(new HandleRef(this, this.NativeBrush), out hatchStyle); 121int status = SafeNativeMethods.Gdip.GdipGetHatchForegroundColor(new HandleRef(this, this.NativeBrush), out forecol); 142int status = SafeNativeMethods.Gdip.GdipGetHatchBackgroundColor(new HandleRef(this, this.NativeBrush), out backcol);
commonui\System\Drawing\Advanced\ImageAttributes.cs (23)
107SafeNativeMethods.Gdip.GdipDisposeImageAttributes(new HandleRef(this, nativeImageAttributes)); 146new HandleRef(this, nativeImageAttributes), 216new HandleRef(this, nativeImageAttributes), 246new HandleRef(this, nativeImageAttributes), 286new HandleRef(this, nativeImageAttributes), 313new HandleRef(this, nativeImageAttributes), 338new HandleRef(this, nativeImageAttributes), 363new HandleRef(this, nativeImageAttributes), 388new HandleRef(this, nativeImageAttributes), 413new HandleRef(this, nativeImageAttributes), 437new HandleRef(this, nativeImageAttributes), 464new HandleRef(this, nativeImageAttributes), 491new HandleRef(this, nativeImageAttributes), 517new HandleRef(this, nativeImageAttributes), 542new HandleRef(this, nativeImageAttributes), 570new HandleRef(this, nativeImageAttributes), 595new HandleRef(this, nativeImageAttributes), 630new HandleRef(this, nativeImageAttributes), 634new HandleRef(null, memory)); 661new HandleRef(this, nativeImageAttributes), 714new HandleRef(this, nativeImageAttributes), 733new HandleRef(this, nativeImageAttributes), new HandleRef(null, memory), type);
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (30)
277int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 291int status = SafeNativeMethods.Gdip.GdipSetLineColors(new HandleRef(this, this.NativeBrush), 308int status = SafeNativeMethods.Gdip.GdipGetLineColors(new HandleRef(this, this.NativeBrush), colors); 338int status = SafeNativeMethods.Gdip.GdipGetLineRect(new HandleRef(this, this.NativeBrush), ref rect); 370int status = SafeNativeMethods.Gdip.GdipGetLineGammaCorrection(new HandleRef(this, this.NativeBrush), 378int status = SafeNativeMethods.Gdip.GdipSetLineGammaCorrection(new HandleRef(this, this.NativeBrush), 408int status = SafeNativeMethods.Gdip.GdipGetLineBlendCount(new HandleRef(this, this.NativeBrush), out retval); 429status = SafeNativeMethods.Gdip.GdipGetLineBlend(new HandleRef(this, this.NativeBrush), factors, positions, count); 472int status = SafeNativeMethods.Gdip.GdipSetLineBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, factors), new HandleRef(null, positions), count); 520int status = SafeNativeMethods.Gdip.GdipSetLineSigmaBlend(new HandleRef(this, this.NativeBrush), focus, scale); 545int status = SafeNativeMethods.Gdip.GdipSetLineLinearBlend(new HandleRef(this, this.NativeBrush), focus, scale); 565int status = SafeNativeMethods.Gdip.GdipGetLinePresetBlendCount(new HandleRef(this, this.NativeBrush), out retval); 585status = SafeNativeMethods.Gdip.GdipGetLinePresetBlend(new HandleRef(this, this.NativeBrush), colors, positions, count); 671int status = SafeNativeMethods.Gdip.GdipSetLinePresetBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, colors), new HandleRef(null, positions), count); 704int status = SafeNativeMethods.Gdip.GdipSetLineWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 713int status = SafeNativeMethods.Gdip.GdipGetLineWrapMode(new HandleRef(this, this.NativeBrush), out mode); 751int status = SafeNativeMethods.Gdip.GdipSetLineTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 762int status = SafeNativeMethods.Gdip.GdipGetLineTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 788int status = SafeNativeMethods.Gdip.GdipResetLineTransform(new HandleRef(this, this.NativeBrush)); 819int status = SafeNativeMethods.Gdip.GdipMultiplyLineTransform(new HandleRef(this, this.NativeBrush), 820new HandleRef(matrix, matrix.nativeMatrix), 844int status = SafeNativeMethods.Gdip.GdipTranslateLineTransform(new HandleRef(this, this.NativeBrush), 869int status = SafeNativeMethods.Gdip.GdipScaleLineTransform(new HandleRef(this, this.NativeBrush), 895int status = SafeNativeMethods.Gdip.GdipRotateLineTransform(new HandleRef(this, this.NativeBrush),
commonui\System\Drawing\Advanced\Matrix.cs (32)
94int status = SafeNativeMethods.Gdip.GdipCreateMatrix3(ref gprectf, new HandleRef(null, buf), out matrix); 129int status = SafeNativeMethods.Gdip.GdipCreateMatrix3I(ref gprect, new HandleRef(null, buf), out matrix); 154SafeNativeMethods.Gdip.GdipDeleteMatrix(new HandleRef(this, nativeMatrix)); 175int status = SafeNativeMethods.Gdip.GdipCloneMatrix(new HandleRef(this, nativeMatrix), out cloneMatrix); 196int status = SafeNativeMethods.Gdip.GdipGetMatrixElements(new HandleRef(this, nativeMatrix), buf); 238int status = SafeNativeMethods.Gdip.GdipSetMatrixElements(new HandleRef(this, nativeMatrix), 268int status = SafeNativeMethods.Gdip.GdipMultiplyMatrix(new HandleRef(this, nativeMatrix), new HandleRef(matrix, matrix.nativeMatrix), 295int status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), 319int status = SafeNativeMethods.Gdip.GdipScaleMatrix(new HandleRef(this, nativeMatrix), scaleX, scaleY, order); 345int status = SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 375status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), point.X, point.Y, order); 376status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 377status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), -point.X, -point.Y, order); 380status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), -point.X, -point.Y, order); 381status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 382status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), point.X, point.Y, order); 395int status = SafeNativeMethods.Gdip.GdipShearMatrix(new HandleRef(this, nativeMatrix), shearX, shearY, MatrixOrder.Prepend); 409int status = SafeNativeMethods.Gdip.GdipShearMatrix(new HandleRef(this, nativeMatrix), shearX, shearY, order); 421int status = SafeNativeMethods.Gdip.GdipInvertMatrix(new HandleRef(this, nativeMatrix)); 441int status = SafeNativeMethods.Gdip.GdipTransformMatrixPoints(new HandleRef(this, nativeMatrix), 442new HandleRef(null, buf), 473int status = SafeNativeMethods.Gdip.GdipTransformMatrixPointsI(new HandleRef(this, nativeMatrix), 474new HandleRef(null, buf), 505int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPoints(new HandleRef(this, nativeMatrix), 506new HandleRef(null, buf), 546int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPointsI(new HandleRef(this, nativeMatrix), 547new HandleRef(null, buf), 575int status = SafeNativeMethods.Gdip.GdipIsMatrixInvertible(new HandleRef(this, nativeMatrix), out isInvertible); 592int status = SafeNativeMethods.Gdip.GdipIsMatrixIdentity(new HandleRef(this, nativeMatrix), out isIdentity); 615int status = SafeNativeMethods.Gdip.GdipIsMatrixEqual(new HandleRef(this, nativeMatrix), 616new HandleRef(matrix2, matrix2.nativeMatrix),
commonui\System\Drawing\Advanced\Metafile.cs (19)
68int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromWmf(new HandleRef(null, hmetafile), deleteWmf, wmfHeader, out metafile); 94int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(new HandleRef(null, henhmetafile), deleteEmf, out metafile); 172int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 237int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 303status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 312status = SafeNativeMethods.Gdip.GdipRecordMetafileI(new HandleRef(null, referenceHdc), 363int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, new HandleRef(null, referenceHdc), 442new HandleRef(null, referenceHdc), 525new HandleRef(null, referenceHdc), 535new HandleRef(null, referenceHdc), 587new HandleRef(null, referenceHdc), 654new HandleRef(null, referenceHdc), 725new HandleRef(null, referenceHdc), 735new HandleRef(null, referenceHdc), 773int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromWmf(new HandleRef(null, hmetafile), wmfHeader, header.wmf); 796int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(new HandleRef(null, henhmetafile), header.emf); 913int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromMetafile(new HandleRef(this, nativeImage), memory); 956int status = SafeNativeMethods.Gdip.GdipGetHemfFromMetafile(new HandleRef(this, nativeImage), out hEmf); 977int status = SafeNativeMethods.Gdip.GdipPlayMetafileRecord(new HandleRef(this, nativeImage),
commonui\System\Drawing\Advanced\PathGradientBrush.cs (39)
67int status = SafeNativeMethods.Gdip.GdipCreatePathGradient(new HandleRef(null, pointsBuf), 127int status = SafeNativeMethods.Gdip.GdipCreatePathGradientI(new HandleRef(null, pointsBuf), 164int status = SafeNativeMethods.Gdip.GdipCreatePathGradientFromPath(new HandleRef(path, path.nativePath), 191int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 212int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterColor(new HandleRef(this, this.NativeBrush), out argb); 221int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterColor(new HandleRef(this, this.NativeBrush), value.ToArgb()); 238int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new HandleRef(this, this.NativeBrush), 252status = SafeNativeMethods.Gdip.GdipSetPathGradientSurroundColorsWithCount(new HandleRef(this, this.NativeBrush), 264int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new HandleRef(this, this.NativeBrush), 272status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorsWithCount(new HandleRef(this, this.NativeBrush), 315int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterPoint(new HandleRef(this, this.NativeBrush), point); 324int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterPoint(new HandleRef(this, this.NativeBrush), new GPPOINTF(value)); 337int status = SafeNativeMethods.Gdip.GdipGetPathGradientRect(new HandleRef(this, this.NativeBrush), ref rect); 364int status = SafeNativeMethods.Gdip.GdipGetPathGradientBlendCount(new HandleRef(this, this.NativeBrush), out retval); 384status = SafeNativeMethods.Gdip.GdipGetPathGradientBlend(new HandleRef(this, this.NativeBrush), factors, positions, count); 429int status = SafeNativeMethods.Gdip.GdipSetPathGradientBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, factors), new HandleRef(null, positions), count); 481int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, this.NativeBrush), focus, scale); 506int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, this.NativeBrush), focus, scale); 521int status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlendCount(new HandleRef(this, this.NativeBrush), out retval); 548status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlend(new HandleRef(this, this.NativeBrush), colors, positions, count); 605int status = SafeNativeMethods.Gdip.GdipSetPathGradientPresetBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, colors), new HandleRef(null, positions), count); 641int status = SafeNativeMethods.Gdip.GdipSetPathGradientTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 650int status = SafeNativeMethods.Gdip.GdipGetPathGradientTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 679int status = SafeNativeMethods.Gdip.GdipResetPathGradientTransform(new HandleRef(this, this.NativeBrush)); 709int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new HandleRef(this, this.NativeBrush), 710new HandleRef(matrix, matrix.nativeMatrix), 738int status = SafeNativeMethods.Gdip.GdipTranslatePathGradientTransform(new HandleRef(this, this.NativeBrush), 766int status = SafeNativeMethods.Gdip.GdipScalePathGradientTransform(new HandleRef(this, this.NativeBrush), 794int status = SafeNativeMethods.Gdip.GdipRotatePathGradientTransform(new HandleRef(this, this.NativeBrush), 815int status = SafeNativeMethods.Gdip.GdipGetPathGradientFocusScales(new HandleRef(this, this.NativeBrush), scaleX, scaleY); 823int status = SafeNativeMethods.Gdip.GdipSetPathGradientFocusScales(new HandleRef(this, this.NativeBrush), value.X, value.Y); 834int status = SafeNativeMethods.Gdip.GdipSetPathGradientWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 843int status = SafeNativeMethods.Gdip.GdipGetPathGradientWrapMode(new HandleRef(this, this.NativeBrush), out mode);
commonui\System\Drawing\Advanced\PrivateFontCollection.cs (3)
99int status = SafeNativeMethods.Gdip.GdipPrivateAddFontFile(new HandleRef(this, nativeFontCollection), filename); 125int status = SafeNativeMethods.Gdip.GdipPrivateAddMemoryFont(new HandleRef(this, nativeFontCollection), new HandleRef(null, memory), length);
commonui\System\Drawing\Advanced\SafeCustomLineCapHandle.cs (1)
35status = SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(this, handle));
commonui\System\Drawing\Advanced\StringFormat.cs (20)
164int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new HandleRef(format, format.nativeFormat), out nativeFormat); 187SafeNativeMethods.Gdip.GdipDeleteStringFormat(new HandleRef(this, nativeFormat)); 214int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new HandleRef(this, nativeFormat), out cloneFormat); 233int status = SafeNativeMethods.Gdip.GdipGetStringFormatFlags(new HandleRef(this, nativeFormat), out format); 242int status = SafeNativeMethods.Gdip.GdipSetStringFormatFlags(new HandleRef(this, nativeFormat), value); 258int status = SafeNativeMethods.Gdip.GdipSetStringFormatMeasurableCharacterRanges(new HandleRef(this, nativeFormat), ranges.Length, ranges); 274int status = SafeNativeMethods.Gdip.GdipGetStringFormatAlign(new HandleRef(this, nativeFormat), out alignment); 289int status = SafeNativeMethods.Gdip.GdipSetStringFormatAlign(new HandleRef(this, nativeFormat), value); 305int status = SafeNativeMethods.Gdip.GdipGetStringFormatLineAlign(new HandleRef(this, nativeFormat), out alignment); 318int status = SafeNativeMethods.Gdip.GdipSetStringFormatLineAlign(new HandleRef(this, nativeFormat), value); 335int status = SafeNativeMethods.Gdip.GdipGetStringFormatHotkeyPrefix(new HandleRef(this, nativeFormat), out hotkeyPrefix); 350int status = SafeNativeMethods.Gdip.GdipSetStringFormatHotkeyPrefix(new HandleRef(this, nativeFormat), value); 365int status = SafeNativeMethods.Gdip.GdipSetStringFormatTabStops(new HandleRef(this, nativeFormat), firstTabOffset, tabStops.Length, tabStops); 378int status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStopCount(new HandleRef(this, nativeFormat), out count); 384status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStops(new HandleRef(this, nativeFormat), count, out firstTabOffset, tabStops); 404int status = SafeNativeMethods.Gdip.GdipGetStringFormatTrimming(new HandleRef(this, nativeFormat), out trimming); 418int status = SafeNativeMethods.Gdip.GdipSetStringFormatTrimming(new HandleRef(this, nativeFormat), value); 483int status = SafeNativeMethods.Gdip.GdipSetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), language, substitute); 499int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), out lang, out digitSubstitute); 517int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), out language, out digitSubstitute);
commonui\System\Drawing\Advanced\TextureBrush.cs (21)
83int status = SafeNativeMethods.Gdip.GdipCreateTexture(new HandleRef(image, image.nativeImage), 121int status = SafeNativeMethods.Gdip.GdipCreateTexture2(new HandleRef(image, image.nativeImage), 163int status = SafeNativeMethods.Gdip.GdipCreateTexture2I(new HandleRef(image, image.nativeImage), 218int status = SafeNativeMethods.Gdip.GdipCreateTextureIA(new HandleRef(image, image.nativeImage), 219new HandleRef(imageAttr, (imageAttr == null) ? 273int status = SafeNativeMethods.Gdip.GdipCreateTextureIAI(new HandleRef(image, image.nativeImage), 274new HandleRef(imageAttr, (imageAttr == null) ? 307int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 320int status = SafeNativeMethods.Gdip.GdipSetTextureTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 329int status = SafeNativeMethods.Gdip.GdipGetTextureTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 361int status = SafeNativeMethods.Gdip.GdipSetTextureWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 371int status = SafeNativeMethods.Gdip.GdipGetTextureWrapMode(new HandleRef(this, this.NativeBrush), out mode); 414int status = SafeNativeMethods.Gdip.GdipGetTextureImage(new HandleRef(this, this.NativeBrush), out image); 433int status = SafeNativeMethods.Gdip.GdipResetTextureTransform(new HandleRef(this, this.NativeBrush)); 463int status = SafeNativeMethods.Gdip.GdipMultiplyTextureTransform(new HandleRef(this, this.NativeBrush), 464new HandleRef(matrix, matrix.nativeMatrix), 491int status = SafeNativeMethods.Gdip.GdipTranslateTextureTransform(new HandleRef(this, this.NativeBrush), 520int status = SafeNativeMethods.Gdip.GdipScaleTextureTransform(new HandleRef(this, this.NativeBrush), 549int status = SafeNativeMethods.Gdip.GdipRotateTextureTransform(new HandleRef(this, this.NativeBrush),
commonui\System\Drawing\Bitmap.cs (24)
70status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 73SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 112status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 115SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 144status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 147SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 179status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 182SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 218status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 221SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 244int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, unchecked((int) format), new HandleRef(null, scan0), out bitmap); 297int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, new HandleRef(g, g.NativeGraphics), out bitmap); 358int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(new HandleRef(null, hicon), out bitmap); 379int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(new HandleRef(null, hinstance), 380new HandleRef(null, name), 421int status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(new HandleRef(this, nativeImage), out hBitmap, 444int status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(new HandleRef(this, nativeImage), out hIcon); 502new HandleRef(this, nativeImage), 536new HandleRef(this, nativeImage), 647int status = SafeNativeMethods.Gdip.GdipBitmapLockBits(new HandleRef(this, nativeImage), ref gprect, 663int status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(new HandleRef(this, nativeImage), bitmapdata); 688int status = SafeNativeMethods.Gdip.GdipBitmapGetPixel(new HandleRef(this, nativeImage), x, y, out color); 715int status = SafeNativeMethods.Gdip.GdipBitmapSetPixel(new HandleRef(this, nativeImage), x, y, color.ToArgb()); 727int status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(new HandleRef(this, nativeImage), xDpi, yDpi);
commonui\System\Drawing\Brush.cs (1)
104SafeNativeMethods.Gdip.GdipDeleteBrush(new HandleRef(this, this.nativeBrush));
commonui\System\Drawing\BufferedGraphics.cs (4)
118RenderInternal(new HandleRef(Graphics, targetDC), this); 133RenderInternal(new HandleRef(target, targetDC), this); 148RenderInternal(new HandleRef(null, targetDC), this); 162new HandleRef(buffer.Graphics, sourceDC), 0, 0, rop);
commonui\System\Drawing\BufferedGraphicsContext.cs (17)
253hbm = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hdc), 1, 1); 265SafeNativeMethods.GetDIBits(new HandleRef(null, hdc), 266new HandleRef(null, hbm), 283SafeNativeMethods.GetDIBits(new HandleRef(null, hdc), 284new HandleRef(null, hbm), 296SafeNativeMethods.DeleteObject(new HandleRef(null, hbm)); 344palRet = SafeNativeMethods.GetPaletteEntries(new HandleRef(null, palHalftone), 0, cColors, aj); 348palRet = SafeNativeMethods.GetPaletteEntries(new HandleRef(null, hpal), 0, cColors, aj); 380compatDC = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, src)); 400oldBitmap = SafeNativeMethods.SelectObject(new HandleRef(this, compatDC), new HandleRef(this, dib)); 450int objType = UnsafeNativeMethods.GetObjectType(new HandleRef(null, hdc)); 489hbmRet = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdc), ref pbmi, NativeMethods.DIB_RGB_COLORS, ref ppvBits, IntPtr.Zero, 0); 530SafeNativeMethods.SelectObject(new HandleRef(this, compatDC), new HandleRef(this, oldBitmap)); 536UnsafeNativeMethods.DeleteDC(new HandleRef(this, compatDC)); 552SafeNativeMethods.DeleteObject(new HandleRef(this, dib));
commonui\System\Drawing\Graphics.cs (313)
152int status = SafeNativeMethods.Gdip.GdipCreateFromHDC(new HandleRef(null, hdc), out nativeGraphics); 178int status = SafeNativeMethods.Gdip.GdipCreateFromHDC2(new HandleRef(null, hdc), new HandleRef(null, hdevice), out gdipNativeGraphics); 212int status = SafeNativeMethods.Gdip.GdipCreateFromHWND(new HandleRef(null, hwnd), out nativeGraphics); 239int status = SafeNativeMethods.Gdip.GdipGetImageGraphicsContext(new HandleRef(image, image.nativeImage), 286int status = SafeNativeMethods.Gdip.GdipGetDC(new HandleRef(this, this.NativeGraphics), out hdc); 333int status = SafeNativeMethods.Gdip.GdipReleaseDC(new HandleRef(this, this.NativeGraphics), new HandleRef(null, hdc)); 405SafeNativeMethods.Gdip.GdipDeleteGraphics(new HandleRef(this, this.nativeGraphics)); 454int status = SafeNativeMethods.Gdip.GdipFlush(new HandleRef(this, this.NativeGraphics), intention); 480int status = SafeNativeMethods.Gdip.GdipGetCompositingMode(new HandleRef(this, this.NativeGraphics), out mode); 495int status = SafeNativeMethods.Gdip.GdipSetCompositingMode(new HandleRef(this, this.NativeGraphics), unchecked((int)value)); 511int status = SafeNativeMethods.Gdip.GdipGetRenderingOrigin(new HandleRef(this, this.NativeGraphics), out x, out y); 520int status = SafeNativeMethods.Gdip.GdipSetRenderingOrigin(new HandleRef(this, this.NativeGraphics), value.X, value.Y); 536int status = SafeNativeMethods.Gdip.GdipGetCompositingQuality(new HandleRef(this, this.NativeGraphics), out cq); 551int status = SafeNativeMethods.Gdip.GdipSetCompositingQuality(new HandleRef(this, this.NativeGraphics), 572int status = SafeNativeMethods.Gdip.GdipGetTextRenderingHint(new HandleRef(this, this.NativeGraphics), out hint); 587int status = SafeNativeMethods.Gdip.GdipSetTextRenderingHint(new HandleRef(this, this.NativeGraphics), value); 603int status = SafeNativeMethods.Gdip.GdipGetTextContrast(new HandleRef(this, this.NativeGraphics), out tgv); 612int status = SafeNativeMethods.Gdip.GdipSetTextContrast(new HandleRef(this, this.NativeGraphics), value); 628int status = SafeNativeMethods.Gdip.GdipGetSmoothingMode(new HandleRef(this, this.NativeGraphics), out mode); 643int status = SafeNativeMethods.Gdip.GdipSetSmoothingMode(new HandleRef(this, this.NativeGraphics), value); 659int status = SafeNativeMethods.Gdip.GdipGetPixelOffsetMode(new HandleRef(this, this.NativeGraphics), out mode); 674int status = SafeNativeMethods.Gdip.GdipSetPixelOffsetMode(new HandleRef(this, this.NativeGraphics), value); 705int status = SafeNativeMethods.Gdip.GdipGetInterpolationMode(new HandleRef(this, this.NativeGraphics), out mode); 721int status = SafeNativeMethods.Gdip.GdipSetInterpolationMode(new HandleRef(this, this.NativeGraphics), unchecked((int)value)); 741int status = SafeNativeMethods.Gdip.GdipGetWorldTransform(new HandleRef(this, this.NativeGraphics), 742new HandleRef(matrix, matrix.nativeMatrix)); 751int status = SafeNativeMethods.Gdip.GdipSetWorldTransform(new HandleRef(this, this.NativeGraphics), 752new HandleRef(value, value.nativeMatrix)); 772int status = SafeNativeMethods.Gdip.GdipGetPageUnit(new HandleRef(this, this.NativeGraphics), out unit); 787int status = SafeNativeMethods.Gdip.GdipSetPageUnit(new HandleRef(this, this.NativeGraphics), unchecked((int) value)); 802int status = SafeNativeMethods.Gdip.GdipGetPageScale(new HandleRef(this, this.NativeGraphics), scale); 813int status = SafeNativeMethods.Gdip.GdipSetPageScale(new HandleRef(this, this.NativeGraphics), value); 828int status = SafeNativeMethods.Gdip.GdipGetDpiX(new HandleRef(this, this.NativeGraphics), dpi); 845int status = SafeNativeMethods.Gdip.GdipGetDpiY(new HandleRef(this, this.NativeGraphics), dpi); 921HandleRef screenDC = new HandleRef( null, dc.Hdc ); 922HandleRef targetDC = new HandleRef( null, this.GetHdc()); // this DC 951int status = SafeNativeMethods.Gdip.GdipResetWorldTransform(new HandleRef(this, this.NativeGraphics)); 979int status = SafeNativeMethods.Gdip.GdipMultiplyWorldTransform(new HandleRef(this, this.NativeGraphics), 980new HandleRef(matrix, matrix.nativeMatrix), 998int status = SafeNativeMethods.Gdip.GdipTranslateWorldTransform(new HandleRef(this, this.NativeGraphics), dx, dy, order); 1025int status = SafeNativeMethods.Gdip.GdipScaleWorldTransform(new HandleRef(this, this.NativeGraphics), sx, sy, order); 1043int status = SafeNativeMethods.Gdip.GdipRotateWorldTransform(new HandleRef(this, this.NativeGraphics), angle, order); 1066int status = SafeNativeMethods.Gdip.GdipTransformPoints(new HandleRef(this, this.NativeGraphics), unchecked((int)destSpace), 1099int status = SafeNativeMethods.Gdip.GdipTransformPointsI(new HandleRef(this, this.NativeGraphics), unchecked((int)destSpace), 1124int status = SafeNativeMethods.Gdip.GdipGetNearestColor(new HandleRef(this, this.NativeGraphics), ref nearest); 1152int status = SafeNativeMethods.Gdip.GdipDrawLine(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, x2, y2); 1184int status = SafeNativeMethods.Gdip.GdipDrawLines(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1185new HandleRef(this, buf), points.Length); 1208int status = SafeNativeMethods.Gdip.GdipDrawLineI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, x2, y2); 1240int status = SafeNativeMethods.Gdip.GdipDrawLinesI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1241new HandleRef(this, buf), points.Length); 1263int status = SafeNativeMethods.Gdip.GdipDrawArc(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1293int status = SafeNativeMethods.Gdip.GdipDrawArcI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1322int status = SafeNativeMethods.Gdip.GdipDrawBezier(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, 1356int status = SafeNativeMethods.Gdip.GdipDrawBeziers(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1357new HandleRef(this, buf), points.Length); 1393int status = SafeNativeMethods.Gdip.GdipDrawBeziersI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1394new HandleRef(this, buf), points.Length); 1427int status = SafeNativeMethods.Gdip.GdipDrawRectangle(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1446int status = SafeNativeMethods.Gdip.GdipDrawRectangleI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, height); 1469int status = SafeNativeMethods.Gdip.GdipDrawRectangles(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1470new HandleRef(this, buf), rects.Length); 1496int status = SafeNativeMethods.Gdip.GdipDrawRectanglesI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1497new HandleRef(this, buf), rects.Length); 1530int status = SafeNativeMethods.Gdip.GdipDrawEllipse(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1559int status = SafeNativeMethods.Gdip.GdipDrawEllipseI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1591int status = SafeNativeMethods.Gdip.GdipDrawPie(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, 1623int status = SafeNativeMethods.Gdip.GdipDrawPieI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, 1644int status = SafeNativeMethods.Gdip.GdipDrawPolygon(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1645new HandleRef(this, buf), points.Length); 1669int status = SafeNativeMethods.Gdip.GdipDrawPolygonI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1670new HandleRef(this, buf), points.Length); 1693int status = SafeNativeMethods.Gdip.GdipDrawPath(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1694new HandleRef(path, path.nativePath)); 1716int status = SafeNativeMethods.Gdip.GdipDrawCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1742int status = SafeNativeMethods.Gdip.GdipDrawCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1777int status = SafeNativeMethods.Gdip.GdipDrawCurve3(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1804int status = SafeNativeMethods.Gdip.GdipDrawCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1829int status = SafeNativeMethods.Gdip.GdipDrawCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1855int status = SafeNativeMethods.Gdip.GdipDrawCurve3I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1883int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1909int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1935int status = SafeNativeMethods.Gdip.GdipDrawClosedCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1960int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1977int status = SafeNativeMethods.Gdip.GdipGraphicsClear(new HandleRef(this, this.NativeGraphics), color.ToArgb()); 2007int status = SafeNativeMethods.Gdip.GdipFillRectangle(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2036int status = SafeNativeMethods.Gdip.GdipFillRectangleI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, width, height); 2059int status = SafeNativeMethods.Gdip.GdipFillRectangles(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2060new HandleRef(this, buf), rects.Length); 2086int status = SafeNativeMethods.Gdip.GdipFillRectanglesI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2087new HandleRef(this, buf), rects.Length); 2123int status = SafeNativeMethods.Gdip.GdipFillPolygon(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2124new HandleRef(this, buf), points.Length, unchecked((int) fillMode)); 2159int status = SafeNativeMethods.Gdip.GdipFillPolygonI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2160new HandleRef(this, buf), points.Length, unchecked((int) fillMode)); 2193int status = SafeNativeMethods.Gdip.GdipFillEllipse(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2222int status = SafeNativeMethods.Gdip.GdipFillEllipseI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2255int status = SafeNativeMethods.Gdip.GdipFillPie(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2275int status = SafeNativeMethods.Gdip.GdipFillPieI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2294int status = SafeNativeMethods.Gdip.GdipFillPath(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2295new HandleRef(path, path.nativePath)); 2318int status = SafeNativeMethods.Gdip.GdipFillClosedCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2319new HandleRef(this, buf), points.Length); 2352int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2353new HandleRef(this, buf), points.Length, 2379int status = SafeNativeMethods.Gdip.GdipFillClosedCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2380new HandleRef(this, buf), points.Length); 2410int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2411new HandleRef(this, buf), points.Length, 2435int status = SafeNativeMethods.Gdip.GdipFillRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2436new HandleRef(region, region.nativeRegion)); 2502int status = SafeNativeMethods.Gdip.GdipDrawString(new HandleRef(this, this.NativeGraphics), s, s.Length, new HandleRef(font, font.NativeFont), ref grf, new HandleRef(format, nativeStringFormat), new HandleRef(brush, brush.NativeBrush)); 2526int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), ref grfLayout, 2527new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2556int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), 2558new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2592int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), 2594new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2641int status = SafeNativeMethods.Gdip.GdipGetStringFormatMeasurableCharacterRangeCount(new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat) 2659status = SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), ref grf, 2660new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2763int status = SafeNativeMethods.Gdip.GdipDrawImage(new HandleRef(this, this.NativeGraphics), new HandleRef(image, image.nativeImage), 2790int status = SafeNativeMethods.Gdip.GdipDrawImageRect(new HandleRef(this, this.NativeGraphics), 2791new HandleRef(image, image.nativeImage), 2819int status = SafeNativeMethods.Gdip.GdipDrawImageI(new HandleRef(this, this.NativeGraphics), new HandleRef(image, image.nativeImage), 2846int status = SafeNativeMethods.Gdip.GdipDrawImageRectI(new HandleRef(this, this.NativeGraphics), 2847new HandleRef(image, image.nativeImage), 2932int status = SafeNativeMethods.Gdip.GdipDrawImagePoints(new HandleRef(this, this.NativeGraphics), 2933new HandleRef(image, image.nativeImage), 2934new HandleRef(this, buf), count); 2965int status = SafeNativeMethods.Gdip.GdipDrawImagePointsI(new HandleRef(this, this.NativeGraphics), 2966new HandleRef(image, image.nativeImage), 2967new HandleRef(this, buf), count); 2996new HandleRef(this, this.NativeGraphics), 2997new HandleRef(image, image.nativeImage), 3024new HandleRef(this, this.NativeGraphics), 3025new HandleRef(image, image.nativeImage), 3052new HandleRef(this, this.NativeGraphics), 3053new HandleRef(image, image.nativeImage), 3086new HandleRef(this, this.NativeGraphics), 3087new HandleRef(image, image.nativeImage), 3126new HandleRef(this, this.NativeGraphics), 3127new HandleRef(image, image.nativeImage), 3128new HandleRef(this, buf), 3184new HandleRef(this, this.NativeGraphics), 3185new HandleRef(image, image.nativeImage), 3186new HandleRef(this, buf), 3193new HandleRef(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)), 3195new HandleRef(null, (IntPtr)callbackData)); 3250new HandleRef(this, this.NativeGraphics), 3251new HandleRef(image, image.nativeImage), 3252new HandleRef(this, buf), 3259new HandleRef(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)), 3261new HandleRef(null, (IntPtr)callbackData)); 3308new HandleRef(this, this.NativeGraphics), 3309new HandleRef(image, image.nativeImage), 3319new HandleRef(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)), 3321new HandleRef(null, callbackData)); 3363new HandleRef(this, this.NativeGraphics), 3364new HandleRef(image, image.nativeImage), 3374new HandleRef(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)), 3376new HandleRef(null, callbackData)); 3408int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoint(new HandleRef(this, this.NativeGraphics), 3409new HandleRef(metafile, mf), 3412new HandleRef(null, callbackData), 3413new HandleRef(imageAttr, ia)); 3443int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointI(new HandleRef(this, this.NativeGraphics), 3444new HandleRef(metafile, mf), 3447new HandleRef(null, callbackData), 3448new HandleRef(imageAttr, ia)); 3481new HandleRef(this, this.NativeGraphics), 3482new HandleRef(metafile, mf), 3485new HandleRef(null, callbackData), 3486new HandleRef(imageAttr, ia)); 3517int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestRectI(new HandleRef(this, this.NativeGraphics), 3518new HandleRef(metafile, mf), 3521new HandleRef(null, callbackData), 3522new HandleRef(imageAttr, ia)); 3560int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoints(new HandleRef(this, this.NativeGraphics), 3561new HandleRef(metafile, mf), 3565new HandleRef(null, callbackData), 3566new HandleRef(imageAttr, ia)); 3606int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointsI(new HandleRef(this, this.NativeGraphics), 3607new HandleRef(metafile, mf), 3611new HandleRef(null, callbackData), 3612new HandleRef(imageAttr, ia)); 3648int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoint(new HandleRef(this, this.NativeGraphics), 3649new HandleRef(metafile, mf), 3654new HandleRef(null, callbackData), 3655new HandleRef(imageAttr, ia)); 3691int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointI(new HandleRef(this, this.NativeGraphics), 3692new HandleRef(metafile, mf), 3697new HandleRef(null, callbackData), 3698new HandleRef(imageAttr, ia)); 3735new HandleRef(this, this.NativeGraphics), 3736new HandleRef(metafile, mf), 3741new HandleRef(null, callbackData), 3742new HandleRef(imageAttr, ia)); 3781int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestRectI(new HandleRef(this, this.NativeGraphics), 3782new HandleRef(metafile, mf), 3787new HandleRef(null, callbackData), 3788new HandleRef(imageAttr, ia)); 3840int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoints(new HandleRef(this, this.NativeGraphics), 3841new HandleRef(metafile, mf), 3847new HandleRef(null, callbackData), 3848new HandleRef(imageAttr, ia)); 3902int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointsI(new HandleRef(this, this.NativeGraphics), 3903new HandleRef(metafile, mf), 3909new HandleRef(null, callbackData), 3910new HandleRef(imageAttr, ia)); 3940int status = SafeNativeMethods.Gdip.GdipSetClipGraphics(new HandleRef(this, this.NativeGraphics), new HandleRef(g, g.NativeGraphics), combineMode); 3958int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 3977int status = SafeNativeMethods.Gdip.GdipSetClipRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 3999int status = SafeNativeMethods.Gdip.GdipSetClipPath(new HandleRef(this, this.NativeGraphics), new HandleRef(path, path.nativePath), combineMode); 4014int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion), combineMode); 4025int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4037int status = SafeNativeMethods.Gdip.GdipSetClipRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4052int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion), 4064int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4079int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), 4080new HandleRef(region, region.nativeRegion), 4092int status = SafeNativeMethods.Gdip.GdipResetClip(new HandleRef(this, this.NativeGraphics)); 4103int status = SafeNativeMethods.Gdip.GdipTranslateClip(new HandleRef(this, this.NativeGraphics), dx, dy); 4114int status = SafeNativeMethods.Gdip.GdipTranslateClip(new HandleRef(this, this.NativeGraphics), dx, dy); 4203int status = SafeNativeMethods.Gdip.GdipGetClip(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion)); 4223int status = SafeNativeMethods.Gdip.GdipGetClipBounds(new HandleRef(this, this.NativeGraphics), ref rect); 4240int status = SafeNativeMethods.Gdip.GdipIsClipEmpty(new HandleRef(this, this.NativeGraphics), out isEmpty); 4267int status = SafeNativeMethods.Gdip.GdipGetVisibleClipBounds(new HandleRef(this, this.NativeGraphics), ref rect); 4287int status = SafeNativeMethods.Gdip.GdipIsVisibleClipEmpty(new HandleRef(this, this.NativeGraphics), out isEmpty); 4311int status = SafeNativeMethods.Gdip.GdipIsVisiblePointI(new HandleRef(this, this.NativeGraphics), point.X, point.Y, out isVisible); 4333int status = SafeNativeMethods.Gdip.GdipIsVisiblePoint(new HandleRef(this, this.NativeGraphics), point.X, point.Y, out isVisible); 4355int status = SafeNativeMethods.Gdip.GdipIsVisibleRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4378int status = SafeNativeMethods.Gdip.GdipIsVisibleRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4433int status = SafeNativeMethods.Gdip.GdipSaveGraphics(new HandleRef(this, this.NativeGraphics), out state); 4451int status = SafeNativeMethods.Gdip.GdipRestoreGraphics(new HandleRef(this, this.NativeGraphics), gstate.nativeState); 4477int status = SafeNativeMethods.Gdip.GdipBeginContainer(new HandleRef(this, this.NativeGraphics), ref dstf, 4500int status = SafeNativeMethods.Gdip.GdipBeginContainer2(new HandleRef(this, this.NativeGraphics), out state); 4521int status = SafeNativeMethods.Gdip.GdipEndContainer(new HandleRef(this, this.NativeGraphics), container.nativeGraphicsContainer); 4543int status = SafeNativeMethods.Gdip.GdipBeginContainerI(new HandleRef(this, this.NativeGraphics), ref gpDest, 4565int status = SafeNativeMethods.Gdip.GdipComment(new HandleRef(this, this.NativeGraphics), data.Length, data); 4597SafeNativeMethods.IntDeleteObject(new HandleRef(null, halftonePalette));
commonui\System\Drawing\Icon.cs (19)
144handle = SafeNativeMethods.CopyImage(new HandleRef(original, original.Handle), SafeNativeMethods.IMAGE_ICON, iconSize.Width, iconSize.Height, 0); 327SafeNativeMethods.GetIconInfo(new HandleRef(this, Handle), info); 331SafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 332SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 336SafeNativeMethods.GetObject(new HandleRef(null, info.hbmMask), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 341SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask)); 383SafeNativeMethods.DestroyIcon(new HandleRef(this, handle)); 475SafeNativeMethods.IntersectClipRect(new HandleRef(this, dc), targetX, targetY, targetX+clipWidth, targetY+clipHeight); 476SafeNativeMethods.DrawIconEx(new HandleRef(null, dc), 479new HandleRef(this, handle), 629bitDepth = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.BITSPIXEL); 630bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.PLANES); 631UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 916UnsafeNativeMethods.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride)); 1001SafeNativeMethods.GetIconInfo(new HandleRef(this, handle), info); 1005SafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 1049SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 1051SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask));
commonui\System\Drawing\Image.cs (52)
201status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 204SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 273status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 276SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 299status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 302SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 310status = SafeNativeMethods.Gdip.GdipGetImageType(new HandleRef(this, nativeImage), out type); 334int status = SafeNativeMethods.Gdip.GdipCloneImage(new HandleRef(this, nativeImage), out cloneImage); 339status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, cloneImage)); 342SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, cloneImage)); 373SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(this, nativeImage)); 488int status = SafeNativeMethods.Gdip.GdipGetImageType(new HandleRef(null, nativeImage), out type); 532int status = SafeNativeMethods.Gdip.GdipGetEncoderParameterListSize(new HandleRef(this, nativeImage), 543status = SafeNativeMethods.Gdip.GdipGetEncoderParameterList(new HandleRef(this, nativeImage), 628status = SafeNativeMethods.Gdip.GdipSaveImageToFile(new HandleRef(this, nativeImage), 631new HandleRef(encoderParams, encoderParamsMemory)); 716status = SafeNativeMethods.Gdip.GdipSaveImageToStream(new HandleRef(this, nativeImage), 719new HandleRef(encoderParams, encoderParamsMemory)); 748int status = SafeNativeMethods.Gdip.GdipSaveAdd(new HandleRef(this, nativeImage), new HandleRef(encoderParams, encoder)); 777int status = SafeNativeMethods.Gdip.GdipSaveAddImage(new HandleRef(this, nativeImage), new HandleRef(image, image.nativeImage), new HandleRef(encoderParams, encoder)); 794int status = SafeNativeMethods.Gdip.GdipGetImageDimension(new HandleRef(this, nativeImage), out width, out height); 838int status = SafeNativeMethods.Gdip.GdipGetImageWidth(new HandleRef(this, nativeImage), out width); 860int status = SafeNativeMethods.Gdip.GdipGetImageHeight(new HandleRef(this, nativeImage), out height); 878int status = SafeNativeMethods.Gdip.GdipGetImageHorizontalResolution(new HandleRef(this, nativeImage), out horzRes); 896int status = SafeNativeMethods.Gdip.GdipGetImageVerticalResolution(new HandleRef(this, nativeImage), out vertRes); 914int status = SafeNativeMethods.Gdip.GdipGetImageFlags(new HandleRef(this, nativeImage), out flags); 931int status = SafeNativeMethods.Gdip.GdipGetImageRawFormat(new HandleRef(this, nativeImage), ref guid); 949int status = SafeNativeMethods.Gdip.GdipGetImagePixelFormat(new HandleRef(this, nativeImage), out format); 967int status = SafeNativeMethods.Gdip.GdipGetImageBounds(new HandleRef(this, nativeImage), ref gprectf, out pageUnit); 978int status = SafeNativeMethods.Gdip.GdipGetImagePaletteSize(new HandleRef(this, nativeImage), out size); 995status = SafeNativeMethods.Gdip.GdipGetImagePalette(new HandleRef(this, nativeImage), memory, size); 1014int status = SafeNativeMethods.Gdip.GdipSetImagePalette(new HandleRef(this, nativeImage), memory); 1050int status = SafeNativeMethods.Gdip.GdipGetImageThumbnail(new HandleRef(this, nativeImage), thumbWidth, thumbHeight, out thumbImage, 1073int status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsCount(new HandleRef(this, nativeImage), out count); 1091status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsList(new HandleRef(this, nativeImage), buffer, count); 1124int status = SafeNativeMethods.Gdip.GdipImageGetFrameCount(new HandleRef(this, nativeImage), ref dimensionID, count); 1143int status = SafeNativeMethods.Gdip.GdipImageSelectActiveFrame(new HandleRef(this, nativeImage), ref dimensionID, frameIndex); 1158int status = SafeNativeMethods.Gdip.GdipImageRotateFlip(new HandleRef(this, nativeImage), unchecked((int) rotateFlipType)); 1176int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new HandleRef(this, nativeImage), out count); 1187status = SafeNativeMethods.Gdip.GdipGetPropertyIdList(new HandleRef(this, nativeImage), count, propid); 1205int status = SafeNativeMethods.Gdip.GdipGetPropertyItemSize(new HandleRef(this, nativeImage), propid, out size); 1218status = SafeNativeMethods.Gdip.GdipGetPropertyItem(new HandleRef(this, nativeImage), propid, size, propdata); 1240int status = SafeNativeMethods.Gdip.GdipRemovePropertyItem(new HandleRef(this, nativeImage), propid); 1256int status = SafeNativeMethods.Gdip.GdipSetPropertyItem(new HandleRef(this, nativeImage), propItemInternal); 1273int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new HandleRef(this, nativeImage), out count); 1278status = SafeNativeMethods.Gdip.GdipGetPropertySize(new HandleRef(this, nativeImage), out size, ref count); 1288status = SafeNativeMethods.Gdip.GdipGetAllPropertyItems(new HandleRef(this, nativeImage), size, count, propdata); 1340int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHBITMAP(new HandleRef(null, hbitmap), new HandleRef(null, hpalette), out bitmap);
commonui\System\Drawing\NativeMethods.cs (1)
19internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
commonui\System\Drawing\Pen.cs (52)
120int status = SafeNativeMethods.Gdip.GdipCreatePen2(new HandleRef(brush, brush.NativeBrush), 166int status = SafeNativeMethods.Gdip.GdipClonePen(new HandleRef(this, this.NativePen), out clonePen); 213SafeNativeMethods.Gdip.GdipDeletePen(new HandleRef(this, this.NativePen)); 252int status = SafeNativeMethods.Gdip.GdipGetPenWidth(new HandleRef(this, this.NativePen), width); 265int status = SafeNativeMethods.Gdip.GdipSetPenWidth(new HandleRef(this, this.NativePen), value); 285int status = SafeNativeMethods.Gdip.GdipSetPenLineCap197819(new HandleRef(this, this.NativePen), 303int status = SafeNativeMethods.Gdip.GdipGetPenStartCap(new HandleRef(this, this.NativePen), out startCap); 331int status = SafeNativeMethods.Gdip.GdipSetPenStartCap(new HandleRef(this, this.NativePen), unchecked((int)value)); 349int status = SafeNativeMethods.Gdip.GdipGetPenEndCap(new HandleRef(this, this.NativePen), out endCap); 378int status = SafeNativeMethods.Gdip.GdipSetPenEndCap(new HandleRef(this, this.NativePen), unchecked((int)value)); 394int status = SafeNativeMethods.Gdip.GdipGetPenDashCap197819(new HandleRef(this, this.NativePen), out dashCap); 415int status = SafeNativeMethods.Gdip.GdipSetPenDashCap197819(new HandleRef(this, this.NativePen), unchecked((int)value)); 434int status = SafeNativeMethods.Gdip.GdipGetPenLineJoin(new HandleRef(this, this.NativePen), out lineJoin); 452int status = SafeNativeMethods.Gdip.GdipSetPenLineJoin(new HandleRef(this, this.NativePen), unchecked((int)value)); 473int status = SafeNativeMethods.Gdip.GdipGetPenCustomStartCap(new HandleRef(this, this.NativePen), out lineCap); 485int status = SafeNativeMethods.Gdip.GdipSetPenCustomStartCap(new HandleRef(this, this.NativePen), 486new HandleRef(value, (value == null) ? IntPtr.Zero : value.nativeCap)); 507int status = SafeNativeMethods.Gdip.GdipGetPenCustomEndCap(new HandleRef(this, this.NativePen), out lineCap); 519int status = SafeNativeMethods.Gdip.GdipSetPenCustomEndCap(new HandleRef(this, this.NativePen), 520new HandleRef(value, (value == null) ? IntPtr.Zero : value.nativeCap)); 536int status = SafeNativeMethods.Gdip.GdipGetPenMiterLimit(new HandleRef(this, this.NativePen), miterLimit); 548int status = SafeNativeMethods.Gdip.GdipSetPenMiterLimit(new HandleRef(this, this.NativePen), value); 570int status = SafeNativeMethods.Gdip.GdipGetPenMode(new HandleRef(this, this.NativePen), out penMode); 588int status = SafeNativeMethods.Gdip.GdipSetPenMode(new HandleRef(this, this.NativePen), value); 610int status = SafeNativeMethods.Gdip.GdipGetPenTransform(new HandleRef(this, this.NativePen), new HandleRef(matrix, matrix.nativeMatrix)); 626int status = SafeNativeMethods.Gdip.GdipSetPenTransform(new HandleRef(this, this.NativePen), new HandleRef(value, value.nativeMatrix)); 640int status = SafeNativeMethods.Gdip.GdipResetPenTransform(new HandleRef(this, this.NativePen)); 667int status = SafeNativeMethods.Gdip.GdipMultiplyPenTransform(new HandleRef(this, this.NativePen), 668new HandleRef(matrix, matrix.nativeMatrix), 693int status = SafeNativeMethods.Gdip.GdipTranslatePenTransform(new HandleRef(this, this.NativePen), 717int status = SafeNativeMethods.Gdip.GdipScalePenTransform(new HandleRef(this, this.NativePen), 741int status = SafeNativeMethods.Gdip.GdipRotatePenTransform(new HandleRef(this, this.NativePen), 756int status = SafeNativeMethods.Gdip.GdipSetPenColor(new HandleRef(this, this.NativePen), 774int status = SafeNativeMethods.Gdip.GdipGetPenFillType(new HandleRef(this, this.NativePen), out type); 793int status = SafeNativeMethods.Gdip.GdipGetPenColor(new HandleRef(this, this.NativePen), out colorARGB); 867int status = SafeNativeMethods.Gdip.GdipSetPenBrushFill(new HandleRef(this, this.NativePen), 868new HandleRef(value, value.NativeBrush)); 879int status = SafeNativeMethods.Gdip.GdipGetPenBrushFill(new HandleRef(this, this.NativePen), out nativeBrush); 900int status = SafeNativeMethods.Gdip.GdipGetPenDashStyle(new HandleRef(this, this.NativePen), out dashstyle); 919int status = SafeNativeMethods.Gdip.GdipSetPenDashStyle(new HandleRef(this, this.NativePen), unchecked((int)value)); 941int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new HandleRef(this, this.NativePen), out retval); 962int status = SafeNativeMethods.Gdip.GdipGetPenDashOffset(new HandleRef(this, this.NativePen), dashoffset); 973int status = SafeNativeMethods.Gdip.GdipSetPenDashOffset(new HandleRef(this, this.NativePen), value); 995int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new HandleRef(this, this.NativePen), out retval); 1006status = SafeNativeMethods.Gdip.GdipGetPenDashArray(new HandleRef(this, this.NativePen), buf, count); 1041int status = SafeNativeMethods.Gdip.GdipSetPenDashArray(new HandleRef(this, this.NativePen), new HandleRef(buf, buf), count); 1063int status = SafeNativeMethods.Gdip.GdipGetPenCompoundCount(new HandleRef(this, this.NativePen), out count); 1070status = SafeNativeMethods.Gdip.GdipGetPenCompoundArray(new HandleRef(this, this.NativePen), array, count); 1080int status = SafeNativeMethods.Gdip.GdipSetPenCompoundArray(new HandleRef(this, this.NativePen), value, value.Length);
commonui\System\Drawing\Printing\DefaultPrintController.cs (13)
70int result = SafeNativeMethods.StartDoc(new HandleRef(this.dc, dc.Hdc), info); 102IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 104IntPtr result = SafeNativeMethods.ResetDC(new HandleRef(this.dc, dc.Hdc), new HandleRef(null, modePointer)); 108SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 125int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 126int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 127int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 128int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 137int result2 = SafeNativeMethods.StartPage(new HandleRef(this.dc, dc.Hdc)); 160int result = SafeNativeMethods.EndPage(new HandleRef(this.dc, dc.Hdc)); 191int result = (e.Cancel) ? SafeNativeMethods.AbortDoc(new HandleRef(dc, dc.Hdc)) : SafeNativeMethods.EndDoc(new HandleRef(dc, dc.Hdc));
commonui\System\Drawing\Printing\PageSettings.cs (23)
73SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 113int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 114int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 143int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 144int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 211IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 216SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 217SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 239HandleRef hdc = new HandleRef(dc, dc.Hdc); 283IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 288SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 289SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 338IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 421SafeNativeMethods.GlobalFree(new HandleRef(null, modePointer)); 425SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 431IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 436SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 437SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 473IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, modeHandle)); 478SafeNativeMethods.GlobalUnlock(new HandleRef(null, modeHandle)); 481SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 557IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 574SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode));
commonui\System\Drawing\Printing\PreviewPrintController.cs (4)
134int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 135int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 136int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 137int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrintController.cs (1)
60SafeNativeMethods.GlobalFree(new HandleRef(this, handle));
commonui\System\Drawing\Printing\PrinterSettings.cs (40)
532HandleRef hdc = new HandleRef(dc, dc.Hdc); 575HandleRef hdc = new HandleRef(dc, dc.Hdc); 659SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 667IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 668DeviceContext dc = DeviceContext.CreateDC(DriverName, PrinterNameInternal, (string) null, new HandleRef(null, modePointer)); 669SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 696SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 705IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 706DeviceContext dc = DeviceContext.CreateIC(DriverName, PrinterNameInternal, (string) null, new HandleRef(null, modePointer)); 707SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 863IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 868SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 872SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 873SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 886IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 891SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 895SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 896SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 918IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 924SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 928SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 929SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 942IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 948SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 952SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 953SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 967result = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), capability); 1011IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1055SafeNativeMethods.GlobalFree(new HandleRef(null, handle)); 1056SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1061SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1111IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1121SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1147IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 1167SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 1172SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 1318IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 1347SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 1362IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevnames)); 1370SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevnames));
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (4)
55int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 56int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 57int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 58int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Region.cs (66)
114int status = SafeNativeMethods.Gdip.GdipCreateRegionPath(new HandleRef(path, path.nativePath), out region); 160int status = SafeNativeMethods.Gdip.GdipCreateRegionHrgn(new HandleRef(null, hrgn), out region); 187int status = SafeNativeMethods.Gdip.GdipCloneRegion(new HandleRef(this, nativeRegion), out region); 219SafeNativeMethods.Gdip.GdipDeleteRegion(new HandleRef(this, nativeRegion)); 256int status = SafeNativeMethods.Gdip.GdipSetInfinite(new HandleRef(this, nativeRegion)); 268int status = SafeNativeMethods.Gdip.GdipSetEmpty(new HandleRef(this, nativeRegion)); 282int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Intersect); 298int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Intersect); 315int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Intersect); 332int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Intersect); 349SafeNativeMethods.IntDeleteObject(new HandleRef(this, regionHandle)); 362int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Union); 376int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Union); 391int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Union); 407int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Union); 421int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Xor); 435int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Xor); 450int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Xor); 465int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Xor); 479int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Exclude); 493int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Exclude); 508int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), 524int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), 539int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Complement); 553int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Complement); 569int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Complement); 586int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Complement); 601int status = SafeNativeMethods.Gdip.GdipTranslateRegion(new HandleRef(this, nativeRegion), dx, dy); 613int status = SafeNativeMethods.Gdip.GdipTranslateRegionI(new HandleRef(this, nativeRegion), dx, dy); 628int status = SafeNativeMethods.Gdip.GdipTransformRegion(new HandleRef(this, nativeRegion), 629new HandleRef(matrix, matrix.nativeMatrix)); 649int status = SafeNativeMethods.Gdip.GdipGetRegionBounds(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), ref gprectf); 672int status = SafeNativeMethods.Gdip.GdipGetRegionHRgn(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out hrgn); 692int status = SafeNativeMethods.Gdip.GdipIsEmptyRegion(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out isEmpty); 712int status = SafeNativeMethods.Gdip.GdipIsInfiniteRegion(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out isInfinite); 736int status = SafeNativeMethods.Gdip.GdipIsEqualRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), new HandleRef(g, g.NativeGraphics), out isEqual); 753int status = SafeNativeMethods.Gdip.GdipGetRegionDataSize(new HandleRef(this, nativeRegion), out regionSize); 763status = SafeNativeMethods.Gdip.GdipGetRegionData(new HandleRef(this, nativeRegion), regionData, regionSize, out regionSize); 817int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPoint(new HandleRef(this, nativeRegion), point.X, point.Y, 818new HandleRef(g, (g==null) ? IntPtr.Zero : g.NativeGraphics), 869int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRect(new HandleRef(this, nativeRegion), rect.X, rect.Y, 871new HandleRef(g, (g==null) ? IntPtr.Zero : g.NativeGraphics), 912int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPointI(new HandleRef(this, nativeRegion), point.X, point.Y, 913new HandleRef(g, (g == null) ? IntPtr.Zero : g.NativeGraphics), 966int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRectI(new HandleRef(this, nativeRegion), rect.X, rect.Y, 968new HandleRef(g, (g == null) ? IntPtr.Zero : g.NativeGraphics), 993int status = SafeNativeMethods.Gdip.GdipGetRegionScansCount(new HandleRef(this, nativeRegion), 995new HandleRef(matrix, matrix.nativeMatrix)); 1005status = SafeNativeMethods.Gdip.GdipGetRegionScans(new HandleRef(this, nativeRegion), 1008new HandleRef(matrix, matrix.nativeMatrix));
commonui\System\Drawing\SolidBrush.cs (3)
81int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 116int status = SafeNativeMethods.Gdip.GdipGetSolidFillColor(new HandleRef(this, this.NativeBrush), out colorARGB); 152int status = SafeNativeMethods.Gdip.GdipSetSolidFillColor(new HandleRef(this, this.NativeBrush), value.ToArgb());
misc\DbgUtil.cs (2)
241new HandleRef(null, IntPtr.Zero), 246new HandleRef(null, IntPtr.Zero) );
misc\DpiHelper.cs (2)
111deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), CAPS.LOGPIXELSX); 113UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
misc\GDI\DeviceContext.cs (27)
181hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_PEN); 182hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BRUSH); 183hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BITMAP); 184hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 218IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, handleToDelete)); 257this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new HandleRef( this, this.hDC) ); 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 386IntUnsafeNativeMethods.DeleteHDC(new HandleRef(this, this.hDC)); 398IntUnsafeNativeMethods.DeleteDC(new HandleRef(this, this.hDC)); 437this.hDC = IntUnsafeNativeMethods.GetDC(new HandleRef(this, this.hWnd)); 459IntUnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.hWnd), new HandleRef(this, this.hDC)); 479return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new HandleRef( this, this.Hdc ) ); 496return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new HandleRef( this, this.Hdc ), unchecked((int) newMode)); 516IntUnsafeNativeMethods.RestoreDC(new HandleRef(this, this.hDC), -1); 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 606HandleRef hRegion = new HandleRef(region, region.HRegion); 626int result = IntUnsafeNativeMethods.GetClipRgn(new HandleRef( this, this.Hdc), new HandleRef(clip, clip.HRegion)); 649IntUnsafeNativeMethods.OffsetViewportOrgEx( new HandleRef( this, this.Hdc ), dx, dy, orgn );
misc\GDI\WindowsRegion.cs (5)
126return IntUnsafeNativeMethods.CombineRgn(new HandleRef(this, this.HRegion), new HandleRef(region1, region1.HRegion), new HandleRef(region2, region2.HRegion), mode); 152IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.nativeHandle)); 195IntUnsafeNativeMethods.GetRgnBox(new HandleRef(this, this.nativeHandle), ref rect);
System.IdentityModel.Selectors (1)
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (1)
510HandleRef data = new HandleRef(handle, stringsRootHandle.AddrOfPinnedObject());
System.ServiceModel.Internals (1)
System\Runtime\Diagnostics\EventLogger.cs (1)
307HandleRef data = new HandleRef(handle, stringsRootHandle.AddrOfPinnedObject());
System.Web (17)
Compilation\CompilationLock.cs (2)
66_mutexHandle = new HandleRef(this, UnsafeNativeMethods.InstrumentedMutexCreate(_name)); 93_mutexHandle = new HandleRef(this, IntPtr.Zero);
FileChangesMonitor.cs (2)
452_ndirMonCompletionHandle = new HandleRef(this, _ndirMonCompletionPtr); 488_ndirMonCompletionHandle = new HandleRef(this, IntPtr.Zero);
ImpersonationContext.cs (6)
26ImpersonateToken(new HandleRef(this, token)); 43_savedToken = new HandleRef(this, IntPtr.Zero); 52_savedToken = new HandleRef(this, GetCurrentToken()); 144ImpersonateToken(new HandleRef(this, IntPtr.Zero)); 150ImpersonateToken(new HandleRef(this, HostingEnvironment.ApplicationIdentityToken)); 185ImpersonateToken(new HandleRef(this, token));
State\OutOfProcStateClientManager.cs (7)
292socketHandle = new HandleRef(this, conn._socketHandle.Handle); 295socketHandle = new HandleRef(this, INVALID_SOCKET); 346conn._socketHandle = new HandleRef(this, results.socket); 510UnsafeNativeMethods.SessionNDFreeBody(new HandleRef(this, results.content)); 697_socketHandle = new HandleRef(this, socket); 715_socketHandle = new HandleRef(this, OutOfProcSessionStateStore.INVALID_SOCKET); 721_socketHandle = new HandleRef(this, OutOfProcSessionStateStore.INVALID_SOCKET);
System.Windows.Forms (1475)
misc\DbgUtil.cs (2)
241new HandleRef(null, IntPtr.Zero), 246new HandleRef(null, IntPtr.Zero) );
misc\DpiHelper.cs (2)
111deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), CAPS.LOGPIXELSX); 113UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
misc\GDI\DeviceContext.cs (27)
181hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_PEN); 182hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BRUSH); 183hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BITMAP); 184hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 218IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, handleToDelete)); 257this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new HandleRef( this, this.hDC) ); 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 386IntUnsafeNativeMethods.DeleteHDC(new HandleRef(this, this.hDC)); 398IntUnsafeNativeMethods.DeleteDC(new HandleRef(this, this.hDC)); 437this.hDC = IntUnsafeNativeMethods.GetDC(new HandleRef(this, this.hWnd)); 459IntUnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.hWnd), new HandleRef(this, this.hDC)); 479return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new HandleRef( this, this.Hdc ) ); 496return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new HandleRef( this, this.Hdc ), unchecked((int) newMode)); 516IntUnsafeNativeMethods.RestoreDC(new HandleRef(this, this.hDC), -1); 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 606HandleRef hRegion = new HandleRef(region, region.HRegion); 626int result = IntUnsafeNativeMethods.GetClipRgn(new HandleRef( this, this.Hdc), new HandleRef(clip, clip.HRegion)); 649IntUnsafeNativeMethods.OffsetViewportOrgEx( new HandleRef( this, this.Hdc ), dx, dy, orgn );
misc\GDI\DeviceContext2.cs (24)
66return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetBkColor( new HandleRef( this, this.Hdc ))); 81return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetBkColor( new HandleRef( this, this.Hdc ), ColorTranslator.ToWin32(newColor))); 91return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.GetBkMode( new HandleRef( this, this.Hdc ) ); 106return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.SetBkMode(new HandleRef(this, this.Hdc), (int) newMode); 117return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.GetROP2( new HandleRef( this, this.Hdc ) ); 135return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.SetROP2(new HandleRef(this, this.Hdc), (int) rasterOperation); 239IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 242IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hInitialFont)); 313IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hInitialFont )); 323return IntUnsafeNativeMethods.GetDeviceCaps( new HandleRef( this, this.Hdc ), (int) capabilityIndex ); 333return (DeviceContextMapMode) IntUnsafeNativeMethods.GetMapMode( new HandleRef( this, this.Hdc ) ); 363return (DeviceContextMapMode) IntUnsafeNativeMethods.SetMapMode( new HandleRef(this, this.Hdc), (int) newMode ); 383return IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hObj)); 393return (DeviceContextTextAlignment) IntUnsafeNativeMethods.GetTextAlign( new HandleRef( this, this.Hdc ) ); 408return (DeviceContextTextAlignment) IntUnsafeNativeMethods.SetTextAlign(new HandleRef(this, this.Hdc), (int) newAligment ); 419return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetTextColor( new HandleRef( this, this.Hdc ) )); 434return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetTextColor(new HandleRef( this, this.Hdc), ColorTranslator.ToWin32(newColor))); 445IntUnsafeNativeMethods.GetViewportExtEx( new HandleRef( this, this.Hdc ), size ); 462IntUnsafeNativeMethods.SetViewportExtEx( new HandleRef( this, this.Hdc ), newExtent.Width, newExtent.Height, oldExtent ); 475IntUnsafeNativeMethods.GetViewportOrgEx( new HandleRef( this, this.Hdc ), point ); 491IntUnsafeNativeMethods.SetViewportOrgEx( new HandleRef( this, this.Hdc ), newOrigin.X, newOrigin.Y, oldOrigin );
misc\GDI\WindowsFont.cs (4)
93IntUnsafeNativeMethods.GetObject(new HandleRef(this, this.hFont), this.logFont); 255IntPtr hFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(null, hdc), IntNativeMethods.OBJ_FONT); 282IntUnsafeNativeMethods.GetObject(new HandleRef(null, hFont), lf); 317IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.hFont));
misc\GDI\WindowsGraphics2.cs (15)
78HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 83IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(pen, pen.HPen)); 108HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 113IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(pen, pen.HPen)); 118IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(brush, brush.HBrush)); 211HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 298HandleRef hdc = new HandleRef(null, this.dc.Hdc); 385HandleRef hdc = new HandleRef(null, this.dc.Hdc); 487HandleRef hdc = new HandleRef(null, this.dc.Hdc); 588HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 602IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(null, IntUnsafeNativeMethods.GetStockObject(IntNativeMethods.HOLLOW_BRUSH))); 626HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 638IntUnsafeNativeMethods.FillRect(hdc, ref rect, new HandleRef(brush, hBrush)); 658HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 703HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc );
misc\GDI\WindowsRegion.cs (5)
126return IntUnsafeNativeMethods.CombineRgn(new HandleRef(this, this.HRegion), new HandleRef(region1, region1.HRegion), new HandleRef(region2, region2.HRegion), mode); 152IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.nativeHandle)); 195IntUnsafeNativeMethods.GetRgnBox(new HandleRef(this, this.nativeHandle), ref rect);
winforms\Managed\System\WinForms\AccessibleObject.cs (2)
2393new HandleRef(this, handle), 2402new HandleRef(this, handle),
winforms\Managed\System\WinForms\Application.cs (41)
158IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), "ImageList_WriteEx"); 166IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), "ImageList_WriteEx"); 795SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, handle), out processId); 796if (processId == thisPID && SafeNativeMethods.IsWindowVisible(new HandleRef(null, handle))) { 799SafeNativeMethods.RedrawWindow(new HandleRef(null, handle), 815UnsafeNativeMethods.EnumChildWindows(new HandleRef(null, handle), 820UnsafeNativeMethods.SendMessage(new HandleRef(null, handle), NativeMethods.WM_THEMECHANGED, 0, 0); 2110if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new HandleRef(null, msg.hwnd))) { 2396UnsafeNativeMethods.DuplicateHandle(new HandleRef(null, SafeNativeMethods.GetCurrentProcess()), new HandleRef(null, SafeNativeMethods.GetCurrentThread()), 2397new HandleRef(null, SafeNativeMethods.GetCurrentProcess()), ref address, 0, false, 2450UnsafeNativeMethods.CoRegisterMessageFilter(new HandleRef(null, msgFilterPtr), ref dummy); 2818UnsafeNativeMethods.CloseHandle(new HandleRef(this, handle)); 2865int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(parkingWindows[0], parkingWindows[0].Handle), out pid); 3008UnsafeNativeMethods.CloseHandle(new HandleRef(this, handle)); 3405HandleRef hwndOwner = new HandleRef(null, IntPtr.Zero); 3428hwndOwner = new HandleRef(null, UnsafeNativeMethods.GetWindowLong(new HandleRef(currentForm, currentForm.Handle), NativeMethods.GWL_HWNDPARENT)); 3436hwndOwner = new HandleRef(null, IntPtr.Zero); 3445SafeNativeMethods.IsWindowEnabled(new HandleRef(currentForm, currentForm.Handle)) != modalEnabled) { 3446SafeNativeMethods.EnableWindow(new HandleRef(currentForm, currentForm.Handle), modalEnabled); 3535if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new HandleRef(null, msg.hwnd))) { 3697IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(null, msg.hwnd), NativeMethods.GA_ROOT); 3702if (hwndRoot != IntPtr.Zero && UnsafeNativeMethods.IsDialogMessage(new HandleRef(null, hwndRoot), ref msg)) 3968SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()), out pid); 4149int id = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, HandleInternal), out lpdwProcessId); 4156UnsafeNativeMethods.PostMessage(new HandleRef(this, HandleInternal), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4167IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 4187UnsafeNativeMethods.SetParent(handle, new HandleRef(this, Handle)); 4211UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4251if (SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWnd)) && SafeNativeMethods.IsWindowEnabled(new HandleRef(null, hWnd))) { 4275if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) { 4301if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) SafeNativeMethods.EnableWindow(new HandleRef(null, hWnd), state); 4313if (activeHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new HandleRef(null, activeHwnd))) { 4314UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, activeHwnd)); 4317if (focusedHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new HandleRef(null, focusedHwnd))) { 4318UnsafeNativeMethods.SetFocus(new HandleRef(null, focusedHwnd)); 4345IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, MainForm.Handle), NativeMethods.GWL_HWNDPARENT); 4350parentWindowContext = GetContextForHandle(new HandleRef(this, parentHandle));
winforms\Managed\System\WinForms\AxHost.cs (22)
1348uiDeactivate = !UnsafeNativeMethods.IsChild(new HandleRef(this, GetHandleNoCreate()), new HandleRef(null, hwndFocus)); 1455logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 1456logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 1458UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 1615IntPtr currentWndproc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1626UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC, new HandleRef(this, currentWndproc)); 2123if (SafeNativeMethods.IsAccelerator(new HandleRef(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) { 3381SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(this, handle), 0, 0, name, 1, ref o, uuids.cElems, new HandleRef(null, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero); 3501Application.ParkHandle(new HandleRef(ipo, hwnd)); 3561IntPtr wndProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 3591wndprocAddr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_WNDPROC); 5160int hr = UnsafeNativeMethods.VarFormat(ref var, new HandleRef(null, pszFormat), firstD, firstW, 32 /* VAR_FORMAT_NOSUBSTITUTE */, ref pbstr); 5175SafeNativeMethods.SysFreeString(new HandleRef(null, pbstr)); 6694IntPtr pointer = UnsafeNativeMethods.GlobalLock(new HandleRef(null, hglobal)); 6701UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, hglobal)); 6706iLockBytes = UnsafeNativeMethods.CreateILockBytesOnHGlobal(new HandleRef(null, hglobal), true); 6722UnsafeNativeMethods.GlobalFree(new HandleRef(null, hglobal)); 6796IntPtr pointer = UnsafeNativeMethods.GlobalLock(new HandleRef(null, hglobal)); 6807UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, hglobal));
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (2)
100SafeNativeMethods.FillRect(new HandleRef(e, e.HDC), ref r, new HandleRef(this,
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (1)
263SafeNativeMethods.DrawFrameControl(new HandleRef(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\CheckedListBox.cs (3)
551SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), ref rect, false); 880SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), null, true); 1672UnsafeNativeMethods.ClientToScreen(new HandleRef(ParentCheckedListBox, ParentCheckedListBox.Handle), pt);
winforms\Managed\System\WinForms\ColumnHeader.cs (4)
397IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETHEADER, 0, 0); 399int nativeColumnCount = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, hwndHdr), NativeMethods.HDM_GETITEMCOUNT, 0, 0); 401width = (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 (48)
1132UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_REPLACESEL, NativeMethods.InvalidIntPtr, str); 1152UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, start, end); 1173UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, value, (int[])null); 1608UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref comboRectMid); 1613UnsafeNativeMethods.GetWindowRect(new HandleRef(this, childEdit.Handle), ref editRectMid); 1769UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 1838UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 1930UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_CONTEXTMENU, m.WParam, m.LParam); 1983UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref rect); 2049SafeNativeMethods.InvalidateRect(new HandleRef(this, childEdit.Handle), null, false); 2052SafeNativeMethods.InvalidateRect(new HandleRef(this, childListBox.Handle), null, false); 2211SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor)); 2212SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor)); 2293SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 2359UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETLBTEXT, index, sb); 2440IntPtr hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 2451hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, hwnd), NativeMethods.GW_HWNDNEXT); 2459UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 3165SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3172if (!stringSource.Bind(new HandleRef(this, childEdit.Handle), (int)AutoCompleteMode)) { 3189SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3196if (!stringSource.Bind(new HandleRef(this, childEdit.Handle), (int)AutoCompleteMode)) { 3212SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3229int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), (int)AutoCompleteSource | mode); 3239SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3376SafeNativeMethods.SetWindowPos(new HandleRef(this, dropDownHandle), NativeMethods.NullHandleRef, 0, 0, DropDownWidth, height, 3443UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.WM_SETTEXT, IntPtr.Zero, s); 3454SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rect); 3621SafeNativeMethods.SelectPalette(new HandleRef(this, dis.hDC), new HandleRef(null, oldPal), 0); 3689UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_MOUSELEAVE, 0, 0); 3724UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 3763NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)SafeNativeMethods.GetUpdateRgn(new HandleRef(this, this.Handle), new HandleRef(this, wr.HRegion), true); 3775dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 3799UnsafeNativeMethods.EndPaint(new HandleRef(this, Handle), ref ps); 3940new HandleRef(this, Handle), 3983m.Result = UnsafeNativeMethods.LresultFromObject(ref IID_IAccessible, m.WParam, new HandleRef(this, punkAcc)); 4804SafeNativeMethods.InvalidateRect(new HandleRef(this, _owningComboBox.GetListHandle()), null, false); 5137UnsafeNativeMethods.UiaHostProviderFromHwnd(new HandleRef(this, _handle), out provider); 5355UnsafeNativeMethods.UiaHostProviderFromHwnd(new HandleRef(this, _childListControlhandle), out provider); 5767UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, acHandle), 5782return SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle)); 5871UnsafeNativeMethods.EnumThreadWindows(SafeNativeMethods.GetCurrentThreadId(), new NativeMethods.EnumThreadWindowsCallback(this.Callback), new HandleRef(null, IntPtr.Zero)); 5875HandleRef hRef = new HandleRef(null, hWnd); 6110SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6115SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6120SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6125SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect);
winforms\Managed\System\WinForms\CommonDialog.cs (9)
155UnsafeNativeMethods.SetFocus(new HandleRef(null, wparam)); 158UnsafeNativeMethods.PostMessage(new HandleRef(null, hWnd), CDM_SETDEFAULTFOCUS, 0, 0); 165UnsafeNativeMethods.SetFocus(new HandleRef(this, defaultControlHwnd)); 178UnsafeNativeMethods.GetWindowRect(new HandleRef(null, hWnd), ref r); 182SafeNativeMethods.SetWindowPos(new HandleRef(null, hWnd), NativeMethods.NullHandleRef, x, y, 0, 0, NativeMethods.SWP_NOSIZE | 304defOwnerWndProc = UnsafeNativeMethods.SetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC, ownerProc); 319IntPtr currentSubClass = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC); 321UnsafeNativeMethods.SetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC, new HandleRef(this, defOwnerWndProc));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (3)
69SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(parent, handle), 0, 0, "PropertyPages", 1, ref o, 1, new Guid[]{guid}, Application.CurrentCulture.LCID, 0, IntPtr.Zero); 92SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(parent, handle), 0, 0, "PropertyPages", 1, ref o, uuids.cElems, new HandleRef(uuids, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (2)
207SafeNativeMethods.SysFreeString(new HandleRef(null, bstr)); 240SafeNativeMethods.VariantClear(new HandleRef(null, curVariant));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
75new HandleRef(null, parentHandle),
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
1243SafeNativeMethods.VariantInit(new HandleRef(null, mem)); 1322SafeNativeMethods.VariantClear(new HandleRef(null, mem));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (3)
101SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(null, parentHandle), 105new HandleRef(null, (IntPtr)(long)pAddrs), 107new HandleRef(null, guidsAddr),
winforms\Managed\System\WinForms\ContainerControl.cs (7)
679UnsafeNativeMethods.SetFocus(new HandleRef(activeControl, activeControl.Handle)); 698UnsafeNativeMethods.SetFocus(new HandleRef(cc, cc.Handle)); 716UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), ref clientRectangle); 718UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.Handle), topLeftPoint); 744HandleRef hdc = new HandleRef(this, dc); 754HandleRef hfont = new HandleRef(this, FontHandle); 755HandleRef hfontOld = new HandleRef(this, SafeNativeMethods.SelectObject(hdc, hfont));
winforms\Managed\System\WinForms\ContextMenu.cs (2)
231SafeNativeMethods.TrackPopupMenuEx(new HandleRef(this, Handle), 235new HandleRef(control, control.Handle),
winforms\Managed\System\WinForms\Control.cs (205)
1405bool visible = SafeNativeMethods.IsWindowVisible(new HandleRef(window, Handle)); 1406bool enabled = SafeNativeMethods.IsWindowEnabled(new HandleRef(window, Handle)); 1480UnsafeNativeMethods.SetCapture(new HandleRef(this, Handle)); 1678if (UnsafeNativeMethods.IsChild(new HandleRef(this, this.Handle), new HandleRef(this, focusHwnd))) { 2020return SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid); 2089UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2929IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 2937int len = UnsafeNativeMethods.GetClassName(new HandleRef(null, lastParentHandle), null, 0); 2941UnsafeNativeMethods.GetClassName(new HandleRef(null, lastParentHandle), sb, sb.Capacity); 2949parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(null, parentHandle)); 3000UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref temp); 3015(next = UnsafeNativeMethods.GetWindow(new HandleRef(null, prev), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero; 3018UnsafeNativeMethods.GetWindowRect(new HandleRef(null, next), ref temp); 3021if (SafeNativeMethods.IsWindowVisible(new HandleRef(null, next))) { 3087hwnd = new HandleRef(this, Handle); 3096hwnd = new HandleRef(marshalingControl, marshalingControl.Handle); 3592if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle))) != 0) { 3599SafeNativeMethods.DeleteObject(new HandleRef(null, regionHandle)); 4219UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.Handle), 4262UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.Handle), 4472return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 4475UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)value)); 4485return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE)); 4488UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)value)); 4538int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(window, Handle)); 4546UnsafeNativeMethods.GetWindowText(new HandleRef(window, Handle), sb, sb.Capacity); 4554UnsafeNativeMethods.SetWindowText(new HandleRef(window, Handle), value); 5293UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), objectID, childID + 1); 5615else if (IsHandleCreated && GetTopLevel() && SafeNativeMethods.IsWindowEnabled(new HandleRef(window, Handle))) { 5616SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 5948if (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, Handle), threadCallbackMessage, 5978if (0 != (NativeMethods.WS_EX_MDICHILD & (int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(window, InternalHandle), NativeMethods.GWL_EXSTYLE))) { 6000SafeNativeMethods.DeleteObject(new HandleRef(this, p)); 6174UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)hDc, 6180SafeNativeMethods.BitBlt(new HandleRef(destGraphics, desthDC), targetBounds.X, targetBounds.Y, width, height, 6181new HandleRef(g, hDc), 0, 0, 0xcc0020); 6214if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(marshaler, marshaler.Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) { 6370UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 6409handle = UnsafeNativeMethods.GetAncestor(new HandleRef(null, handle), NativeMethods.GA_PARENT); 6485IntPtr hwnd = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y, value); 6675int id = UnsafeNativeMethods.GetMenuItemID(new HandleRef(null, hmenu), item); 6678childMenu = UnsafeNativeMethods.GetSubMenu(new HandleRef(null, hmenu), item); 6679int count = UnsafeNativeMethods.GetMenuItemCount(new HandleRef(null, childMenu)); 6802for (IntPtr hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndParent), NativeMethods.GW_CHILD); 6804hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndChild), NativeMethods.GW_HWNDNEXT)) { 7047Debug.Assert(hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))); 7053if (hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) { 7142SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor)); 7143SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor)); 7218SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 7219null, new HandleRef(region, regionHandle), 7228SafeNativeMethods.InvalidateRgn(new HandleRef(this, Handle), 7229new HandleRef(region, regionHandle), 7235SafeNativeMethods.DeleteObject(new HandleRef(region, regionHandle)); 7269SafeNativeMethods.RedrawWindow(new HandleRef(window, Handle), 7279SafeNativeMethods.InvalidateRect(new HandleRef(window, Handle), 7314SafeNativeMethods.RedrawWindow(new HandleRef(window, Handle), 7328SafeNativeMethods.InvalidateRect(new HandleRef(window, Handle), 7805if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) { 7838UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 7971SafeNativeMethods.DeleteObject(new HandleRef(this, p)); 8170SafeNativeMethods.EnableWindow(new HandleRef(this, Handle), Enabled); 8405UnsafeNativeMethods.SetParent(new HandleRef(this, this.Handle), new HandleRef(parent, parent.Handle)); 8435Application.ParkHandle(new HandleRef(this, this.Handle), this.DpiAwarenessContext); 8732deviceDpi = (int)UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 8752if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle))) != 0) { 8759SafeNativeMethods.DeleteObject(new HandleRef(null, regionHandle)); 8792UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), text); 8817UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 8833if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 8876SafeNativeMethods.DeleteObject(new HandleRef(this, p)); 9404UnsafeNativeMethods.GetClientRect(new HandleRef(window, InternalHandle), ref rect); 10090UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), point, 1); 10107UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, point, 1); 10352HandleRef hClippingRegion = new HandleRef(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x,viewportOrg.y, viewportOrg.x + this.Width, viewportOrg.y + this.Height)); 10379bool success = UnsafeNativeMethods.GetWindowRect(new HandleRef(null, this.Handle), ref windowRect); 10825new HandleRef(topMostParent, topMostParent.Handle), 10826UnsafeNativeMethods.GetParent(new HandleRef(null, topMostParent.Handle)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE, 10858while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, hwnd), 10970HandleRef parentHandle = new HandleRef(this, UnsafeNativeMethods.GetParent(new HandleRef(this, this.Handle))); 11036UnsafeNativeMethods.SetParent(new HandleRef(this, this.Handle), parentHandle); 11062UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), ref rect, 2); 11079UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, ref rect, 2); 11121UnsafeNativeMethods.UiaReturnRawElementProvider(new HandleRef(this, handle), new IntPtr(0), new IntPtr(0), null); 11246int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(this, Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this))); 11255int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(this, Handle)); 11732return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11741return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, ref wparam, ref lparam); 11745return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, (IntPtr)wparam, lparam); 11750return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11755return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, (IntPtr)lparam); 11764return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, ref lparam); 11773return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11782return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11793SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_BOTTOM, 0, 0, 0, 0, 11898SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.NullHandleRef, x, y, width, height, flags); 11971IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(window, Handle)); 11998Application.ParkHandle(new HandleRef(window, Handle), this.DpiAwarenessContext); 12002UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, value)); 12006Application.UnparkHandle(new HandleRef(window, Handle), window.DpiAwarenessContext); 12014UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, IntPtr.Zero)); 12015Application.UnparkHandle(new HandleRef(window, Handle), window.DpiAwarenessContext); 12055IntPtr result = SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, halftonePalette), (force ? 0 : 1)); 12058SafeNativeMethods.RealizePalette(new HandleRef(null, dc)); 12131SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), value ? ShowParams : NativeMethods.SW_HIDE); 12144SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), 12183if (!SafeNativeMethods.IsWindowVisible(new HandleRef(this,this.Handle))) { 12198new HandleRef(window, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | 12418int styleFlags = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 12419UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag))); 12505SafeNativeMethods.UpdateWindow(new HandleRef(window, InternalHandle)); 12517UnsafeNativeMethods.GetClientRect(new HandleRef(window, InternalHandle), ref rect); 12520UnsafeNativeMethods.GetWindowRect(new HandleRef(window, InternalHandle), ref rect); 12522UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(null, UnsafeNativeMethods.GetParent(new HandleRef(window, InternalHandle))), ref rect, 2); 12644while ((hWnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWnd), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) { 12672IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 12705if (UnsafeNativeMethods.GetWindow(new HandleRef(ctl.window, ctl.Handle), NativeMethods.GW_HWNDPREV) != prevHandle) { 12708SafeNativeMethods.SetWindowPos(new HandleRef(ctl.window, ctl.Handle), new HandleRef(null, prevHandle), 0, 0, 0, 0, 12756new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 12800parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(null, parentHandle)); 12802int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(null, lastParentHandle), NativeMethods.GWL_STYLE))); 12811UnsafeNativeMethods.PostMessage(new HandleRef(null, lastParentHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 12965UnsafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rc); 13045new HandleRef(this, Handle), 13110m.Result = UnsafeNativeMethods.LresultFromObject(ref IID_IAccessible, m.WParam, new HandleRef(ctrlAccessibleObject, punkAcc)); 13423deviceDpi = (int)UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 13450uint dpi = UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 13586m.Result = UnsafeNativeMethods.SendMessage(new HandleRef(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 13590UnsafeNativeMethods.SendMessage(new HandleRef(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 13617IntPtr p = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, m.HWnd), ctrlId); 13669dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, hWnd), ref ps); 13767SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, oldPal), 0); 13778UnsafeNativeMethods.EndPaint(new HandleRef(this, hWnd), ref ps); 13795IntPtr dc = UnsafeNativeMethods.GetDC(new HandleRef(this, Handle)); 13801UnsafeNativeMethods.ReleaseDC(new HandleRef(this, Handle), new HandleRef(null, dc)); 13873hWnd = UnsafeNativeMethods.GetDlgItem(new HandleRef(this, Handle), NativeMethods.Util.HIWORD(m.WParam)); 14075if (parent != null && UnsafeNativeMethods.GetParent(new HandleRef(window, InternalHandle)) == parent.InternalHandle && 14425result = UnsafeNativeMethods.SendMessage(new HandleRef(null, hwndFocus), 14429hwndFocus = UnsafeNativeMethods.GetParent(new HandleRef(null, hwndFocus)); 16194UnsafeNativeMethods.GetWindowRect(new HandleRef(this, this.Handle), ref rectangle); 16510logPixels.X = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 16511logPixels.Y = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 16512UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 16576UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hwndMap), new HandleRef(control, control.Handle), pt, 1); 16584UnsafeNativeMethods.MapWindowPoints(new HandleRef(target, target.Handle), new HandleRef(realTarget, realTarget.Handle), pt, 1); 16666int hdcType = UnsafeNativeMethods.GetObjectType(new HandleRef(null, hdcDraw)); 16693SafeNativeMethods.LPtoDP(new HandleRef(null, hdcDraw), ref rc, 2); 16695iMode = SafeNativeMethods.SetMapMode(new HandleRef(null, hdcDraw), NativeMethods.MM_ANISOTROPIC); 16696SafeNativeMethods.SetWindowOrgEx(new HandleRef(null, hdcDraw), 0, 0, pW); 16697SafeNativeMethods.SetWindowExtEx(new HandleRef(null, hdcDraw), control.Width, control.Height, sWindowExt); 16698SafeNativeMethods.SetViewportOrgEx(new HandleRef(null, hdcDraw), rc.left, rc.top, pVp); 16699SafeNativeMethods.SetViewportExtEx(new HandleRef(null, hdcDraw), rc.right - rc.left, rc.bottom - rc.top, sViewportExt); 16714control.PrintToMetaFile(new HandleRef(null, hdcDraw), flags); 16721SafeNativeMethods.SetWindowOrgEx(new HandleRef(null, hdcDraw), pW.x, pW.y, null); 16722SafeNativeMethods.SetWindowExtEx(new HandleRef(null, hdcDraw), sWindowExt.cx, sWindowExt.cy, null); 16723SafeNativeMethods.SetViewportOrgEx(new HandleRef(null, hdcDraw), pVp.x, pVp.y, null); 16724SafeNativeMethods.SetViewportExtEx(new HandleRef(null, hdcDraw), sViewportExt.cx, sViewportExt.cy, null); 16725SafeNativeMethods.SetMapMode(new HandleRef(null, hdcDraw), iMode); 16933 UnsafeNativeMethods.DestroyAcceleratorTable(new HandleRef(this, accelTable)); 16937accelTable = UnsafeNativeMethods.CreateAcceleratorTable(new HandleRef(null, accelBlob), accelCount); 17105UnsafeNativeMethods.SetParent(new HandleRef(control, control.Handle), new HandleRef(null, hwndParent)); 17451SafeNativeMethods.CombineRgn(new HandleRef(null, newRegion), new HandleRef(null, region), new HandleRef(this, clipRegion), NativeMethods.RGN_DIFF); 17452SafeNativeMethods.DeleteObject(new HandleRef(null, region)); 17455SafeNativeMethods.DeleteObject(new HandleRef(null, newRegion)); 18194UnsafeNativeMethods.DestroyAcceleratorTable(new HandleRef(this, accelTable)); 18407IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(control, control.Handle)); 18412UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hWndParent), new HandleRef(control, control.Handle), ref rcIntersect, 2); 18438UnsafeNativeMethods.SetWindowRgn(new HandleRef(control, control.Handle), new HandleRef(this, finalClipRegion), SafeNativeMethods.IsWindowVisible(new HandleRef(control, control.Handle))); 18534if (SafeNativeMethods.IsWindowUnicode(new HandleRef(null, lpmsg.hwnd))) { 19248hBitmapDC = new HandleRef(this, UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef)); 19252hBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(size.Width, size.Height, planes, bitsPixel, IntPtr.Zero)); 19254hOriginalBmp = new HandleRef(this, SafeNativeMethods.SelectObject(hBitmapDC, hBitmap)); 19300HandleRef hNullBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(1, 1, 1, 1, IntPtr.Zero)); 19304HandleRef hBitmap = new HandleRef(this, SafeNativeMethods.SelectObject(hdcSrc, hNullBitmap)); 19660UnsafeNativeMethods.FreeLibrary(new HandleRef(null, oleAccAvailable)); 19873UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), NativeMethods.OBJID_CLIENT, 0); 19887UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), NativeMethods.OBJID_CLIENT, childID + 1); 19901UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), objectID, childID + 1); 19954UnsafeNativeMethods.UiaHostProviderFromHwnd(new HandleRef(this, Handle), out provider); 20017SafeNativeMethods.DeleteObject(new HandleRef(this, handle));
winforms\Managed\System\WinForms\Control.Ime.cs (26)
426focusHandle = UnsafeNativeMethods.GetAncestor(new HandleRef(null, focusHandle), NativeMethods.GA_ROOT); 902IntPtr oldContext = UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), NativeMethods.NullHandleRef ); 921IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 931UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 936UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), new HandleRef( null, originalImeContext ) ); 941UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 974inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 996UnsafeNativeMethods.ImmGetConversionStatus( new HandleRef( null, inputContext ), ref conversion, ref sentence ); 1023UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 1113IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1120retval = UnsafeNativeMethods.ImmGetOpenStatus( new HandleRef( null, inputContext ) ); 1122UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 1204IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1207UnsafeNativeMethods.ImmGetConversionStatus( new HandleRef( null, inputContext ), ref conversion, ref sentence ); 1213bool retval = UnsafeNativeMethods.ImmSetConversionStatus( new HandleRef( null, inputContext ), conversion, sentence ); 1215UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 1234IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1239bool succeeded = UnsafeNativeMethods.ImmSetOpenStatus( new HandleRef( null, inputContext ), open ); 1244succeeded = UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) );
winforms\Managed\System\WinForms\ControlPaint.cs (70)
163IntPtr palette = SafeNativeMethods.CreateHalftonePalette(new HandleRef(null, hdcS)); 164UnsafeNativeMethods.GetObject(new HandleRef(null, palette), 2, ref entryCount); 166SafeNativeMethods.GetPaletteEntries(new HandleRef(null, palette), 0, entryCount, entries); 175SafeNativeMethods.DeleteObject(new HandleRef(null, palette)); 205hBitmap = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdcS), new HandleRef(null, bitmapInfo), NativeMethods.DIB_RGB_COLORS, 215IntPtr previousBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hBitmap)); 220SafeNativeMethods.DeleteObject( new HandleRef( null, previousBitmap ) ); 230SafeNativeMethods.DeleteObject( new HandleRef( null, hBitmap ) ); 308IntPtr source = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hdcS)); 309IntPtr target = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hdcS)); 310UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hdcS)); 311IntPtr previousSourceBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, monochromeMask)); 312IntPtr previousTargetBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, colorMask)); 321SafeNativeMethods.SetBkColor(new HandleRef(null, target), 0x00ffffff); // white 322SafeNativeMethods.SetTextColor(new HandleRef(null, target), 0); // black 323SafeNativeMethods.BitBlt(new HandleRef(null, target), 0, 0, size.Width, size.Height, new HandleRef(null, source), 326SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, previousSourceBitmap)); 327SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, previousTargetBitmap)); 328UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, source)); 329UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, target)); 348SafeNativeMethods.DeleteObject(new HandleRef(null, hBitmap)); 358HandleRef targetHDC = new HandleRef( null, targetDC.GetHdc()); 1284SafeNativeMethods.DrawFrameControl(new HandleRef(null, dc), ref rcCheck, 1783IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1797int prevRop2 = SafeNativeMethods.SetROP2(new HandleRef(null, dc), rop2); 1798IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1799IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1800SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(graphicsColor)); 1801SafeNativeMethods.Rectangle(new HandleRef(null, dc), rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom); 1803SafeNativeMethods.SetROP2(new HandleRef(null, dc), prevRop2); 1804SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 1805SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldPen)); 1809SafeNativeMethods.DeleteObject(new HandleRef(null, pen)); 1812UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 1826IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1829int prevRop2 = SafeNativeMethods.SetROP2(new HandleRef(null, dc), rop2); 1830IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1831IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1834SafeNativeMethods.MoveToEx(new HandleRef(null, dc), start.X, start.Y, null); 1835SafeNativeMethods.LineTo(new HandleRef(null, dc), end.X, end.Y); 1837SafeNativeMethods.SetROP2(new HandleRef(null, dc), prevRop2); 1838SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 1839SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldPen)); 1840SafeNativeMethods.DeleteObject(new HandleRef(null, pen)); 1841UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 2007IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 2010int prevRop2 = SafeNativeMethods.SetROP2(new HandleRef(null, dc), rop2); 2011IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, brush)); 2014SafeNativeMethods.PatBlt(new HandleRef(null, dc), rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3); 2016SafeNativeMethods.SetROP2(new HandleRef(null, dc), prevRop2); 2017SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 2018SafeNativeMethods.DeleteObject(new HandleRef(null, brush)); 2019UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc));
winforms\Managed\System\WinForms\Cursor.cs (19)
231UnsafeNativeMethods.SetCursor(new HandleRef(value, handle)); 278SafeNativeMethods.GetIconInfo(new HandleRef(this, currentIcon.Handle), info); 287SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, info.hbmMask)); 292SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, info.hbmColor)); 365return SafeNativeMethods.CopyImage(new HandleRef(this, Handle), NativeMethods.IMAGE_CURSOR, sz.Width, sz.Height, 0); 375UnsafeNativeMethods.DestroyCursor(new HandleRef(this, handle)); 467SafeNativeMethods.DrawIcon(new HandleRef(graphics, dc), targetX, targetY, new HandleRef(this, handle)); 483SafeNativeMethods.DrawIcon(new HandleRef(graphics, dc), targetX, targetY, new HandleRef(this, handle)); 498SafeNativeMethods.IntersectClipRect(new HandleRef(this, Handle), targetX, targetY, targetX+clipWidth, targetY+clipHeight); 499SafeNativeMethods.DrawIconEx(new HandleRef(graphics, dc), targetX - imageX, targetY - imageY, 500new HandleRef(this, handle), drawWidth, drawHeight, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 593SafeNativeMethods.GetIconInfo(new HandleRef(this, iconHandle), info); 597UnsafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp); 598SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 602UnsafeNativeMethods.GetObject(new HandleRef(null, info.hbmMask), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp); 607SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask)); 640handle = SafeNativeMethods.CopyImageAsCursor(new HandleRef(this, cursorHandle), NativeMethods.IMAGE_CURSOR,
winforms\Managed\System\WinForms\DataGrid.cs (12)
2299SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 5857IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5859IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5860SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 5861SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5862SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 5863UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(this, dc)); 8629SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 0, deltaY, ref scrollArea, ref scrollArea); 8883SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 0, -parentRowsRect.Height, ref scrollRECT, ref scrollRECT);
winforms\Managed\System\WinForms\DataGridToolTip.cs (5)
49UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 50SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 51UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 73UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 82UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo);
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
1330UnsafeNativeMethods.SetFocus(new HandleRef(null, IntPtr.Zero));
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1441SafeNativeMethods.DrawFrameControl(new HandleRef(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (3)
840UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, cachedDropDownWidth, 0); 847int dropDownWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_GETDROPPEDWIDTH, 0, 0)); 850UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, this.DropDownWidth, 0);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (24)
5767IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5769IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5771SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5772SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5773SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5774SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5776SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5777SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 5778UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(this, dc)); 5788IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5790IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5791SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 5792SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5793SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 5794UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(this, dc)); 26360SafeNativeMethods.ScrollWindow(new HandleRef(this, this.Handle), 26471SafeNativeMethods.ScrollWindow(new HandleRef(this, this.Handle), 0, deltaY, ref scrollArea, ref scrollArea); 29938UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\DataObject.cs (46)
150IntPtr dcSrc = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hDC)); 151IntPtr srcOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(bm, hBitmap)); 155IntPtr dcDest = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hDC)); 156IntPtr hBitmapNew = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hDC), bm.Size.Width, bm.Size.Height); 160IntPtr destOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, hBitmapNew)); 161SafeNativeMethods.BitBlt(new HandleRef(null, dcDest), 0, 0, bm.Size.Width, bm.Size.Height, new HandleRef(null, dcSrc), 0, 0, 0x00CC0020); 165SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(null, srcOld)); 166SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, destOld)); 168UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, dcSrc)); 169UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, dcDest)); 170UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 172SafeNativeMethods.DeleteObject(new HandleRef(bm, hBitmap)); 772UnsafeNativeMethods.GlobalFree(new HandleRef(medium, medium.unionmember)); 951UnsafeNativeMethods.GlobalFree(new HandleRef(null, handle)); 958IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 969UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1014IntPtr newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1020IntPtr basePtr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1065UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, newHandle)); 1082newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1090IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1108newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1116IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1125UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, newHandle)); 1139newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1147IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1156UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, newHandle)); 1428IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(innerData, hglobal)); 1430UnsafeNativeMethods.GlobalUnlock(new HandleRef(innerData, hglobal)); 1521UnsafeNativeMethods.GlobalFree(new HandleRef(null, hglobal)); 1644SafeNativeMethods.DeleteObject(new HandleRef(null, medium.unionmember)); 1693IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1698int size = UnsafeNativeMethods.GlobalSize(new HandleRef(null, handle)); 1730UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1842int count = UnsafeNativeMethods.DragQueryFile(new HandleRef(null, hdrop), unchecked((int)0xFFFFFFFF), null, 0); 1848int charlen = UnsafeNativeMethods.DragQueryFileLongPath(new HandleRef(null, hdrop), i, sb); 1875IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1885UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1894IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1896int size = UnsafeNativeMethods.GlobalSize(new HandleRef(null, handle)); 1902UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle));
winforms\Managed\System\WinForms\DateTimePicker.cs (14)
418int gdt = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_GETSYSTEMTIME, 0, sys); 431UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 436UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1036UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1154UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1380UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1457UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETRANGE, flags, sa); 1574UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, Handle), cb, NativeMethods.NullHandleRef); 1576SafeNativeMethods.InvalidateRect(new HandleRef(c, c.hwndFound), null, true); 1577SafeNativeMethods.UpdateWindow(new HandleRef(c, c.hwndFound)); 1638int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE))); 1641UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE, new HandleRef(this, (IntPtr)style));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (31)
692hbrushDither = SafeNativeMethods.CreatePatternBrush(new HandleRef(null, hbitmapTemp)); 697SafeNativeMethods.DeleteObject(new HandleRef(null, hbitmapTemp)); 712hfontOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(Parent, ((Control)Parent).FontHandle)); 717SafeNativeMethods.SetBkMode(new HandleRef(null, dc), NativeMethods.TRANSPARENT); 720SafeNativeMethods.SetBkColor(new HandleRef(null, dc), backColor); 721IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_CLIPPED | NativeMethods.ETO_OPAQUE, ref rc, null, 0, null); 725IntUnsafeNativeMethods.GetTextExtentPoint32(new HandleRef(null, dc), itemText, size); 732SafeNativeMethods.SetTextColor(new HandleRef(null, dc), textColor); 733IntUnsafeNativeMethods.DrawText(new HandleRef(null, dc), itemText, ref rc2, 736SafeNativeMethods.ImageList_Draw(new HandleRef(imagelist, imagelist.Handle), imageIndex, new HandleRef(null, dc), 745savedColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight)); 750IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 753IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 756SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlDark)); 761IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 764IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 766SafeNativeMethods.SetBkColor(new HandleRef(null, dc), savedColor); 770SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hfontOld)); 778itemHeight = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMHEIGHT, 0, 0); 780UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_SETITEMHEIGHT, itemHeight, 0); 828SafeNativeMethods.DeleteObject(new HandleRef(this, hbrushDither)); 834IntPtr hbrushOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(this, hbrushDither)); 839oldTextColor = SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight)); 840oldBackColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.Control)); 842SafeNativeMethods.PatBlt(new HandleRef(null, dc), rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NativeMethods.PATCOPY); 843SafeNativeMethods.SetTextColor(new HandleRef(null, dc), oldTextColor); 844SafeNativeMethods.SetBkColor(new HandleRef(null, dc), oldBackColor);
winforms\Managed\System\WinForms\ErrorProvider.cs (17)
923UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 969UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 970SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 971UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 994SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), 1066IntPtr hdc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 1074SafeNativeMethods.DrawIconEx(new HandleRef(this, mirrordc.Hdc), bounds.X - windowBounds.X, bounds.Y - windowBounds.Y, new HandleRef(provider.Region, provider.Region.IconHandle), bounds.Width, bounds.Height, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 1082UnsafeNativeMethods.EndPaint(new HandleRef(this, Handle), ref ps); 1135UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo); 1231UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETTOOLINFO, 0, toolInfo); 1258if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(windowRegion, windowRegionHandle), true) != 0) { 1274SafeNativeMethods.DeleteObject(new HandleRef(null, windowRegionHandle)); 1278SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, windowBounds.X, windowBounds.Y, 1280SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), null, false); 1710SafeNativeMethods.GetBitmapBits(new HandleRef(null, mask), bits.Length, bits); 1725SafeNativeMethods.DeleteObject(new HandleRef(null, mask));
winforms\Managed\System\WinForms\FileDialog.cs (10)
210int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, dialogHWnd)); 212UnsafeNativeMethods.GetWindowText(new HandleRef(this, dialogHWnd), sb, sb.Capacity); 749dialogHWnd = UnsafeNativeMethods.GetParent(new HandleRef(null, hWnd)); 760int sizeNeeded = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, dialogHWnd), 1124 /*CDM_GETSPEC*/, System.IntPtr.Zero, System.IntPtr.Zero); 801UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), 0, new HandleRef(null, NativeMethods.InvalidIntPtr)); 806UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), 0, new HandleRef(null, NativeMethods.InvalidIntPtr)); 814UnsafeNativeMethods.EndDialog(new HandleRef(this, dialogHWnd), IntPtr.Zero); 925UnsafeNativeMethods.SetFocus(new HandleRef(null, focusHandle));
winforms\Managed\System\WinForms\FolderBrowserDialog.cs (2)
341UnsafeNativeMethods.SendMessage(new HandleRef(null, hwnd), (int) NativeMethods.BFFM_SETSELECTION, 1, selectedPath); 353UnsafeNativeMethods.SendMessage(new HandleRef(null, hwnd), (int) NativeMethods.BFFM_ENABLEOK, 0, isFileSystemFolder ? 1 : 0);
winforms\Managed\System\WinForms\FontDialog.cs (9)
477UnsafeNativeMethods.SendMessage(new HandleRef(null, hWnd), NativeMethods.WM_CHOOSEFONT_GETLOGFONT, 0, lf); 479int index = (int)UnsafeNativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 481UpdateColor((int)UnsafeNativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, 501IntPtr hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.cmb4); 502SafeNativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 503hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.stc4); 504SafeNativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 573UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 708UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
winforms\Managed\System\WinForms\Form.cs (85)
1778SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 2104int exStyle = unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 2107UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)cp.ExStyle)); 2521return new HandleRef(ownerWindow, ownerWindow.Handle); 2577SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), key, 0, 0, 0, 0, 2684UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_SHOWWINDOW, value ? 1 : 0, 0); 2713SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_SHOW); 2789SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_NORMAL); 2792SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_MAXIMIZE); 2795SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_MINIMIZE); 3091UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, Handle)); 3247UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MINIMIZE, 3251UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MINIMIZE, 3255UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MAXIMIZE, 3259UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MAXIMIZE, 3263UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_CLOSE, 3267UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_CLOSE, 3271UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_RESTORE, 3275UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_RESTORE, 3279UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_SIZE, 3283UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_SIZE, 3342IntPtr hmenu = UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Handle), false); 3433SafeNativeMethods.GetClientRect(new HandleRef(this, h), ref rc); 3457SafeNativeMethods.GetClientRect(new HandleRef(this, h), ref rc); 3696UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, TaskbarOwner); 4452ownerHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 4458UnsafeNativeMethods.GetWindowRect(new HandleRef(null, ownerHandle), ref ownerRect); 4497hWndOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 5000UnsafeNativeMethods.ClientToScreen(new HandleRef(this, Handle), ptToSnap); 5117SafeNativeMethods.SetWindowPos(new HandleRef(this, HandleInternal), NativeMethods.NullHandleRef, e.SuggestedRectangle.X, e.SuggestedRectangle.Y, e.SuggestedRectangle.Width, e.SuggestedRectangle.Height, NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 5514UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); 5533new HandleRef(this, this.Handle)); 5544etwcb.SetOwners(new HandleRef(this, this.Handle)); 5552UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, Handle), ref wp); 5767UnsafeNativeMethods.SetActiveWindow(new HandleRef(this, Handle)); 5770UnsafeNativeMethods.SetActiveWindow(new HandleRef(MdiParentInternal, MdiParentInternal.Handle)); 6091else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6107if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6113hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6114UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6156else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6171UnsafeNativeMethods.SendMessage(new HandleRef(null, hWndCapture), NativeMethods.WM_CANCELMODE, IntPtr.Zero, IntPtr.Zero); 6208if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6214hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6215UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6232if (!UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndActive))) hWndActive = hWndOwner; 6233if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndActive)) && SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWndActive))) { 6234UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, hWndActive)); 6236else if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndOwner)) && SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWndOwner))){ 6237UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, hWndOwner)); 6434ownerHwnd = new HandleRef(owner, owner.Handle); 6442UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHwnd); 6458result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA); 6462result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY); 6465result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 6520UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), new HandleRef(menu, menu.Handle)); 6523UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), NativeMethods.NullHandleRef); 6547UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero); 6553UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero); 6559IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6565UnsafeNativeMethods.SetMenu(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef); 6582SafeNativeMethods.DrawMenuBar(new HandleRef(this, Handle)); 6700IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6830SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 6848UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); 7260UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam); 7363UnsafeNativeMethods.ScreenToClient(new HandleRef(this, this.Handle), pt ); 7754HandleRef hRef = new HandleRef(null, hWnd); 7879SafeNativeMethods.SetWindowPos(new HandleRef(window, window.Handle), NativeMethods.HWND_TOPMOST, 7884UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, owner.Width); 7886UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETTITLE, NativeMethods.TTI_WARNING, SR.GetString(SR.SecurityToolTipCaption)); 7888if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO())) { 7892UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ACTIVATE, 1, 0); 7918UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7930UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetTOOLINFO()); 7931UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO()); 7932UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO()); 7938UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7939UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, GetTOOLINFO());
winforms\Managed\System\WinForms\GroupBox.cs (1)
771SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rect);
winforms\Managed\System\WinForms\Help.cs (4)
224handle = new HandleRef(parent, parent.Handle); 227handle = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()); 315handle = new HandleRef(parent, parent.Handle); 318handle = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow());
winforms\Managed\System\WinForms\HtmlDocument.cs (1)
832SafeNativeMethods.VariantClear(new HandleRef(null, (IntPtr)(a + VariantSize * i)));
winforms\Managed\System\WinForms\ImageList.cs (28)
312this.nativeImageList = new NativeImageList(SafeNativeMethods.ImageList_Duplicate(new HandleRef(himl, himl.Handle))); 314if(SafeNativeMethods.ImageList_GetIconSize(new HandleRef(this, this.nativeImageList.Handle), out x, out y)) { 319if(SafeNativeMethods.ImageList_GetImageInfo(new HandleRef(this, this.nativeImageList.Handle), 0, imageInfo)) { 321UnsafeNativeMethods.GetObject(new HandleRef(null, imageInfo.hbmImage), Marshal.SizeOf(bmp), bmp); 483int index = SafeNativeMethods.ImageList_ReplaceIcon(new HandleRef(this, Handle), -1, new HandleRef(icon, icon.Handle)); 499int index = SafeNativeMethods.ImageList_Add(new HandleRef(this, Handle), new HandleRef(null, hBitmap), new HandleRef(null, hMask)); 500SafeNativeMethods.DeleteObject(new HandleRef(null, hBitmap)); 501SafeNativeMethods.DeleteObject(new HandleRef(null, hMask)); 551SafeNativeMethods.ImageList_SetBkColor(new HandleRef(this, Handle), NativeMethods.CLR_NONE); 630SafeNativeMethods.ImageList_DrawEx(new HandleRef(this, Handle), index, new HandleRef(g, dc), x, y, 654UnsafeNativeMethods.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride)); 708if(SafeNativeMethods.ImageList_GetImageInfo(new HandleRef(this, this.Handle), index, imageInfo)) { 751SafeNativeMethods.ImageList_DrawEx(new HandleRef(this, Handle), index, new HandleRef(graphics, dc), 0, 0, 949SafeNativeMethods.ImageList_Destroy(new HandleRef(null, himl)); 1073return SafeNativeMethods.ImageList_GetImageCount(new HandleRef(owner, owner.Handle)); 1171bool ok = SafeNativeMethods.ImageList_Replace(new HandleRef(owner, owner.Handle), index, new HandleRef(null, hBitmap), new HandleRef(null, hMask)); 1172SafeNativeMethods.DeleteObject(new HandleRef(null, hBitmap)); 1173SafeNativeMethods.DeleteObject(new HandleRef(null, hMask)); 1424SafeNativeMethods.ImageList_Remove(new HandleRef(owner, owner.Handle), -1); 1580bool ok = SafeNativeMethods.ImageList_Remove(new HandleRef(owner, owner.Handle), index);
winforms\Managed\System\WinForms\ImageListStreamer.cs (2)
241int hResult = SafeNativeMethods.ImageList_WriteEx(new HandleRef(this, imagelistHandle), NativeMethods.ILP_DOWNLEVEL, new UnsafeNativeMethods.ComStreamFromDataStream(stream)); 248return SafeNativeMethods.ImageList_Write(new HandleRef(this, imagelistHandle), new UnsafeNativeMethods.ComStreamFromDataStream(stream));
winforms\Managed\System\WinForms\InputLanguage.cs (1)
77IntPtr handleOld = SafeNativeMethods.ActivateKeyboardLayout(new HandleRef(value, value.handle), 0);
winforms\Managed\System\WinForms\LinkLabel.cs (1)
406UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r);
winforms\Managed\System\WinForms\ListBox.cs (7)
1565UnsafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref r); 1616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETTEXT, index, sb); 1708UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETSELITEMS, count, result); 1782UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2269UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2349SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, oldPal), 0);
winforms\Managed\System\WinForms\ListView.cs (65)
446UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 688int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1642UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETTILEVIEWINFO, 0, tileViewInfo); 1663bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTILEVIEWINFO, 0, tileViewInfo); 2242UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_ARRANGE, (int) value, 0); 2518SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle)); 2842SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(null, odCacheFontHandle)); 2852SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle)); 3063UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_ENSUREVISIBLE, index, 0); 3184int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 3286displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, lastIndex - 1, ref info); 3290displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, -1 /* beginning */, ref info); 3339int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 3366int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi); 3379UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETITEMPOSITION, index, pt); 3553iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi)); 3555iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_HITTEST, 0, lvhi)); 3586IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 3588SafeNativeMethods.InvalidateRect(new HandleRef(this, hwndHdr), null, true); 3692return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTCOLUMN, index, lvColumn); 3743int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,this.Handle),NativeMethods.LVM_INSERTGROUP,index,lvgroup); 3940insertIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTITEM, 0, ref lvItem); 4281int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 4283UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 4288int callbackMask = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCALLBACKMASK, 0, 0)); 4290UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCALLBACKMASK, callbackMask, 0); 4567IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new HandleRef(this, this.Handle), NativeMethods.GW_CHILD); 4587UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), prc); 4594UnsafeNativeMethods.SendMessage(new HandleRef(this, hdrHWND), NativeMethods.HDM_LAYOUT, 0, ref hd); 4600SafeNativeMethods.SetWindowPos(new HandleRef(this, hdrHWND), 4601new HandleRef(this, wpos.hwndInsertAfter), 4697int retval = (int) UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 4761int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero); 4771UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SCROLL, 0, scrollY); 4826UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 4895int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETCOLUMN, ch.Index, lvColumn); 4981UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, orderedColumns.Length, orderedColumns); 5045IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 5046UnsafeNativeMethods.DestroyWindow(new HandleRef(null, oldHandle)); 5058UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5071UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5086UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMPOSITION32, index, pt); 5100UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMSTATE, index, ref lvItem); 5120int colWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, 0, 0)); 5142UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMTEXT, itemIndex, ref lvItem); 5180UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback); 5313int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 5352bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this,Handle),NativeMethods.LVM_SETTILEVIEWINFO,0,tileViewInfo); 5369int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5399int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5478Color foreColor = ColorTranslator.FromWin32(SafeNativeMethods.GetTextColor(new HandleRef(this, nmcd->hdc))); 5479Color backColor = ColorTranslator.FromWin32(SafeNativeMethods.GetBkColor(new HandleRef(this, nmcd->hdc))); 5774IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 5775IntPtr hFont = UnsafeNativeMethods.SendMessage(new HandleRef(this, hwndHdr), NativeMethods.WM_GETFONT, 0, 0); 5791return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 6150UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 8984UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem); 9003int nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED); 9013nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED); 9025UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_DELETEALLITEMS, 0, 0);
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (2)
127UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_INSERTMARKHITTEST, point, lvInsertMark); 137UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETINSERTMARK, 0, lvInsertMark);
winforms\Managed\System\WinForms\ListViewItem.cs (3)
962UnsafeNativeMethods.SendMessage(new HandleRef(lv, lv.Handle), NativeMethods.LVM_EDITLABEL, Index, 0); 1165UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 1193UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem);
winforms\Managed\System\WinForms\MaskedTextBox.cs (4)
1201HandleRef handle = new HandleRef(this, this.Handle); 1208UnsafeNativeMethods.ImmNotifyIME(new HandleRef(null, inputContext), NativeMethods.NI_COMPOSITIONSTR, action, 0); 1212UnsafeNativeMethods.ImmReleaseContext(handle, new HandleRef(null, inputContext)); 2007SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MDIClient.cs (9)
260UnsafeNativeMethods.GetWindowPlacement(new HandleRef(child, child.Handle), ref wp); 271UnsafeNativeMethods.SetWindowPlacement(new HandleRef(child, child.Handle), ref wp); 306if (SafeNativeMethods.CombineRgn(new HandleRef(null, rgn1), new HandleRef(null, rgn1), new HandleRef(null, rgn2), NativeMethods.RGN_DIFF) == 0) 309if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(null, rgn1), true) == 0) { 319SafeNativeMethods.DeleteObject(new HandleRef(null, rgn2)); 325SafeNativeMethods.DeleteObject(new HandleRef(null, rgn1));
winforms\Managed\System\WinForms\MDIControlStrip.cs (4)
36IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 131IntPtr hIcon = UnsafeNativeMethods.SendMessage(new HandleRef(this, Control.GetSafeHandle(target)), NativeMethods.WM_GETICON, NativeMethods.ICON_SMALL, 0); 167IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 185system.DropDown = ToolStripDropDownMenu.FromHMenu(UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false), target);
winforms\Managed\System\WinForms\Menu.cs (4)
217UnsafeNativeMethods.DestroyMenu(new HandleRef(this, handle)); 282while (UnsafeNativeMethods.GetMenuItemCount(new HandleRef(this, handle)) > 0) { 283UnsafeNativeMethods.RemoveMenu(new HandleRef(this, handle), 0, NativeMethods.MF_BYPOSITION); 313UnsafeNativeMethods.DestroyMenu(new HandleRef(this, handle));
winforms\Managed\System\WinForms\MenuItem.cs (13)
267UnsafeNativeMethods.SetMenuDefaultItem(new HandleRef(menu, menu.handle), MenuID, false); 270UnsafeNativeMethods.SetMenuDefaultItem(new HandleRef(menu, menu.handle), -1, false); 453UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 473int count = UnsafeNativeMethods.GetMenuItemCount(new HandleRef(menu, menu.Handle)); 480UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(menu, menu.handle), i, true, info); 857UnsafeNativeMethods.InsertMenuItem(new HandleRef(menu, menu.handle), -1, true, info); 1433UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 1439UnsafeNativeMethods.SetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 1461UnsafeNativeMethods.SetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 1478SafeNativeMethods.DrawMenuBar(new HandleRef(f, f.Handle)); 1506SafeNativeMethods.SelectPalette(new HandleRef(null, dis.hDC), new HandleRef(null, oldPal), 0); 1534UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screendc));
winforms\Managed\System\WinForms\MessageBox.cs (2)
484result = Win32ToDialogResult(SafeNativeMethods.MessageBox(new HandleRef(owner, handle), text, caption, style)); 495UnsafeNativeMethods.SendMessage(new HandleRef(owner, handle), NativeMethods.WM_SETFOCUS, 0, 0);
winforms\Managed\System\WinForms\MonthCalendar.cs (7)
1059int res = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETTODAY, 0, st); 1525UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETMONTHRANGE, flag, sa); 1575UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_HITTEST, 0, mchi); 1637UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st); 2027if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETRANGE, flag, sa) == 0) 2163UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETSELRANGE , 0, sa); 2263UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st);
winforms\Managed\System\WinForms\NativeMethods.cs (7)
62public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 667public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 669public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 671public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 673public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2)); 675public static HandleRef HWND_MESSAGE = new HandleRef(null, new IntPtr(-3)); 2732hicon = SafeNativeMethods.CopyImage(new HandleRef(icon, icon.Handle), NativeMethods.IMAGE_ICON, icon.Size.Width, icon.Size.Height, 0);
winforms\Managed\System\WinForms\NativeWindow.cs (32)
174if (UnsafeNativeMethods.IsWindow(new HandleRef(null, handle))) { 176int id = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, handle), out lpdwProcessId); 182SafeNativeMethods.GetExitCodeThread(new HandleRef(null, threadHandle), out exitCode); 185if (UnsafeNativeMethods.SendMessageTimeout(new HandleRef(null, handle), 204UnsafeNativeMethods.PostMessage(new HandleRef(this, h), NativeMethods.WM_CLOSE, 0, 0); 455UnsafeNativeMethods.SetWindowLong(new HandleRef(wrapper, handle), NativeMethods.GWL_ID, new HandleRef(wrapper, (IntPtr)globalID)); 607userDefWindowProc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc); 613defWindowProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 628UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC, windowProc); 629windowProcPtr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 632(unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_STYLE))) & NativeMethods.WS_CHILD) != 0 && 633unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_ID))) == 0) { 634UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_ID, new HandleRef(this, handle)); 764cp.Caption, cp.Style, cp.X, cp.Y, cp.Width, cp.Height, new HandleRef(cp, cp.Parent), NativeMethods.NullHandleRef, 765new HandleRef(null, modHandle), cp.Param); 855if (!UnsafeNativeMethods.DestroyWindow(new HandleRef(this, handle))) { 858UnsafeNativeMethods.PostMessage(new HandleRef(this, handle), NativeMethods.WM_CLOSE, 0, 0); 1085HandleRef href = new HandleRef(b, b.handle); 1086UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(null, userDefWindowProc)); 1361HandleRef href = new HandleRef(this, handle); 1365IntPtr currentWinPrc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1377UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, defWindowProc)); 1391UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, userDefWindowProc)); 1417UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, userDefWindowProc)); 1492UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), NativeMethods.GWL_WNDPROC, new HandleRef(this, defWindowProc)); 1575userDefWindowProc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc); 1635bool ok = UnsafeNativeMethods.GetClassInfo(new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)), windowClassName, wcls); 1645if (UnsafeNativeMethods.UnregisterClass(windowClassName, new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)))) { 1679if (registered && UnsafeNativeMethods.UnregisterClass(windowClassName, new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)))) {
winforms\Managed\System\WinForms\NotifyIcon.cs (6)
485UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_CLOSE, 0, 0); 729UnsafeNativeMethods.SetForegroundWindow(new HandleRef(window, window.Handle)); 734SafeNativeMethods.TrackPopupMenuEx(new HandleRef(contextMenu, contextMenu.Handle), 738new HandleRef(window, window.Handle), 742UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 1006UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CLOSE, 0, 0);
winforms\Managed\System\WinForms\PaintEvent.cs (2)
170SafeNativeMethods.SelectPalette(new HandleRef(this, dc), new HandleRef(this, oldPal), 0);
winforms\Managed\System\WinForms\Printing\PageSetupDialog.cs (2)
428UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 429UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames));
winforms\Managed\System\WinForms\Printing\PrintDialog.cs (5)
450UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 451UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 551UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 553UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 555UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.pageRanges));
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (8)
369if (SafeNativeMethods.GetScrollInfo(new HandleRef(this, m.HWnd), direction, si)) 427screendpi = new Point(UnsafeNativeMethods.GetDeviceCaps(new HandleRef(tempGraphics, dc), NativeMethods.LOGPIXELSX), 428UnsafeNativeMethods.GetDeviceCaps(new HandleRef(tempGraphics, dc), NativeMethods.LOGPIXELSY)); 750SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 756UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_HORZ, position.X, true); 757UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_VERT, position.Y, true); 769UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_VERT, info, true); 775UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ, info, true);
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 462UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 788UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 789UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 893UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 894UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\PropertyGrid.cs (4)
3840IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 3842UnsafeNativeMethods.SetFocus(new HandleRef(null, hWndParent)); 4665UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.Handle), new HandleRef(this, Handle), temp, 1);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (9)
2208oldTextColor = SafeNativeMethods.SetTextColor(new HandleRef(g, hdc), SafeNativeMethods.RGBToCOLORREF(textColor.ToArgb())); 2209oldBkColor = SafeNativeMethods.SetBkColor(new HandleRef(g, hdc), SafeNativeMethods.RGBToCOLORREF(bkColor.ToArgb())); 2210hfont = SafeNativeMethods.SelectObject(new HandleRef(g, hdc), new HandleRef(null, hfont)); 2231IntUnsafeNativeMethods.DrawText(new HandleRef(g, hdc), strValue, ref lpRect, format); 2234SafeNativeMethods.SetTextColor(new HandleRef(g, hdc), oldTextColor); 2235SafeNativeMethods.SetBkColor(new HandleRef(g, hdc), oldBkColor); 2236hfont = SafeNativeMethods.SelectObject(new HandleRef(g, hdc), new HandleRef(null, hfont));
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (6)
89UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i])); 160UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO((Control)sender)); 204SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 209if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(c))) { 216UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 230if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]))) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (36)
420int exStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(edit, edit.Handle), NativeMethods.GWL_EXSTYLE))); 791UnsafeNativeMethods.ClientToScreen(new HandleRef(this, Handle), pt); 998gotfocus = IntPtr.Zero != UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 1663SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags); 1691UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1706SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 1735UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1737SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 2765hwnd != IntPtr.Zero; hwnd = UnsafeNativeMethods.GetParent(new HandleRef(null, hwnd))) { 3280if (UnsafeNativeMethods.IsChild(new HandleRef(null, foregroundWindow), new HandleRef(null, this.Handle))) { 3659SafeNativeMethods.ExternalDeleteObject(new HandleRef(this, baseHfont)); 3663SafeNativeMethods.ExternalDeleteObject(new HandleRef(this, boldHfont)); 3870IntPtr hdc = UnsafeNativeMethods.GetDC(new HandleRef(DropDownListBox, DropDownListBox.Handle)); 3876hFont = SafeNativeMethods.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont)); 3886IntUnsafeNativeMethods.GetTextExtentPoint32(new HandleRef(DropDownListBox, hdc), s, textSize); 3890SafeNativeMethods.GetTextMetrics(new HandleRef(DropDownListBox, hdc), ref tm); 3895hFont = SafeNativeMethods.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont)); 3898SafeNativeMethods.DeleteObject(new HandleRef(Font, hFont)); 3899UnsafeNativeMethods.ReleaseDC(new HandleRef(DropDownListBox, DropDownListBox.Handle), new HandleRef(DropDownListBox, hdc)); 4945UnsafeNativeMethods.SetFocus(new HandleRef(null, priorFocus)); 5346UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0); 5351UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam); 5683hWnd = UnsafeNativeMethods.GetWindowLong(new HandleRef(null, hWnd), NativeMethods.GWL_HWNDPARENT); 6104(int) UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 6650UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero); 7149SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(control, control.Handle), out thisProcessID); 7192return UnsafeNativeMethods.CallNextHookEx(new HandleRef(this, mouseHookHandle), nCode, wparam, lparam); 7205UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(this, mouseHookHandle)); 7239SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, hWndAtPoint), out pid); 7740UnsafeNativeMethods.ScreenToClient(new HandleRef(Owner, Owner.Handle), pt);
winforms\Managed\System\WinForms\RichTextBox.cs (53)
377StringBuilder pathBuilder = UnsafeNativeMethods.GetModuleFileNameLongPath(new HandleRef(null, moduleHandle)); 526if (SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)) > 0) { 597opt = (RichTextBoxLanguageOptions)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETLANGOPTIONS, 0, 0); 610UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETLANGOPTIONS, 0, (int) value); 718IntPtr hDC = UnsafeNativeMethods.CreateIC("DISPLAY", null, null, new HandleRef(null, IntPtr.Zero)); 724UnsafeNativeMethods.DeleteDC(new HandleRef(null, hDC)); 832UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 879UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 903UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 933UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 981UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 1016UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 1067UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf2); 1114UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1130UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1155UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1171UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1284UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1302UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1324UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1346UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1354UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1518return unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTLENGTHEX, gtl, 0 /*ignored*/)); 2027position = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_FINDTEXT, findOptions, ft); 2065UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, chrg); 2113int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 2170len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg); 2247UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf); 2253UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf2); 2324int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, wpt); 2378UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, pt, index); 2604UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOPTIONS, (IntPtr)RichTextBoxConstants.ECOOP_OR, 2720UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_PASTESPECIAL, clipFormat.Id, rps); 2873return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 2879return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, charRange, cf); 2912UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfA); 2926UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfW); 2953logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 2954logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 2956UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 3017UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, cr); 3068UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es64); 3074UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es); 3165UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es64); 3171UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es); 3282UnsafeNativeMethods.SendCallbackMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback); 3291UnsafeNativeMethods.DragAcceptFiles(new HandleRef(this, Handle), false); 3383int len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg); 3446if (UnsafeNativeMethods.DragQueryFileLongPath(new HandleRef(endropfiles, endropfiles.hDrop), 0, path) != 0) 3622int textLength = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 3627UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.EM_SETSEL, selEnd - 1, selEnd); 3692UnsafeNativeMethods.SetCursor(new HandleRef(Cursors.Hand, Cursors.Hand.Handle)); 3831int hr = UnsafeNativeMethods.ReadClassStg(new HandleRef(null, lpstg), ref realClsid);
winforms\Managed\System\WinForms\Screen.cs (6)
91SafeNativeMethods.GetMonitorInfo(new HandleRef(null, monitor), info); 104this.bitDepth = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, screenDC), NativeMethods.BITSPIXEL); 105this.bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, screenDC), NativeMethods.PLANES); 108UnsafeNativeMethods.DeleteDC(new HandleRef(null, screenDC)); 248SafeNativeMethods.GetMonitorInfo(new HandleRef(null, hmonitor), info); 364return new Screen(SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), MONITOR_DEFAULTTONEAREST));
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
878SafeNativeMethods.ScrollWindowEx(new HandleRef(this, Handle), xDelta, yDelta, 991SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), fnBar, si);
winforms\Managed\System\WinForms\ScrollBar.cs (2)
810UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si, true); 895SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si);
winforms\Managed\System\WinForms\ScrollProperties.cs (3)
321UnsafeNativeMethods.SetScrollInfo(new HandleRef(parent, parent.Handle), Orientation, si, true); 333UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_ENABLE_BOTH); 336UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_DISABLE_BOTH);
winforms\Managed\System\WinForms\SendKeys.cs (5)
240new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)), 257new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)), 264UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(null, hookHandle)); 979UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(null, hhook)); 1101UnsafeNativeMethods.CallNextHookEx(new HandleRef(null, SendKeys.hhook), code, wparam, lparam);
winforms\Managed\System\WinForms\SplitContainer.cs (10)
589UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 1636IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 1638IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 1639SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 1640SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 1641SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 1642UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(null, dc));
winforms\Managed\System\WinForms\Splitter.cs (9)
773IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(ParentInternal, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 775IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, halftone)); 776SafeNativeMethods.PatBlt(new HandleRef(ParentInternal, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 777SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, saveBrush)); 778SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 779UnsafeNativeMethods.ReleaseDC(new HandleRef(ParentInternal, parentHandle), new HandleRef(null, dc));
winforms\Managed\System\WinForms\StatusBar.cs (8)
602UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, 1, offsets); 616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, length, offsets2); 1783ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(p.MainToolTip, p.MainToolTip.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool)); 1786ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool)); 1795UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(tool)); 1800UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTOOLINFO, 0, GetTOOLINFO(tool)); 1815SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 1823UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\StatusBarPanel.cs (2)
643int result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText); 657result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (1)
581UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, this.Handle), rootHwnd, gripLocation, 1);
winforms\Managed\System\WinForms\SystemInformation.cs (2)
137int lines = (int)UnsafeNativeMethods.SendMessage(new HandleRef(null, hWndMouseWheel), message, 0, 0); 1135if (UnsafeNativeMethods.GetUserObjectInformation(new HandleRef(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) {
winforms\Managed\System\WinForms\TabControl.cs (12)
1066int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, tabPageCount + 1, tcitem); 1067UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), tabBaseReLayoutMessage, IntPtr.Zero, IntPtr.Zero); 1309retIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, index, tcitem); 1362SafeNativeMethods.SetWindowPos(new HandleRef(this, tooltipHwnd), 1738UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TCM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1751UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETITEM, index, tcitem); 1754UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero); 2061SafeNativeMethods.SelectPalette(new HandleRef(null, dis.hDC), new HandleRef(null, oldPal), 0); 2136while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, hwnd), 2205UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\TextBox.cs (4)
608SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 786if (!stringSource.Bind(new HandleRef(this, Handle), (int)AutoCompleteMode)) 813int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this, Handle) , (int)AutoCompleteSource | mode); 835SafeNativeMethods.SHAutoComplete(new HandleRef(this, Handle) , mode);
winforms\Managed\System\WinForms\TextBoxBase.cs (6)
1013UnsafeNativeMethods.SendMessage( new HandleRef( this, Handle ), NativeMethods.EM_GETSEL, ref start, ref end ); 1258return SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 1318UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), value); 1756int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, longPoint); 1795int i = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, index, 0); 1836if (UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETOLEINTERFACE, 0, out editOle) != 0) {
winforms\Managed\System\WinForms\Timer.cs (5)
347int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, hWnd), out pid); 367_timerID = (int) SafeNativeMethods.SetTimer(new HandleRef(this, Handle), TimerID++, interval, IntPtr.Zero); 392UnsafeNativeMethods.PostMessage(new HandleRef(this, hWnd), NativeMethods.WM_CLOSE, 0, 0); 399if (_stoppingTimer || hWnd == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(new HandleRef(this, hWnd))) { 409SafeNativeMethods.KillTimer(new HandleRef(this, hWnd), _timerID);
winforms\Managed\System\WinForms\ToolBar.cs (11)
1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, x, ref tbbi); 1200UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_INSERTBUTTON, index, ref tbbutton); 1237UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, index, ref tbbi); 1494UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TB_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1556UnsafeNativeMethods.MapWindowPoints(new HandleRef(nmTB.hdr, nmTB.hdr.hwndFrom), NativeMethods.NullHandleRef, ref rc, 2); 1564new HandleRef(menu, menu.Handle), 1569new HandleRef(this, Handle), tpm); 1707int nRet = UnsafeNativeMethods.GetWindowPlacement(new HandleRef(null, note.hwndFrom), ref wndPlacement); 1733UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.Handle), leftTop); 1753SafeNativeMethods.SetWindowPos(new HandleRef(null, note.hwndFrom), NativeMethods.NullHandleRef, leftTop.x, leftTop.y, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE);
winforms\Managed\System\WinForms\ToolBarButton.cs (2)
335UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc); 559int buttonID = (int)UnsafeNativeMethods.SendMessage(new HandleRef(Parent, Parent.Handle), NativeMethods.TB_GETBUTTONINFO, commandId, ref button);
winforms\Managed\System\WinForms\ToolStrip.cs (12)
2843UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)imageHdc, 2848SafeNativeMethods.BitBlt(new HandleRef(this, desthDC), bounds.X, bounds.Y, bounds.Width, bounds.Height, 2849new HandleRef(g, imageHdc), 0, 0, NativeMethods.SRCCOPY); 4530HandleRef thisHandle = new HandleRef(this, this.Handle); 4531HandleRef otherHandle = new HandleRef(null, otherHwnd); 4720IntPtr hwndClicked = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y,(int)(GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled | GetChildAtPointSkip.Transparent)); 5165if (!UnsafeNativeMethods.IsChild(new HandleRef(this, ownerToolStrip.Handle), new HandleRef(this,m.HWnd))) { 5167if (rootHwnd.Handle == m.HWnd || UnsafeNativeMethods.IsChild(rootHwnd, new HandleRef(this,m.HWnd))) { 5232cachedItemHDC = new HandleRef(this, compatibleHDC); 5236cachedItemBitmap = new HandleRef(this, SafeNativeMethods.CreateCompatibleBitmap(toolStripHDC, bitmapSize.Width, bitmapSize.Height)); 5242SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, oldBitmap));
winforms\Managed\System\WinForms\ToolStripDropDown.cs (7)
1103SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), topMostFlag, 0, 0, 0, 0, 1672UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd); 1679HandleRef ownerHandle = new HandleRef(ownerWindow, ownerWindow.Handle); 1680UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHandle); 1841else if (IsHandleCreated && SafeNativeMethods.IsWindowEnabled(new HandleRef(this, Handle))) { 1842SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 2022result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (1)
280HandleRef menuHandle = new HandleRef(null, hmenu);
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (2)
260int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(owner, owner.Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this))); 276int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(owner, owner.Handle));
winforms\Managed\System\WinForms\ToolStripManager.cs (15)
854ActiveHwndInternal = new HandleRef(this, hwndActive); 979ActiveHwndInternal = new HandleRef(this, topLevel.Handle); 1050UnsafeNativeMethods.MapWindowPoints(new HandleRef(activeToolStrip, hwndMouseMessageIsFrom), new HandleRef(activeToolStrip, activeToolStrip.Handle), pt, 1); 1126ActiveHwndInternal = new HandleRef(this, hwndActive); 1246HandleRef hwndActiveToolStrip = new HandleRef(activeToolStrip, activeToolStrip.Handle); 1247HandleRef hwndCurrentActiveWindow = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()); 1286if (!IsChildOrSameWindow(hwndActiveToolStrip, new HandleRef(null, m.HWnd))) { 1292&& (IsChildOrSameWindow(new HandleRef(toplevelToolStrip, toplevelToolStrip.Handle), 1293new HandleRef(null, m.HWnd)))) { 1301else if (!IsChildOrSameWindow(ActiveHwnd, new HandleRef(null, m.HWnd))) { 1414new HandleRef(null, IntPtr.Zero), 1440return UnsafeNativeMethods.CallNextHookEx(new HandleRef(this, messageHookHandle), nCode, wparam, lparam); 1446UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(this, messageHookHandle)); 1709IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(toplevelControl, toplevelControl.Handle));
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (6)
712UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 732UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 743UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 776UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 877UnsafeNativeMethods.PostMessage( new HandleRef(this, targetWindowHandle), NativeMethods.WM_SYSCOMMAND,nativeMenuCommandID, 0); 883UnsafeNativeMethods.PostMessage( new HandleRef(this, targetWindowHandle), NativeMethods.WM_COMMAND, nativeMenuCommandID, 0);
winforms\Managed\System\WinForms\ToolStripPanel.cs (2)
858while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, IntPtr.Zero), 861SafeNativeMethods.UpdateWindow(new HandleRef(null, msg.hwnd));
winforms\Managed\System\WinForms\ToolStripTextBox.cs (8)
648UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), ref rect); 727hTotalRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(0, 0, this.Width, this.Height)); 728hClientRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(absoluteClientRectangle.left, absoluteClientRectangle.top, absoluteClientRectangle.right, absoluteClientRectangle.bottom)); 729hNonClientRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(0,0,0,0)); 735SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 852HandleRef hdc = new HandleRef(this, UnsafeNativeMethods.GetWindowDC(new HandleRef(this,m.HWnd))); 887UnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.Handle),hdc);
winforms\Managed\System\WinForms\ToolTip.cs (57)
144UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ACTIVATE, (value==true)? 1: 0, 0); 225UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(backColor), 0); 290UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(foreColor), 0); 357IntPtr rootHwnd =UnsafeNativeMethods.GetAncestor(new HandleRef(window, window.Handle), NativeMethods.GA_ROOT); 538UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title); 542UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATE, 0, 0); 577UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, toolTipTitle); 581UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATE, 0, 0); 898int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 900UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 906UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 926UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ACTIVATE, (active == true) ? 1 : 0, 0); 929UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(BackColor), 0); 932UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(ForeColor), 0); 937UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title); 971int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, tool); 1066UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(ctl)); 1116return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETDELAYTIME, type, 0); 1210bool isWindowMirrored = ((unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hWnd), NativeMethods.GWL_STYLE)) & NativeMethods.WS_EX_LAYOUTRTL) == NativeMethods.WS_EX_LAYOUTRTL); 1284IntPtr found = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, baseHwnd), pt.X, pt.Y, NativeMethods.CWP_SKIPINVISIBLE); 1401UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETDELAYTIME, type, time); 1478UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTOOLINFO, 1557UnsafeNativeMethods.GetWindowRect(new HandleRef(associatedControl, associatedControl.Handle), ref r); 1660UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1687UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1712UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1737UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1783IntPtr bubbleSizeInt = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_GETBUBBLESIZE, 0, this.GetMinToolInfoForTool(tool.GetOwnerWindow())); 1931UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(pointX, pointY)); 1960UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetWinTOOLINFO(hWnd)); 1961UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_DELTOOL, 0, GetWinTOOLINFO(hWnd)); 2018int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETTOOLINFO, 0, ti); 2040UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_SETTOOLINFO, 0, ti); 2041UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, ti); 2075UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 2076UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, toolInfo); 2173SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), 2186UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2189int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2233int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2247UnsafeNativeMethods.GetWindowRect(new HandleRef(win, Control.GetSafeHandle(win)), ref r); 2285UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2289int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2319UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2325UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADJUSTRECT, 1, ref r); 2339UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, maxwidth); 2344SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), 2353SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), 2372SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_HIDE); 2400int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2494int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2516UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width); 2599IntPtr dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this,Handle),ref ps); 2610int ret = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti)); 2620font = Font.FromHfont(UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_GETFONT, 0, 0)); 2640UnsafeNativeMethods.EndPaint(new HandleRef(this,Handle),ref ps);
winforms\Managed\System\WinForms\TreeNode.cs (22)
284if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) == 0) { 307if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 0, ref rc) == 0) { 345UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 637bool visible = ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) != 0); 712IntPtr next = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 840IntPtr prev = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 920UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEM, 0, ref item); 1208UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, 0, handle); 1382UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_COLLAPSE, Handle); 1493UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, cancel?1:0, 0); 1554UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENSUREVISIBLE, 0, Handle); 1570UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_EXPAND, Handle); 1711IntPtr editHandle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETEDITCONTROL, 0, 0); 1716UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, 0 /* fCancel==FALSE */, 0); 1719handle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_INSERTITEM, 0, ref tvis); 1728UnsafeNativeMethods.PostMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle); 1731SafeNativeMethods.InvalidateRect(new HandleRef(tv, tv.Handle), null, false); 1739UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.WM_SETREDRAW, 1, 0); 1806UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_DELETEITEM, 0, handle); 1832UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1944UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1964UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
winforms\Managed\System\WinForms\TreeView.cs (38)
358int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1750UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero); 1764UnsafeNativeMethods.SendMessage(new HandleRef(toolTip, toolTip.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1765UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1787IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1837IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1992int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1994UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 1998int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 2000UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 2045SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags); 2051SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags); 2098SafeNativeMethods.ImageList_Destroy_Native(new HandleRef(this, handleOld)); 2109SafeNativeMethods.ImageList_Destroy_Native(new HandleRef(this, handle)); 2167IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2580if (unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc)) != 0) 2581SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), ref rc, true); 2732if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 2793SafeNativeMethods.SelectObject(new HandleRef(nmcd.nmcd, nmcd.nmcd.hdc), new HandleRef(renderinfo, renderinfo.FontHandle)); 2908IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2920UnsafeNativeMethods.SendMessage(new HandleRef(this, tooltipHandle), NativeMethods.TTM_ADJUSTRECT, 1, ref bounds); 2921SafeNativeMethods.SetWindowPos(new HandleRef(this, tooltipHandle), 2943IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3022IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3095UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, this.Handle)); 3099SafeNativeMethods.TrackPopupMenuEx(new HandleRef(contextMenu, contextMenu.Handle), 3103new HandleRef(this, this.Handle), 3107UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 3113UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, treeNode.Handle); 3194UnsafeNativeMethods.SendMessage(new HandleRef(null, this.Handle), NativeMethods.TVM_GETITEM, 0, ref item1); 3210UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 3259hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3287IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 3357hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhit);
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (1)
728UnsafeNativeMethods.SendMessage(new HandleRef(toolTipFromUrl, toolTipFromUrl.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, 600);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (5)
1668int regionDataSize = GetRegionData(new HandleRef(null, hRgn), 0, IntPtr.Zero); 1672int ret = GetRegionData(new HandleRef(null, hRgn), regionDataSize, pBytes); 8277CloseHandle(new HandleRef(this, hProcess)); 8283CloseHandle(new HandleRef(this, hThread)); 8980if (GetProcAddress(new HandleRef(null, kernel32), "AddDllDirectory") != IntPtr.Zero) {
winforms\Managed\System\WinForms\UpDownBase.cs (3)
1165UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.Handle), new HandleRef(this, Handle), point, 1); 1225UnsafeNativeMethods.SetFocus(new HandleRef(TextBox, TextBox.Handle));
winforms\Managed\System\WinForms\UserControl.cs (2)
296if (hwnd == hwndFocus || SafeNativeMethods.IsChild(new HandleRef(this, hwnd), new HandleRef(null, hwndFocus)))
winforms\Managed\System\WinForms\VisualStyles\VisualStyleInformation.cs (2)
239return (SafeNativeMethods.GetThemeSysBool(new HandleRef(null, visualStyleRenderer.Handle), VisualStyleSystemProperty.SupportsFlatMenus)); 262SafeNativeMethods.GetThemeSysInt(new HandleRef(null, visualStyleRenderer.Handle), VisualStyleSystemProperty.MinimumColorDepth, ref mcDepth);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (37)
129returnVal = SafeNativeMethods.IsThemePartDefined(new HandleRef(null, hTheme), part, 0); 137returnVal = SafeNativeMethods.IsThemePartDefined(new HandleRef(null, tHandle.NativeHandle), part, 0); 290using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new HandleRef(null, hWnd))) { 291lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), null); 295lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), null); 324using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new HandleRef(null, hWnd))) { 325lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle)); 329lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle)); 361lastHResult = SafeNativeMethods.DrawThemeEdge( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), (int) style, (int) edges | (int) effects | EdgeAdjust, rect ); 452lastHResult = SafeNativeMethods.DrawThemeParentBackground( new HandleRef( this, childControl.Handle ), hdc, new NativeMethods.COMRECT( bounds ) ); 497lastHResult = SafeNativeMethods.DrawThemeText( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, disableFlag, new NativeMethods.COMRECT( bounds ) ); 520lastHResult = SafeNativeMethods.GetThemeBackgroundContentRect( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), rect ); 544lastHResult = SafeNativeMethods.GetThemeBackgroundExtent( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( contentBounds ), rect ); 572lastHResult = SafeNativeMethods.GetThemeBackgroundRegion( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), ref hRegion ); 585 SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, hRegion)); 602lastHResult = SafeNativeMethods.GetThemeBool(new HandleRef(this, Handle), part, state, (int)prop, ref val); 620lastHResult = SafeNativeMethods.GetThemeColor(new HandleRef(this, Handle), part, state, (int)prop, ref color); 638lastHResult = SafeNativeMethods.GetThemeEnumValue(new HandleRef(this, Handle), part, state, (int)prop, ref val); 656lastHResult = SafeNativeMethods.GetThemeFilename(new HandleRef(this, Handle), part, state, (int)prop, filename, filename.Capacity); 684lastHResult = SafeNativeMethods.GetThemeFont( new HandleRef( this, Handle ), hdc, part, state, (int) prop, logfont ); 727lastHResult = SafeNativeMethods.GetThemeInt(new HandleRef(this, Handle), part, state, (int)prop, ref val); 756using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new HandleRef(null, hWnd))) { 757lastHResult = SafeNativeMethods.GetThemePartSize(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, null, type, size); 761lastHResult = SafeNativeMethods.GetThemePartSize( new HandleRef(this, Handle), hdc, part, state, null, type, size); 789lastHResult = SafeNativeMethods.GetThemePartSize( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), type, size ); 809lastHResult = SafeNativeMethods.GetThemePosition(new HandleRef(this, Handle), part, state, (int)prop, point); 834lastHResult = SafeNativeMethods.GetThemeMargins( new HandleRef( this, Handle ), hdc, part, state, (int) prop, ref margins ); 855lastHResult = SafeNativeMethods.GetThemeString(new HandleRef(this, Handle), part, state, (int)prop, aString, aString.Capacity); 878lastHResult = SafeNativeMethods.GetThemeTextExtent( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, null, rect ); 903lastHResult = SafeNativeMethods.GetThemeTextExtent( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, new NativeMethods.COMRECT( bounds ), rect ); 924lastHResult = SafeNativeMethods.GetThemeTextMetrics( new HandleRef( this, Handle ), hdc, part, state, ref tm ); 948lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), NativeMethods.NullHandleRef, point, ref htCode ); 991lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), new HandleRef( this, hRgn ), point, ref htCode ); 1004return (SafeNativeMethods.IsThemeBackgroundPartiallyTransparent(new HandleRef(this, Handle), part, state)); 1129return Create(className, throwExceptionOnFail, new HandleRef(null, IntPtr.Zero)); 1171SafeNativeMethods.CloseThemeData(new HandleRef(null, _hTheme));
winforms\Managed\System\WinForms\WebBrowser.cs (2)
1203&& SafeNativeMethods.IsChild(new HandleRef(this, this.Handle), new HandleRef(null, hwndFocus));
winforms\Managed\System\WinForms\WebBrowserBase.cs (5)
401if (SafeNativeMethods.IsAccelerator(new HandleRef(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) { 493Application.ParkHandle(new HandleRef(this.AXInPlaceObject, hwndInPlaceObject)); 837UnsafeNativeMethods.SetParent(new HandleRef(null, hwnd), new HandleRef(this, this.Handle)); 1227cc = Control.FromHandle(UnsafeNativeMethods.GetParent(new HandleRef(this, Handle))) as ContainerControl;
winforms\Managed\System\WinForms\WebBrowserHelper.cs (4)
119logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 120UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 137logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 138UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (1)
262return UnsafeNativeMethods.GetParent(new HandleRef(Host, Host.Handle));
winforms\Managed\System\WinForms\WinFormsUtils.cs (8)
288IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new HandleRef(hwnd, hwnd.Handle), NativeMethods.GA_ROOT); 289return new HandleRef(hwnd.Wrapper, rootHwnd); 294return GetRootHWnd(new HandleRef(control, control.Handle)); 331UnsafeNativeMethods.MapWindowPoints(new HandleRef(fromControl, fromControl.Handle), new HandleRef(toControl, toControl.Handle), pt, 1); 630HandleRef hClippingRegion = new HandleRef(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x + bounds.Left, viewportOrg.y + bounds.Top, viewportOrg.x + bounds.Right, viewportOrg.y + bounds.Bottom)); 636hOriginalClippingRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(0, 0, 0, 0)); 672hOriginalClippingRegion = new HandleRef(null, IntPtr.Zero);
System.Workflow.ComponentModel (8)
AuthoringOM\Design\DesignerHelpers.cs (5)
917this.hdc = new HandleRef(this, this.graphics.GetHdc()); 933this.oldPen = new HandleRef(this, handle); 939this.oldPenEx = new HandleRef(this, handle); 945this.oldBrush = new HandleRef(this, handle); 1118this.hpen = new HandleRef(this, penPtr);
Shared\NativeMethods.cs (3)
355if (GetProcAddress(new HandleRef(null, kernel32), "AddDllDirectory") != IntPtr.Zero) 381IntPtr pfnProc = NativeMethods.GetProcAddress(new HandleRef(isAvailable, hmod), procName); 388NativeMethods.FreeLibrary(new HandleRef(isAvailable, hmod));
WindowsBase (47)
Base\System\Windows\SplashScreen.cs (13)
205HandleRef nullHandle = new HandleRef(null, IntPtr.Zero); 218nullHandle, nullHandle, new HandleRef(null, _hInstance), IntPtr.Zero); 221IntPtr hScreenDC = UnsafeNativeMethods.GetDC(new HandleRef()); 222IntPtr memDC = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hScreenDC)); 223IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hBitmap.MakeHandleRef(null).Handle); 237UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hOldBitmap); 238UnsafeNativeMethods.ReleaseDC(new HandleRef(), new HandleRef(null, memDC)); 239UnsafeNativeMethods.ReleaseDC(new HandleRef(), new HandleRef(null, hScreenDC)); 304IntPtr prevHwnd = UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, _hwnd)); 360HandleRef hwnd = new HandleRef(null, _hwnd); 456_hBitmap = UnsafeNativeMethods.CreateDIBSection(new HandleRef(), ref bmInfo, 0 /* DIB_RGB_COLORS*/, ref pBitmapBits, null, 0);
Base\System\Windows\Threading\Dispatcher.cs (9)
2379new HandleRef(this, hwnd), 2513SafeNativeMethods.KillTimer(new HandleRef(this, hwnd), TIMERID_BACKGROUND); 2644SafeNativeMethods.KillTimer(new HandleRef(this, _window.Value.Handle), TIMERID_BACKGROUND); 2649UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, _window.Value.Handle), _msgProcessQueue, _msgProcessQueue, NativeMethods.PM_REMOVE); 2695SafeNativeMethods.KillTimer(new HandleRef(this, _window.Value.Handle), TIMERID_BACKGROUND); 2702bool succeeded = UnsafeNativeMethods.TryPostMessage(new HandleRef(this, _window.Value.Handle), _msgProcessQueue, IntPtr.Zero, IntPtr.Zero); 2731succeeded = SafeNativeMethods.TrySetTimer(new HandleRef(this, _window.Value.Handle), TIMERID_BACKGROUND, DELTA_BACKGROUND); 2982new HandleRef(this, _window.Value.Handle), 3003new HandleRef(this, _window.Value.Handle),
Shared\MS\Win32\HwndSubclass.cs (5)
63IntPtr address = UnsafeNativeMethods.GetProcAddress(new HandleRef(null,hModuleUser32), "DefWindowProcW"); 469IntPtr oldWndProc = UnsafeNativeMethods.GetWindowLongPtr(new HandleRef(this,hwnd), NativeMethods.GWL_WNDPROC); 539_hwndHandleRef = new HandleRef(null,_hwndAttached); 592NativeMethods.WndProc currentWndProc = UnsafeNativeMethods.GetWindowLongWndProc(new HandleRef(this,_hwndAttached)); 626_hwndHandleRef = new HandleRef(null,IntPtr.Zero);
Shared\MS\Win32\HwndWrapper.cs (4)
159new HandleRef(null,parent), 160new HandleRef(null,IntPtr.Zero), 161new HandleRef(null,IntPtr.Zero), 419UnsafeNativeMethods.DestroyWindow(new HandleRef(null, handle.Value));
Shared\MS\Win32\ManagedWndProcTracker.cs (5)
108int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_STYLE); 174result = UnsafeNativeMethods.SetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_WNDPROC, defWindowProc); 191UnsafeNativeMethods.PostMessage(new HandleRef(null,hwnd), WindowMessage.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 202if (SafeNativeMethods.IsWindowUnicode(new HandleRef(null,hwnd))) 236return UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), export);
Shared\MS\Win32\NativeMethodsCLR.cs (5)
105public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 901public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 902public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 903public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 904public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
Shared\MS\Win32\NativeMethodsOther.cs (3)
317return new HandleRef(obj, handle); 1343return new HandleRef(wrapper,h); 1423return new HandleRef(wrapper, h);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (3)
582return CloseHandleNoThrow(new HandleRef(null, handle)); 622return UnsafeNativeMethods.UnmapViewOfFileNoThrow(new HandleRef(null, handle)); 1608return new HandleRef(lpfn, result);
2108 references to HandleRef
mscorlib (2)
system\runtime\interopservices\handleref.cs (2)
41public static explicit operator IntPtr(HandleRef value) 46public static IntPtr ToIntPtr(HandleRef value)
PresentationCore (33)
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (1)
498HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero);
Core\CSharp\System\Windows\DataObject.cs (15)
1208internal static void Win32GlobalFree(HandleRef handle) 1225internal static IntPtr Win32GlobalReAlloc(HandleRef handle, IntPtr bytes, int flags) 1244internal static IntPtr Win32GlobalLock(HandleRef handle) 1263internal static void Win32GlobalUnlock(HandleRef handle) 1280internal static IntPtr Win32GlobalSize(HandleRef handle) 1300internal static IntPtr Win32SelectObject(HandleRef handleDC, IntPtr handleObject) 1319internal static void Win32DeleteObject(HandleRef handleDC) 1332internal static IntPtr Win32GetDC(HandleRef handleDC) 1341internal static IntPtr Win32CreateCompatibleDC(HandleRef handleDC) 1355internal static IntPtr Win32CreateCompatibleBitmap(HandleRef handleDC, int width, int height) 1364internal static void Win32DeleteDC(HandleRef handleDC) 1376private static void Win32ReleaseDC(HandleRef handleHWND, HandleRef handleDC) 1388internal static void Win32BitBlt(HandleRef handledestination, int width, int height, HandleRef handleSource, int operationCode)
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (1)
106HandleRef thisWindow = new HandleRef(this, _source.Value.CriticalHandle);
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (1)
57private HandleRef Handle
Core\CSharp\System\Windows\Interop\HwndSource.cs (1)
1155public HandleRef CreateHandleRef()
Core\CSharp\System\Windows\Interop\HwndTarget.cs (6)
522private static HandleRef NormalizeWindow(HandleRef hWnd, bool normalizeChildWindows, bool normalizePopups) 524HandleRef normalizedHwnd = hWnd; 1478HandleRef handleRef = new HandleRef(this, _hWnd); 1646internal void AdjustForRightToLeft(ref NativeMethods.RECT rc, HandleRef handleRef) 1794HandleRef hWnd = _hWnd.MakeHandleRef(this);
Core\CSharp\System\Windows\OleServicesContext.cs (2)
232internal int OleRegisterDragDrop(HandleRef windowHandle, UnsafeNativeMethods.IOleDropTarget dropTarget) 249internal int OleRevokeDragDrop(HandleRef windowHandle)
Core\CSharp\System\Windows\UIElement.cs (1)
1158HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero);
Shared\MS\Internal\PointUtil.cs (4)
190HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle); 218HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle); 341internal static NativeMethods.POINT AdjustForRightToLeft(NativeMethods.POINT pt, HandleRef handleRef) 380internal static NativeMethods.RECT AdjustForRightToLeft(NativeMethods.RECT rc, HandleRef handleRef)
Shared\MS\Internal\SafeSecurityHelper.cs (1)
69internal static void TransformLocalRectToScreen(HandleRef hwnd, ref NativeMethods.RECT rcWindowCoords)
PresentationFramework (33)
src\Framework\Microsoft\Win32\CommonDialog.cs (1)
324internal void MoveToScreenCenter(HandleRef hWnd)
src\Framework\MS\Internal\AppModel\IconHelper.cs (1)
53var hdcDesktop = new HandleRef(null, UnsafeNativeMethods.GetDC(new HandleRef()));
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (1)
391HandleRef handleRef;
src\Framework\System\Windows\Interop\ActiveXHost.cs (7)
168protected override HandleRef BuildWindowCore(HandleRef hwndParent) 219protected override void DestroyWindowCore(HandleRef hwnd) 882internal HandleRef ParentHandle 915internal HandleRef ControlHandle 1205private HandleRef _hwndParent; 1221private HandleRef _axWindow;
src\Framework\System\Windows\Interop\HwndHost.cs (11)
410HandleRef hwndFocus = new HandleRef(this, UnsafeNativeMethods.GetFocus()); 670protected abstract HandleRef BuildWindowCore(HandleRef hwndParent); 676protected abstract void DestroyWindowCore(HandleRef hwnd); 902HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 905HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 906HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 1132/// Critical - calls Critical GetParent and <see cref="SystemResources.GetDpiAwarenessCompatibleNotificationWindow(HandleRef)"/> 1232private void BuildWindow(HandleRef hwndParent) 1326HandleRef hwnd = _hwnd; 1405private HandleRef _hwnd;
src\Framework\System\Windows\SystemParameters.cs (1)
6388HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero);
src\Framework\System\Windows\SystemResources.cs (5)
1049/// as the need arises. For e.g., when <see cref="System.Windows.Interop.HwndHost"/> calls into <see cref="GetDpiAwarenessCompatibleNotificationWindow(HandleRef)"/>, 1056/// #(valid DpiAwarenessContextValues) + 2*#(unique DPI values that are observed during calls to <see cref="GetDpiAwarenessCompatibleNotificationWindow(HandleRef)"/>) 1623/// into a private accessor, and replaced with <see cref="GetDpiCompatibleNotificationWindow(HandleRef)"/> 1627/// re-parent that HWND under the said notify-window), use <see cref="GetDpiCompatibleNotificationWindow(HandleRef)"/> 1718internal static HwndWrapper GetDpiAwarenessCompatibleNotificationWindow(HandleRef hwnd)
src\Framework\System\Windows\Window.cs (6)
4243var iconWindows = new HandleRef[] 4246default(HandleRef) 4258HandleRef hwnd = iconWindows[i]; 5403HandleRef hr = new HandleRef(this, CriticalHandle); 5564HandleRef hWnd = topmost ? NativeMethods.HWND_TOPMOST : NativeMethods.HWND_NOTOPMOST; 8410var nullHandle = new HandleRef(null, IntPtr.Zero);
System (67)
compmod\microsoft\win32\NativeMethods.cs (28)
58public readonly static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 271HandleRef lpEnvironment, 1211public static extern int GetModuleFileNameEx(HandleRef processHandle, HandleRef moduleHandle, StringBuilder baseName, int size); 1215public static extern bool GetModuleInformation(SafeProcessHandle processHandle, HandleRef moduleHandle, NtModuleInfo ntModuleInfo, int size); 1218public static extern int GetModuleBaseName(SafeProcessHandle processHandle, HandleRef moduleHandle, StringBuilder baseName, int size); 1221public static extern int GetModuleFileNameEx(SafeProcessHandle processHandle, HandleRef moduleHandle, StringBuilder baseName, int size); 1258public static extern IntPtr SetThreadAffinityMask(SafeThreadHandle handle, HandleRef mask); 1268public static extern bool Process32First(HandleRef handle, IntPtr entry); 1271public static extern bool Process32Next(HandleRef handle, IntPtr entry); 1274public static extern bool Thread32First(HandleRef handle, WinThreadEntry entry); 1277public static extern bool Thread32Next(HandleRef handle, WinThreadEntry entry); 1280public static extern bool Module32First(HandleRef handle, IntPtr entry); 1283public static extern bool Module32Next(HandleRef handle, IntPtr entry); 1295public static extern int GetWindowThreadProcessId(HandleRef handle, out int processId); 1317HandleRef hSourceProcessHandle, 1319HandleRef hTargetProcess, 1329HandleRef hSourceProcessHandle, 1331HandleRef hTargetProcess, 1357public static extern bool OpenProcessToken(HandleRef ProcessHandle, int DesiredAccess, out IntPtr TokenHandle); 1364HandleRef TokenHandle, 1373public static extern int GetWindowText(HandleRef hWnd, StringBuilder lpString, int nMaxCount); 1376public static extern int GetWindowTextLength(HandleRef hWnd); 1379public static extern bool IsWindowVisible(HandleRef hWnd); 1382public static extern IntPtr SendMessageTimeout(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int timeout, out IntPtr pdwResult); 1385public static extern int GetWindowLong(HandleRef hWnd, int nIndex); 1388public static extern int PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam); 1391public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd);
compmod\microsoft\win32\SafeNativeMethods.cs (1)
168public static extern bool FreeLibrary(HandleRef hModule);
compmod\microsoft\win32\SystemEvents.cs (1)
514HandleRef href = new HandleRef(this, handle);
compmod\microsoft\win32\UnsafeNativeMethods.cs (35)
57public static extern bool GetUserObjectInformation(HandleRef hObj, int nIndex, [MarshalAs(UnmanagedType.LPStruct)] NativeMethods.USEROBJECTFLAGS pvBuffer, int nLength, ref int lpnLengthNeeded); 74public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, [In, Out] NativeMethods.WNDCLASS_I wc); 78public static extern bool IsWindow(HandleRef hWnd); 96public static IntPtr SetClassLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) { 105public static extern IntPtr SetClassLongPtr32(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 109public static extern IntPtr SetClassLongPtr64(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 115public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, HandleRef dwNewLong) 126public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 130public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 138public static extern short UnregisterClass(string lpClassName, HandleRef hInstance); 142int height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)] object pvParam); 145public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); 155public static extern bool DestroyWindow(HandleRef hWnd); 167public static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 170public static extern IntPtr SetTimer(HandleRef hWnd, HandleRef nIDEvent, int uElapse, HandleRef lpTimerProc); 174public static extern bool KillTimer(HandleRef hwnd, HandleRef idEvent); 181public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName); 185public static extern bool PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam); 189public static extern bool WTSRegisterSessionNotification(HandleRef hWnd, int dwFlags); 193public static extern bool WTSUnRegisterSessionNotification(HandleRef hWnd); 356public static extern bool GetFileVersionInfo(string lptstrFilename, int dwHandle, int dwLen, HandleRef lpData); 361public static extern int GetModuleFileName(HandleRef hModule, StringBuilder buffer, int length); 364public static extern bool VerQueryValue(HandleRef pBlock, string lpSubBlock, [In, Out] ref IntPtr lplpBuffer, out int len); 372uint eventID, byte[] userSID, short numStrings, int dataLen, HandleRef strings, 376public static extern bool ClearEventLog(SafeHandle hEventLog, HandleRef lpctstrBackupFileName); 400public unsafe static extern bool ReadDirectoryChangesW(SafeFileHandle hDirectory, HandleRef lpBuffer, 402NativeOverlapped* overlappedPointer, HandleRef lpCompletionRoutine);
services\monitoring\system\diagnosticts\ProcessManager.cs (2)
365HandleRef handleRef = new HandleRef(null, handle); 435HandleRef handleRef = new HandleRef(null, handle);
System.Activities.Presentation (4)
Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (4)
54internal static void MakeWindowClipSiblingsAndChildren(HandleRef hwnd) 70internal static IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 90private static extern int SetWindowLong32(HandleRef hWnd, int nIndex, int dwNewLong); 93private static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, IntPtr dwNewLong);
System.Configuration (1)
Microsoft\Win32\UnsafeNativeMethods.cs (1)
41internal static extern int GetModuleFileName(HandleRef hModule, StringBuilder buffer, int length);
System.Data (19)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (4)
54internal static void MakeWindowClipSiblingsAndChildren(HandleRef hwnd) 70internal static IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 90private static extern int SetWindowLong32(HandleRef hWnd, int nIndex, int dwNewLong); 93private static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, IntPtr dwNewLong);
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
1859static internal readonly HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
fx\src\data\System\Data\Common\UnsafeNativeMethods.cs (4)
51/*SQLPOINTER*/HandleRef TargetValue, 75/*SQLPOINTER*/HandleRef rgbValue, 77/*SQLLEN* */HandleRef StrLen_or_Ind); 387/*SQLPOINTER*/HandleRef CharacterAttribute,
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (3)
2226HandleRef colnamebuf = buffer.PtrOffset(colnameBufOffset, 256); 2227HandleRef indexbuf = buffer.PtrOffset(indexBufOffset, 256); 2228HandleRef ordinalbuf = buffer.PtrOffset(ordinalBufOffset, 4);
fx\src\data\System\Data\Odbc\OdbcHandle.cs (1)
227internal ODBC32.RetCode SetDescriptionField2(short ordinal, ODBC32.SQL_DESC type, HandleRef value) {
fx\src\data\System\Data\Odbc\OdbcParameter.cs (2)
704HandleRef valueBuffer = parameterBuffer.PtrOffset(_preparedValueOffset, _preparedBufferSize); 705HandleRef intBuffer = parameterBuffer.PtrOffset(_preparedIntOffset, IntPtr.Size);
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (3)
74internal ODBC32.RetCode BindColumn2(int columnNumber, ODBC32.SQL_C targetType, HandleRef buffer, IntPtr length, IntPtr srLen_or_Ind) { 86internal ODBC32.RetCode BindParameter(short ordinal, short parameterDirection, ODBC32.SQL_C sqlctype, ODBC32.SQL_TYPE sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer) {
fx\src\data\System\Data\Odbc\OdbcUtils.cs (1)
315internal HandleRef PtrOffset(int offset, int length) {
System.Drawing (987)
commonui\System\Drawing\Advanced\Gdiplus.cs (845)
242private static extern void GdiplusShutdown(HandleRef token); 297internal static extern int GdipCreatePath2(HandleRef points, HandleRef types, int count, int brushMode, out IntPtr path); 301internal static extern int GdipCreatePath2I(HandleRef points, HandleRef types, int count, int brushMode, out IntPtr path); 305internal static extern int GdipClonePath(HandleRef path, out IntPtr clonepath); 309private static extern int IntGdipDeletePath(HandleRef path); 310internal static int GdipDeletePath(HandleRef path) { 319internal static extern int GdipResetPath(HandleRef path); 323internal static extern int GdipGetPointCount(HandleRef path, out int count); 327internal static extern int GdipGetPathTypes(HandleRef path, byte[] types, int count); 331internal static extern int GdipGetPathPoints(HandleRef path, HandleRef points, int count); 335internal static extern int GdipGetPathFillMode(HandleRef path, out int fillmode); 339internal static extern int GdipSetPathFillMode(HandleRef path, int fillmode); 343internal static extern int GdipGetPathData(HandleRef path, IntPtr pathData); 347internal static extern int GdipStartPathFigure(HandleRef path); 351internal static extern int GdipClosePathFigure(HandleRef path); 355internal static extern int GdipClosePathFigures(HandleRef path); 359internal static extern int GdipSetPathMarker(HandleRef path); 363internal static extern int GdipClearPathMarkers(HandleRef path); 367internal static extern int GdipReversePath(HandleRef path); 371internal static extern int GdipGetPathLastPoint(HandleRef path, GPPOINTF lastPoint); 375internal static extern int GdipAddPathLine(HandleRef path, float x1, float y1, float x2, 380internal static extern int GdipAddPathLine2(HandleRef path, HandleRef memorypts, int count); 384internal static extern int GdipAddPathArc(HandleRef path, float x, float y, float width, 390internal static extern int GdipAddPathBezier(HandleRef path, float x1, float y1, float x2, 396internal static extern int GdipAddPathBeziers(HandleRef path, HandleRef memorypts, int count); 400internal static extern int GdipAddPathCurve(HandleRef path, HandleRef memorypts, int count); 404internal static extern int GdipAddPathCurve2(HandleRef path, HandleRef memorypts, int count, 409internal static extern int GdipAddPathCurve3(HandleRef path, HandleRef memorypts, int count, 415internal static extern int GdipAddPathClosedCurve(HandleRef path, HandleRef memorypts, 420internal static extern int GdipAddPathClosedCurve2(HandleRef path, HandleRef memorypts, 425internal static extern int GdipAddPathRectangle(HandleRef path, float x, float y, float width, 430internal static extern int GdipAddPathRectangles(HandleRef path, HandleRef rects, int count); 434internal static extern int GdipAddPathEllipse(HandleRef path, float x, float y, 439internal static extern int GdipAddPathPie(HandleRef path, float x, float y, float width, 445internal static extern int GdipAddPathPolygon(HandleRef path, HandleRef memorypts, int count); 449internal static extern int GdipAddPathPath(HandleRef path, HandleRef addingPath, bool connect); 453internal static extern int GdipAddPathString(HandleRef path, string s, int length, 454HandleRef fontFamily, int style, float emSize, 455ref GPRECTF layoutRect, HandleRef format); 459internal static extern int GdipAddPathStringI(HandleRef path, string s, int length, 460HandleRef fontFamily, int style, float emSize, 461ref GPRECT layoutRect, HandleRef format); 465internal static extern int GdipAddPathLineI(HandleRef path, int x1, int y1, int x2, 470internal static extern int GdipAddPathLine2I(HandleRef path, HandleRef memorypts, int count); 474internal static extern int GdipAddPathArcI(HandleRef path, int x, int y, int width, 480internal static extern int GdipAddPathBezierI(HandleRef path, int x1, int y1, int x2, 486internal static extern int GdipAddPathBeziersI(HandleRef path, HandleRef memorypts, int count); 490internal static extern int GdipAddPathCurveI(HandleRef path, HandleRef memorypts, int count); 494internal static extern int GdipAddPathCurve2I(HandleRef path, HandleRef memorypts, int count, 499internal static extern int GdipAddPathCurve3I(HandleRef path, HandleRef memorypts, int count, 505internal static extern int GdipAddPathClosedCurveI(HandleRef path, HandleRef memorypts, 510internal static extern int GdipAddPathClosedCurve2I(HandleRef path, HandleRef memorypts, 515internal static extern int GdipAddPathRectangleI(HandleRef path, int x, int y, int width, 520internal static extern int GdipAddPathRectanglesI(HandleRef path, HandleRef rects, int count); 524internal static extern int GdipAddPathEllipseI(HandleRef path, int x, int y, 529internal static extern int GdipAddPathPieI(HandleRef path, int x, int y, int width, 535internal static extern int GdipAddPathPolygonI(HandleRef path, HandleRef memorypts, int count); 539internal static extern int GdipFlattenPath(HandleRef path, HandleRef matrixfloat, float flatness); 543internal static extern int GdipWidenPath(HandleRef path, HandleRef pen, HandleRef matrix, float flatness); 547internal static extern int GdipWarpPath(HandleRef path, HandleRef matrix, HandleRef points, int count, 553internal static extern int GdipTransformPath(HandleRef path, HandleRef matrix); 557internal static extern int GdipGetPathWorldBounds(HandleRef path, ref GPRECTF gprectf, HandleRef matrix, HandleRef pen); 561internal static extern int GdipIsVisiblePathPoint(HandleRef path, float x, float y, 562HandleRef graphics, out int boolean); 566internal static extern int GdipIsVisiblePathPointI(HandleRef path, int x, int y, 567HandleRef graphics, out int boolean); 571internal static extern int GdipIsOutlineVisiblePathPoint(HandleRef path, float x, float y, HandleRef pen, 572HandleRef graphics, out int boolean); 576internal static extern int GdipIsOutlineVisiblePathPointI(HandleRef path, int x, int y, HandleRef pen, 577HandleRef graphics, out int boolean); 584internal static extern int GdipCreatePathIter(out IntPtr pathIter, HandleRef path); 588private static extern int IntGdipDeletePathIter(HandleRef pathIter); 589internal static int GdipDeletePathIter(HandleRef pathIter) { 597internal static extern int GdipPathIterNextSubpath(HandleRef pathIter, out int resultCount, 602internal static extern int GdipPathIterNextSubpathPath(HandleRef pathIter, out int resultCount, 603HandleRef path, out bool isClosed); 607internal static extern int GdipPathIterNextPathType(HandleRef pathIter, out int resultCount, 613internal static extern int GdipPathIterNextMarker(HandleRef pathIter, out int resultCount, 618internal static extern int GdipPathIterNextMarkerPath(HandleRef pathIter, out int resultCount, 619HandleRef path); 623internal static extern int GdipPathIterGetCount(HandleRef pathIter, out int count); 627internal static extern int GdipPathIterGetSubpathCount(HandleRef pathIter, out int count); 631internal static extern int GdipPathIterHasCurve(HandleRef pathIter, out bool hasCurve); 635internal static extern int GdipPathIterRewind(HandleRef pathIter); 639internal static extern int GdipPathIterEnumerate(HandleRef pathIter, out int resultCount, 644internal static extern int GdipPathIterCopyData(HandleRef pathIter, out int resultCount, 664internal static extern int GdipCreateMatrix3(ref GPRECTF rect, HandleRef dstplg, out IntPtr matrix); 668internal static extern int GdipCreateMatrix3I(ref GPRECT rect, HandleRef dstplg, out IntPtr matrix); 672internal static extern int GdipCloneMatrix(HandleRef matrix, out IntPtr cloneMatrix); 676private static extern int IntGdipDeleteMatrix(HandleRef matrix); 677internal static int GdipDeleteMatrix(HandleRef matrix) { 685internal static extern int GdipSetMatrixElements(HandleRef matrix, float m11, 691internal static extern int GdipMultiplyMatrix(HandleRef matrix, HandleRef matrix2, MatrixOrder order); 695internal static extern int GdipTranslateMatrix(HandleRef matrix, float offsetX, 700internal static extern int GdipScaleMatrix(HandleRef matrix, float scaleX, float scaleY, MatrixOrder order); 704internal static extern int GdipRotateMatrix(HandleRef matrix, float angle, MatrixOrder order); 708internal static extern int GdipShearMatrix(HandleRef matrix, float shearX, float shearY, MatrixOrder order); 712internal static extern int GdipInvertMatrix(HandleRef matrix); 716internal static extern int GdipTransformMatrixPoints(HandleRef matrix, HandleRef pts, int count); 720internal static extern int GdipTransformMatrixPointsI(HandleRef matrix, HandleRef pts, int count); 724internal static extern int GdipVectorTransformMatrixPoints(HandleRef matrix, HandleRef pts, 729internal static extern int GdipVectorTransformMatrixPointsI(HandleRef matrix, HandleRef pts, 734internal static extern int GdipGetMatrixElements(HandleRef matrix, IntPtr m); 738internal static extern int GdipIsMatrixInvertible(HandleRef matrix, out int boolean); 742internal static extern int GdipIsMatrixIdentity(HandleRef matrix, out int boolean); 746internal static extern int GdipIsMatrixEqual(HandleRef matrix, HandleRef matrix2, 767internal static extern int GdipCreateRegionPath(HandleRef path, out IntPtr region); 775internal static extern int GdipCreateRegionHrgn(HandleRef hRgn, out IntPtr region); 779internal static extern int GdipCloneRegion(HandleRef region, out IntPtr cloneregion); 783private static extern int IntGdipDeleteRegion(HandleRef region); 785internal static int GdipDeleteRegion(HandleRef region) { 793internal static extern int GdipSetInfinite(HandleRef region); 797internal static extern int GdipSetEmpty(HandleRef region); 801internal static extern int GdipCombineRegionRect(HandleRef region, ref GPRECTF gprectf, CombineMode mode); 805internal static extern int GdipCombineRegionRectI(HandleRef region, ref GPRECT gprect, CombineMode mode); 809internal static extern int GdipCombineRegionPath(HandleRef region, HandleRef path, CombineMode mode); 813internal static extern int GdipCombineRegionRegion(HandleRef region, HandleRef region2, CombineMode mode); 817internal static extern int GdipTranslateRegion(HandleRef region, float dx, float dy); 821internal static extern int GdipTranslateRegionI(HandleRef region, int dx, int dy); 825internal static extern int GdipTransformRegion(HandleRef region, HandleRef matrix); 829internal static extern int GdipGetRegionBounds(HandleRef region, HandleRef graphics, ref GPRECTF gprectf); 833internal static extern int GdipGetRegionHRgn(HandleRef region, HandleRef graphics, out IntPtr hrgn); 837internal static extern int GdipIsEmptyRegion(HandleRef region, HandleRef graphics, out int boolean); 841internal static extern int GdipIsInfiniteRegion(HandleRef region, HandleRef graphics, out int boolean); 845internal static extern int GdipIsEqualRegion(HandleRef region, HandleRef region2, HandleRef graphics, 850internal static extern int GdipGetRegionDataSize(HandleRef region, out int bufferSize); 854internal static extern int GdipGetRegionData(HandleRef region, 861internal static extern int GdipIsVisibleRegionPoint(HandleRef region, float X, float Y, 862HandleRef graphics, out int boolean); 866internal static extern int GdipIsVisibleRegionPointI(HandleRef region, int X, int Y, 867HandleRef graphics, out int boolean); 871internal static extern int GdipIsVisibleRegionRect(HandleRef region, float X, float Y, 873HandleRef graphics, out int boolean); 877internal static extern int GdipIsVisibleRegionRectI(HandleRef region, int X, int Y, 879HandleRef graphics, out int boolean); 883internal static extern int GdipGetRegionScansCount(HandleRef region, out int count, HandleRef matrix); 887internal static extern int GdipGetRegionScans(HandleRef region, IntPtr rects, out int count, HandleRef matrix); 896internal static extern int GdipCloneBrush(HandleRef brush, out IntPtr clonebrush); 900private static extern int IntGdipDeleteBrush(HandleRef brush); 901internal static int GdipDeleteBrush(HandleRef brush) { 916internal static extern int GdipGetHatchStyle(HandleRef brush, out int hatchstyle); 920internal static extern int GdipGetHatchForegroundColor(HandleRef brush, out int forecol); 924internal static extern int GdipGetHatchBackgroundColor(HandleRef brush, out int backcol); 928internal static extern int GdipCreateTexture(HandleRef bitmap, int wrapmode, out IntPtr texture); 932internal static extern int GdipCreateTexture2(HandleRef bitmap, int wrapmode, float x, 938internal static extern int GdipCreateTextureIA(HandleRef bitmap, HandleRef imageAttrib, 944internal static extern int GdipCreateTexture2I(HandleRef bitmap, int wrapmode, int x, 950internal static extern int GdipCreateTextureIAI(HandleRef bitmap, HandleRef imageAttrib, 956internal static extern int GdipSetTextureTransform(HandleRef brush, HandleRef matrix); 960internal static extern int GdipGetTextureTransform(HandleRef brush, HandleRef matrix); 964internal static extern int GdipResetTextureTransform(HandleRef brush); 968internal static extern int GdipMultiplyTextureTransform(HandleRef brush, 969HandleRef matrix, 974internal static extern int GdipTranslateTextureTransform(HandleRef brush, 981internal static extern int GdipScaleTextureTransform(HandleRef brush, 988internal static extern int GdipRotateTextureTransform(HandleRef brush, 994internal static extern int GdipSetTextureWrapMode(HandleRef brush, int wrapMode); 998internal static extern int GdipGetTextureWrapMode(HandleRef brush, out int wrapMode); 1002internal static extern int GdipGetTextureImage(HandleRef brush, out IntPtr image); 1010internal static extern int GdipSetSolidFillColor(HandleRef brush, int color); 1014internal static extern int GdipGetSolidFillColor(HandleRef brush, out int color); 1050internal static extern int GdipSetLineColors(HandleRef brush, int color1, int color2); 1054internal static extern int GdipGetLineColors(HandleRef brush, int[] colors); 1058internal static extern int GdipGetLineRect(HandleRef brush, ref GPRECTF gprectf); 1062internal static extern int GdipGetLineGammaCorrection(HandleRef brush, out bool useGammaCorrection); 1066internal static extern int GdipSetLineGammaCorrection(HandleRef brush, bool useGammaCorrection); 1070internal static extern int GdipSetLineSigmaBlend(HandleRef brush, float focus, float scale); 1074internal static extern int GdipSetLineLinearBlend(HandleRef brush, float focus, float scale); 1078internal static extern int GdipGetLineBlendCount(HandleRef brush, out int count); 1082internal static extern int GdipGetLineBlend(HandleRef brush, IntPtr blend, IntPtr positions, int count); 1086internal static extern int GdipSetLineBlend(HandleRef brush, HandleRef blend, HandleRef positions, int count); 1090internal static extern int GdipGetLinePresetBlendCount(HandleRef brush, out int count); 1094internal static extern int GdipGetLinePresetBlend(HandleRef brush, IntPtr blend, IntPtr positions, int count); 1098internal static extern int GdipSetLinePresetBlend(HandleRef brush, HandleRef blend, HandleRef positions, int count); 1102internal static extern int GdipSetLineWrapMode(HandleRef brush, int wrapMode); 1106internal static extern int GdipGetLineWrapMode(HandleRef brush, out int wrapMode); 1110internal static extern int GdipResetLineTransform(HandleRef brush); 1114internal static extern int GdipMultiplyLineTransform(HandleRef brush, HandleRef matrix, MatrixOrder order); 1118internal static extern int GdipGetLineTransform(HandleRef brush, HandleRef matrix); 1122internal static extern int GdipSetLineTransform(HandleRef brush, HandleRef matrix); 1126internal static extern int GdipTranslateLineTransform(HandleRef brush, float dx, float dy, MatrixOrder order); 1130internal static extern int GdipScaleLineTransform(HandleRef brush, float sx, float sy, MatrixOrder order); 1134internal static extern int GdipRotateLineTransform(HandleRef brush, float angle, MatrixOrder order); 1142internal static extern int GdipCreatePathGradient(HandleRef points, int count, int wrapMode, out IntPtr brush); 1146internal static extern int GdipCreatePathGradientI(HandleRef points, int count, int wrapMode, out IntPtr brush); 1150internal static extern int GdipCreatePathGradientFromPath(HandleRef path, out IntPtr brush); 1155internal static extern int GdipGetPathGradientCenterColor(HandleRef brush, 1161internal static extern int GdipSetPathGradientCenterColor(HandleRef brush, 1166internal static extern int GdipGetPathGradientSurroundColorsWithCount(HandleRef brush, 1172internal static extern int GdipSetPathGradientSurroundColorsWithCount(HandleRef brush, 1178internal static extern int GdipGetPathGradientCenterPoint(HandleRef brush, 1183internal static extern int GdipSetPathGradientCenterPoint(HandleRef brush, 1188internal static extern int GdipGetPathGradientRect(HandleRef brush, 1193internal static extern int GdipGetPathGradientPointCount(HandleRef brush, 1198internal static extern int GdipGetPathGradientSurroundColorCount(HandleRef brush, 1203internal static extern int GdipGetPathGradientBlendCount(HandleRef brush, 1208internal static extern int GdipGetPathGradientBlend(HandleRef brush, 1215internal static extern int GdipSetPathGradientBlend(HandleRef brush, 1216HandleRef blend, 1217HandleRef positions, 1222internal static extern int GdipGetPathGradientPresetBlendCount(HandleRef brush, out int count); 1226internal static extern int GdipGetPathGradientPresetBlend(HandleRef brush, IntPtr blend, 1231internal static extern int GdipSetPathGradientPresetBlend(HandleRef brush, HandleRef blend, 1232HandleRef positions, int count); 1236internal static extern int GdipSetPathGradientSigmaBlend(HandleRef brush, 1242internal static extern int GdipSetPathGradientLinearBlend(HandleRef brush, 1248internal static extern int GdipSetPathGradientWrapMode(HandleRef brush, 1253internal static extern int GdipGetPathGradientWrapMode(HandleRef brush, 1258internal static extern int GdipSetPathGradientTransform(HandleRef brush, 1259HandleRef matrix); 1263internal static extern int GdipGetPathGradientTransform(HandleRef brush, 1264HandleRef matrix); 1268internal static extern int GdipResetPathGradientTransform(HandleRef brush); 1272internal static extern int GdipMultiplyPathGradientTransform(HandleRef brush, HandleRef matrix, MatrixOrder order); 1276internal static extern int GdipTranslatePathGradientTransform(HandleRef brush, float dx, float dy, MatrixOrder order); 1280internal static extern int GdipScalePathGradientTransform(HandleRef brush, float sx, float sy, MatrixOrder order); 1284internal static extern int GdipRotatePathGradientTransform(HandleRef brush, float angle, MatrixOrder order); 1288internal static extern int GdipGetPathGradientFocusScales(HandleRef brush, 1294internal static extern int GdipSetPathGradientFocusScales(HandleRef brush, 1309internal static extern int GdipCreatePen2(HandleRef brush, float width, int unit, 1314internal static extern int GdipClonePen(HandleRef pen, out IntPtr clonepen); 1318private static extern int IntGdipDeletePen(HandleRef Pen); 1319internal static int GdipDeletePen(HandleRef pen) { 1327internal static extern int GdipSetPenMode(HandleRef pen, PenAlignment penAlign); 1331internal static extern int GdipGetPenMode(HandleRef pen, out PenAlignment penAlign); 1335internal static extern int GdipSetPenWidth(HandleRef pen, float width); 1339internal static extern int GdipGetPenWidth(HandleRef pen, float[] width); 1343internal static extern int GdipSetPenLineCap197819(HandleRef pen, int startCap, int endCap, int dashCap); 1347internal static extern int GdipSetPenStartCap(HandleRef pen, int startCap); 1351internal static extern int GdipSetPenEndCap(HandleRef pen, int endCap); 1355internal static extern int GdipGetPenStartCap(HandleRef pen, out int startCap); 1359internal static extern int GdipGetPenEndCap(HandleRef pen, out int endCap); 1363internal static extern int GdipGetPenDashCap197819(HandleRef pen, out int dashCap); 1367internal static extern int GdipSetPenDashCap197819(HandleRef pen, int dashCap); 1371internal static extern int GdipSetPenLineJoin(HandleRef pen, int lineJoin); 1375internal static extern int GdipGetPenLineJoin(HandleRef pen, out int lineJoin); 1379internal static extern int GdipSetPenCustomStartCap(HandleRef pen, HandleRef customCap); 1383internal static extern int GdipGetPenCustomStartCap(HandleRef pen, out IntPtr customCap); 1387internal static extern int GdipSetPenCustomEndCap(HandleRef pen, HandleRef customCap); 1391internal static extern int GdipGetPenCustomEndCap(HandleRef pen, out IntPtr customCap); 1395internal static extern int GdipSetPenMiterLimit(HandleRef pen, float miterLimit); 1399internal static extern int GdipGetPenMiterLimit(HandleRef pen, float[] miterLimit); 1403internal static extern int GdipSetPenTransform(HandleRef pen, HandleRef matrix); 1407internal static extern int GdipGetPenTransform(HandleRef pen, HandleRef matrix); 1411internal static extern int GdipResetPenTransform(HandleRef brush); 1415internal static extern int GdipMultiplyPenTransform(HandleRef brush, HandleRef matrix, MatrixOrder order); 1419internal static extern int GdipTranslatePenTransform(HandleRef brush, float dx, float dy, MatrixOrder order); 1423internal static extern int GdipScalePenTransform(HandleRef brush, float sx, float sy, MatrixOrder order); 1427internal static extern int GdipRotatePenTransform(HandleRef brush, float angle, MatrixOrder order); 1431internal static extern int GdipSetPenColor(HandleRef pen, int argb); 1435internal static extern int GdipGetPenColor(HandleRef pen, out int argb); 1439internal static extern int GdipSetPenBrushFill(HandleRef pen, HandleRef brush); 1443internal static extern int GdipGetPenBrushFill(HandleRef pen, out IntPtr brush); 1447internal static extern int GdipGetPenFillType(HandleRef pen, out int pentype); 1451internal static extern int GdipGetPenDashStyle(HandleRef pen, out int dashstyle); 1455internal static extern int GdipSetPenDashStyle(HandleRef pen, int dashstyle); 1459internal static extern int GdipSetPenDashArray(HandleRef pen, HandleRef memorydash, int count); 1463internal static extern int GdipGetPenDashOffset(HandleRef pen, float[] dashoffset); 1467internal static extern int GdipSetPenDashOffset(HandleRef pen, float dashoffset); 1471internal static extern int GdipGetPenDashCount(HandleRef pen, out int dashcount); 1475internal static extern int GdipGetPenDashArray(HandleRef pen, IntPtr memorydash, int count); 1479internal static extern int GdipGetPenCompoundCount(HandleRef pen, out int count); 1483internal static extern int GdipSetPenCompoundArray(HandleRef pen, float[] array, int count); 1487internal static extern int GdipGetPenCompoundArray(HandleRef pen, float[] array, int count); 1495internal static extern int GdipCreateCustomLineCap(HandleRef fillpath, HandleRef strokepath, LineCap baseCap, float baseInset, out IntPtr customCap); 1499private static extern int IntGdipDeleteCustomLineCap(HandleRef customCap); 1500internal static int GdipDeleteCustomLineCap(HandleRef customCap) { 1508internal static extern int GdipCloneCustomLineCap(HandleRef customCap, out IntPtr clonedCap); 1512internal static extern int GdipGetCustomLineCapType(HandleRef customCap, 1517internal static extern int GdipSetCustomLineCapStrokeCaps(HandleRef customCap, 1523internal static extern int GdipGetCustomLineCapStrokeCaps(HandleRef customCap, 1529internal static extern int GdipSetCustomLineCapStrokeJoin(HandleRef customCap, 1534internal static extern int GdipGetCustomLineCapStrokeJoin(HandleRef customCap, 1539internal static extern int GdipSetCustomLineCapBaseCap(HandleRef customCap, 1544internal static extern int GdipGetCustomLineCapBaseCap(HandleRef customCap, 1549internal static extern int GdipSetCustomLineCapBaseInset(HandleRef customCap, 1554internal static extern int GdipGetCustomLineCapBaseInset(HandleRef customCap, 1559internal static extern int GdipSetCustomLineCapWidthScale(HandleRef customCap, 1564internal static extern int GdipGetCustomLineCapWidthScale(HandleRef customCap, 1577internal static extern int GdipSetAdjustableArrowCapHeight(HandleRef adjustableArrowCap, 1582internal static extern int GdipGetAdjustableArrowCapHeight(HandleRef adjustableArrowCap, 1587internal static extern int GdipSetAdjustableArrowCapWidth(HandleRef adjustableArrowCap, 1592internal static extern int GdipGetAdjustableArrowCapWidth(HandleRef adjustableArrowCap, 1597internal static extern int GdipSetAdjustableArrowCapMiddleInset(HandleRef adjustableArrowCap, 1602internal static extern int GdipGetAdjustableArrowCapMiddleInset(HandleRef adjustableArrowCap, 1607internal static extern int GdipSetAdjustableArrowCapFillState(HandleRef adjustableArrowCap, 1612internal static extern int GdipGetAdjustableArrowCapFillState(HandleRef adjustableArrowCap, 1637internal static extern int GdipCloneImage(HandleRef image, out IntPtr cloneimage); 1641private static extern int IntGdipDisposeImage(HandleRef image); 1642internal static int GdipDisposeImage(HandleRef image) { 1650internal static extern int GdipSaveImageToFile(HandleRef image, string filename, 1651ref Guid classId, HandleRef encoderParams); 1655internal static extern int GdipSaveImageToStream(HandleRef image, UnsafeNativeMethods.IStream stream, 1656ref Guid classId, HandleRef encoderParams); 1660internal static extern int GdipSaveAdd(HandleRef image, HandleRef encoderParams); 1664internal static extern int GdipSaveAddImage(HandleRef image, HandleRef newImage, HandleRef encoderParams); 1668internal static extern int GdipGetImageGraphicsContext(HandleRef image, out IntPtr graphics); 1672internal static extern int GdipGetImageBounds(HandleRef image, ref GPRECTF gprectf, out GraphicsUnit unit); 1676internal static extern int GdipGetImageDimension(HandleRef image, out float width, out float height); 1680internal static extern int GdipGetImageType(HandleRef image, out int type); 1684internal static extern int GdipGetImageWidth(HandleRef image, out int width); 1688internal static extern int GdipGetImageHeight(HandleRef image, out int height); 1692internal static extern int GdipGetImageHorizontalResolution(HandleRef image, out float horzRes); 1696internal static extern int GdipGetImageVerticalResolution(HandleRef image, out float vertRes); 1700internal static extern int GdipGetImageFlags(HandleRef image, out int flags); 1704internal static extern int GdipGetImageRawFormat(HandleRef image, ref Guid format); 1708internal static extern int GdipGetImagePixelFormat(HandleRef image, out int format); 1712internal static extern int GdipGetImageThumbnail(HandleRef image, int thumbWidth, int thumbHeight, 1719internal static extern int GdipGetEncoderParameterListSize(HandleRef image, ref Guid clsid, 1724internal static extern int GdipGetEncoderParameterList(HandleRef image, ref Guid clsid, int size, 1729internal static extern int GdipImageGetFrameDimensionsCount(HandleRef image, out int count); 1733internal static extern int GdipImageGetFrameDimensionsList(HandleRef image, 1739internal static extern int GdipImageGetFrameCount(HandleRef image, ref Guid dimensionID, int[] count); 1743internal static extern int GdipImageSelectActiveFrame(HandleRef image, ref Guid dimensionID, int frameIndex); 1747internal static extern int GdipImageRotateFlip(HandleRef image, int rotateFlipType); 1751internal static extern int GdipGetImagePalette(HandleRef image, IntPtr palette, int size); 1755internal static extern int GdipSetImagePalette(HandleRef image, IntPtr palette); 1759internal static extern int GdipGetImagePaletteSize(HandleRef image, out int size); 1763internal static extern int GdipGetPropertyCount(HandleRef image, out int count); 1767internal static extern int GdipGetPropertyIdList(HandleRef image, int count, int[] list); 1771internal static extern int GdipGetPropertyItemSize(HandleRef image, int propid, out int size); 1775internal static extern int GdipGetPropertyItem(HandleRef image, int propid, int size, IntPtr buffer); 1779internal static extern int GdipGetPropertySize(HandleRef image, out int totalSize, ref int count); 1783internal static extern int GdipGetAllPropertyItems(HandleRef image, int totalSize, int count, IntPtr buffer); 1787internal static extern int GdipRemovePropertyItem(HandleRef image, int propid); 1791internal static extern int GdipSetPropertyItem(HandleRef image, PropertyItemInternal propitem); 1795internal static extern int GdipImageForceValidation(HandleRef image); 1835internal static extern int GdipCreateBitmapFromScan0(int width, int height, int stride, int format, HandleRef scan0, out IntPtr bitmap); 1839internal static extern int GdipCreateBitmapFromGraphics(int width, int height, HandleRef graphics, out IntPtr bitmap); 1843internal static extern int GdipCreateBitmapFromHBITMAP(HandleRef hbitmap, HandleRef hpalette, out IntPtr bitmap); 1847internal static extern int GdipCreateBitmapFromHICON(HandleRef hicon, out IntPtr bitmap); 1851internal static extern int GdipCreateBitmapFromResource(HandleRef hresource, HandleRef name, out IntPtr bitmap); 1855internal static extern int GdipCreateHBITMAPFromBitmap(HandleRef nativeBitmap, out IntPtr hbitmap, int argbBackground); 1859internal static extern int GdipCreateHICONFromBitmap(HandleRef nativeBitmap, out IntPtr hicon); 1863internal static extern int GdipCloneBitmapArea(float x, float y, float width, float height, int format, HandleRef srcbitmap, out IntPtr dstbitmap); 1867internal static extern int GdipCloneBitmapAreaI(int x, int y, int width, int height, int format, HandleRef srcbitmap, out IntPtr dstbitmap); 1871internal static extern int GdipBitmapLockBits(HandleRef bitmap, 1879internal static extern int GdipBitmapUnlockBits(HandleRef bitmap, 1884internal static extern int GdipBitmapGetPixel(HandleRef bitmap, int x, int y, out int argb); 1888internal static extern int GdipBitmapSetPixel(HandleRef bitmap, int x, int y, int argb); 1892internal static extern int GdipBitmapSetResolution(HandleRef bitmap, float dpix, float dpiy); 1904internal static extern int GdipCloneImageAttributes(HandleRef imageattr, out IntPtr cloneImageattr); 1908private static extern int IntGdipDisposeImageAttributes(HandleRef imageattr); 1909internal static int GdipDisposeImageAttributes(HandleRef imageattr) { 1917internal static extern int GdipSetImageAttributesColorMatrix(HandleRef imageattr, 1926internal static extern int GdipSetImageAttributesThreshold(HandleRef imageattr, 1933internal static extern int GdipSetImageAttributesGamma(HandleRef imageattr, 1940internal static extern int GdipSetImageAttributesNoOp(HandleRef imageattr, 1946internal static extern int GdipSetImageAttributesColorKeys(HandleRef imageattr, 1954internal static extern int GdipSetImageAttributesOutputChannel(HandleRef imageattr, 1962HandleRef imageattr, 1969internal static extern int GdipSetImageAttributesRemapTable(HandleRef imageattr, 1973HandleRef map); 1977internal static extern int GdipSetImageAttributesWrapMode(HandleRef imageattr, 1984internal static extern int GdipGetImageAttributesAdjustedPalette(HandleRef imageattr, 1985HandleRef palette, 1994internal static extern int GdipFlush(HandleRef graphics, FlushIntention intention); 1998internal static extern int GdipCreateFromHDC(HandleRef hdc, out IntPtr graphics); 2002internal static extern int GdipCreateFromHDC2(HandleRef hdc, HandleRef hdevice, out IntPtr graphics); 2006internal static extern int GdipCreateFromHWND(HandleRef hwnd, out IntPtr graphics); 2010private static extern int IntGdipDeleteGraphics(HandleRef graphics); 2011internal static int GdipDeleteGraphics(HandleRef graphics) { 2019internal static extern int GdipGetDC(HandleRef graphics, out IntPtr hdc); 2023private static extern int IntGdipReleaseDC(HandleRef graphics, HandleRef hdc); 2024internal static int GdipReleaseDC(HandleRef graphics, HandleRef hdc) { 2032internal static extern int GdipSetCompositingMode(HandleRef graphics, int compositeMode); 2036internal static extern int GdipSetTextRenderingHint(HandleRef graphics, TextRenderingHint textRenderingHint); 2040internal static extern int GdipSetTextContrast(HandleRef graphics, int textContrast); 2044internal static extern int GdipSetInterpolationMode(HandleRef graphics, int mode); 2048internal static extern int GdipGetCompositingMode(HandleRef graphics, out int compositeMode); 2052internal static extern int GdipSetRenderingOrigin(HandleRef graphics, int x, int y); 2056internal static extern int GdipGetRenderingOrigin(HandleRef graphics, out int x, out int y); 2060internal static extern int GdipSetCompositingQuality(HandleRef graphics, CompositingQuality quality); 2064internal static extern int GdipGetCompositingQuality(HandleRef graphics, out CompositingQuality quality); 2068internal static extern int GdipSetSmoothingMode(HandleRef graphics, SmoothingMode smoothingMode); 2072internal static extern int GdipGetSmoothingMode(HandleRef graphics, out SmoothingMode smoothingMode); 2076internal static extern int GdipSetPixelOffsetMode(HandleRef graphics, PixelOffsetMode pixelOffsetMode); 2080internal static extern int GdipGetPixelOffsetMode(HandleRef graphics, out PixelOffsetMode pixelOffsetMode); 2084internal static extern int GdipGetTextRenderingHint(HandleRef graphics, out TextRenderingHint textRenderingHint); 2088internal static extern int GdipGetTextContrast(HandleRef graphics, out int textContrast); 2092internal static extern int GdipGetInterpolationMode(HandleRef graphics, out int mode); 2096internal static extern int GdipSetWorldTransform(HandleRef graphics, HandleRef matrix); 2100internal static extern int GdipResetWorldTransform(HandleRef graphics); 2104internal static extern int GdipMultiplyWorldTransform(HandleRef graphics, HandleRef matrix, MatrixOrder order); 2108internal static extern int GdipTranslateWorldTransform(HandleRef graphics, float dx, float dy, MatrixOrder order); 2112internal static extern int GdipScaleWorldTransform(HandleRef graphics, float sx, float sy, MatrixOrder order); 2116internal static extern int GdipRotateWorldTransform(HandleRef graphics, float angle, MatrixOrder order); 2120internal static extern int GdipGetWorldTransform(HandleRef graphics, HandleRef matrix); 2124internal static extern int GdipGetPageUnit(HandleRef graphics, out int unit); 2128internal static extern int GdipGetPageScale(HandleRef graphics, float[] scale); 2132internal static extern int GdipSetPageUnit(HandleRef graphics, int unit); 2136internal static extern int GdipSetPageScale(HandleRef graphics, float scale); 2140internal static extern int GdipGetDpiX(HandleRef graphics, float[] dpi); 2144internal static extern int GdipGetDpiY(HandleRef graphics, float[] dpi); 2148internal static extern int GdipTransformPoints(HandleRef graphics, int destSpace, 2153internal static extern int GdipTransformPointsI(HandleRef graphics, int destSpace, 2158internal static extern int GdipGetNearestColor(HandleRef graphics, ref int color); 2167internal static extern int GdipDrawLine(HandleRef graphics, HandleRef pen, float x1, float y1, 2172internal static extern int GdipDrawLineI(HandleRef graphics, HandleRef pen, int x1, int y1, 2177internal static extern int GdipDrawLines(HandleRef graphics, HandleRef pen, HandleRef points, 2182internal static extern int GdipDrawLinesI(HandleRef graphics, HandleRef pen, HandleRef points, 2187internal static extern int GdipDrawArc(HandleRef graphics, HandleRef pen, float x, float y, 2193internal static extern int GdipDrawArcI(HandleRef graphics, HandleRef pen, int x, int y, 2199internal static extern int GdipDrawBezier(HandleRef graphics, HandleRef pen, float x1, float y1, 2206internal static extern int GdipDrawBeziers(HandleRef graphics, HandleRef pen, HandleRef points, 2211internal static extern int GdipDrawBeziersI(HandleRef graphics, HandleRef pen, HandleRef points, 2216internal static extern int GdipDrawRectangle(HandleRef graphics, HandleRef pen, float x, float y, 2221internal static extern int GdipDrawRectangleI(HandleRef graphics, HandleRef pen, int x, int y, 2226internal static extern int GdipDrawRectangles(HandleRef graphics, HandleRef pen, HandleRef rects, 2231internal static extern int GdipDrawRectanglesI(HandleRef graphics, HandleRef pen, HandleRef rects, 2236internal static extern int GdipDrawEllipse(HandleRef graphics, HandleRef pen, float x, float y, 2241internal static extern int GdipDrawEllipseI(HandleRef graphics, HandleRef pen, int x, int y, 2246internal static extern int GdipDrawPie(HandleRef graphics, HandleRef pen, float x, float y, 2252internal static extern int GdipDrawPieI(HandleRef graphics, HandleRef pen, int x, int y, 2258internal static extern int GdipDrawPolygon(HandleRef graphics, HandleRef pen, HandleRef points, 2263internal static extern int GdipDrawPolygonI(HandleRef graphics, HandleRef pen, HandleRef points, 2268internal static extern int GdipDrawPath(HandleRef graphics, HandleRef pen, HandleRef path); 2272internal static extern int GdipDrawCurve(HandleRef graphics, HandleRef pen, HandleRef points, 2277internal static extern int GdipDrawCurveI(HandleRef graphics, HandleRef pen, HandleRef points, 2282internal static extern int GdipDrawCurve2(HandleRef graphics, HandleRef pen, HandleRef points, 2287internal static extern int GdipDrawCurve2I(HandleRef graphics, HandleRef pen, HandleRef points, 2292internal static extern int GdipDrawCurve3(HandleRef graphics, HandleRef pen, HandleRef points, 2298internal static extern int GdipDrawCurve3I(HandleRef graphics, HandleRef pen, HandleRef points, 2304internal static extern int GdipDrawClosedCurve(HandleRef graphics, HandleRef pen, HandleRef points, 2309internal static extern int GdipDrawClosedCurveI(HandleRef graphics, HandleRef pen, HandleRef points, 2314internal static extern int GdipDrawClosedCurve2(HandleRef graphics, HandleRef pen, HandleRef points, 2319internal static extern int GdipDrawClosedCurve2I(HandleRef graphics, HandleRef pen, HandleRef points, 2324internal static extern int GdipGraphicsClear(HandleRef graphics, int argb); 2328internal static extern int GdipFillRectangle(HandleRef graphics, HandleRef brush, float x, float y, 2333internal static extern int GdipFillRectangleI(HandleRef graphics, HandleRef brush, int x, int y, 2338internal static extern int GdipFillRectangles(HandleRef graphics, HandleRef brush, HandleRef rects, 2343internal static extern int GdipFillRectanglesI(HandleRef graphics, HandleRef brush, HandleRef rects, 2348internal static extern int GdipFillPolygon(HandleRef graphics, HandleRef brush, HandleRef points, 2353internal static extern int GdipFillPolygonI(HandleRef graphics, HandleRef brush, HandleRef points, 2359internal static extern int GdipFillEllipse(HandleRef graphics, HandleRef brush, float x, float y, 2364internal static extern int GdipFillEllipseI(HandleRef graphics, HandleRef brush, int x, int y, 2369internal static extern int GdipFillPie(HandleRef graphics, HandleRef brush, float x, float y, 2375internal static extern int GdipFillPieI(HandleRef graphics, HandleRef brush, int x, int y, 2381internal static extern int GdipFillPath(HandleRef graphics, HandleRef brush, HandleRef path); 2385internal static extern int GdipFillClosedCurve(HandleRef graphics, HandleRef brush, HandleRef points, 2390internal static extern int GdipFillClosedCurveI(HandleRef graphics, HandleRef brush, HandleRef points, 2395internal static extern int GdipFillClosedCurve2(HandleRef graphics, HandleRef brush, HandleRef points, 2401internal static extern int GdipFillClosedCurve2I(HandleRef graphics, HandleRef brush, HandleRef points, 2407internal static extern int GdipFillRegion(HandleRef graphics, HandleRef brush, HandleRef region); 2411internal static extern int GdipDrawImage(HandleRef graphics, HandleRef image, float x, float y); 2415internal static extern int GdipDrawImageI(HandleRef graphics, HandleRef image, int x, int y); 2419internal static extern int GdipDrawImageRect(HandleRef graphics, HandleRef image, float x, 2424internal static extern int GdipDrawImageRectI(HandleRef graphics, HandleRef image, int x, 2429internal static extern int GdipDrawImagePoints(HandleRef graphics, HandleRef image, 2430HandleRef points, int count); 2434internal static extern int GdipDrawImagePointsI(HandleRef graphics, HandleRef image, 2435HandleRef points, int count); 2439internal static extern int GdipDrawImagePointRect(HandleRef graphics, HandleRef image, float x, 2446internal static extern int GdipDrawImagePointRectI(HandleRef graphics, HandleRef image, int x, 2453internal static extern int GdipDrawImageRectRect(HandleRef graphics, HandleRef image, 2458int srcunit, HandleRef imageAttributes, 2459Graphics.DrawImageAbort callback, HandleRef callbackdata); 2463internal static extern int GdipDrawImageRectRectI(HandleRef graphics, HandleRef image, 2468int srcunit, HandleRef imageAttributes, 2469Graphics.DrawImageAbort callback, HandleRef callbackdata); 2473internal static extern int GdipDrawImagePointsRect(HandleRef graphics, HandleRef image, 2474HandleRef points, int count, float srcx, 2477HandleRef imageAttributes, 2478Graphics.DrawImageAbort callback, HandleRef callbackdata); 2482internal static extern int GdipDrawImagePointsRectI(HandleRef graphics, HandleRef image, 2483HandleRef points, int count, int srcx, 2486HandleRef imageAttributes, 2487Graphics.DrawImageAbort callback, HandleRef callbackdata); 2491internal static extern int GdipEnumerateMetafileDestPoint(HandleRef graphics, 2492HandleRef metafile, 2495HandleRef callbackdata, 2496HandleRef imageattributes); 2500internal static extern int GdipEnumerateMetafileDestPointI(HandleRef graphics, 2501HandleRef metafile, 2504HandleRef callbackdata, 2505HandleRef imageattributes); 2509internal static extern int GdipEnumerateMetafileDestRect(HandleRef graphics, 2510HandleRef metafile, 2513HandleRef callbackdata, 2514HandleRef imageattributes); 2518internal static extern int GdipEnumerateMetafileDestRectI(HandleRef graphics, 2519HandleRef metafile, 2522HandleRef callbackdata, 2523HandleRef imageattributes); 2527internal static extern int GdipEnumerateMetafileDestPoints(HandleRef graphics, 2528HandleRef metafile, 2532HandleRef callbackdata, 2533HandleRef imageattributes); 2537internal static extern int GdipEnumerateMetafileDestPointsI(HandleRef graphics, 2538HandleRef metafile, 2542HandleRef callbackdata, 2543HandleRef imageattributes); 2547internal static extern int GdipEnumerateMetafileSrcRectDestPoint(HandleRef graphics, 2548HandleRef metafile, 2553HandleRef callbackdata, 2554HandleRef imageattributes); 2558internal static extern int GdipEnumerateMetafileSrcRectDestPointI(HandleRef graphics, 2559HandleRef metafile, 2564HandleRef callbackdata, 2565HandleRef imageattributes); 2569internal static extern int GdipEnumerateMetafileSrcRectDestRect(HandleRef graphics, 2570HandleRef metafile, 2575HandleRef callbackdata, 2576HandleRef imageattributes); 2580internal static extern int GdipEnumerateMetafileSrcRectDestRectI(HandleRef graphics, 2581HandleRef metafile, 2586HandleRef callbackdata, 2587HandleRef imageattributes); 2591internal static extern int GdipEnumerateMetafileSrcRectDestPoints(HandleRef graphics, 2592HandleRef metafile, 2598HandleRef callbackdata, 2599HandleRef imageattributes); 2603internal static extern int GdipEnumerateMetafileSrcRectDestPointsI(HandleRef graphics, 2604HandleRef metafile, 2610HandleRef callbackdata, 2611HandleRef imageattributes); 2615internal static extern int GdipPlayMetafileRecord(HandleRef graphics, 2623internal static extern int GdipSetClipGraphics(HandleRef graphics, HandleRef srcgraphics, CombineMode mode); 2627internal static extern int GdipSetClipRect(HandleRef graphics, float x, float y, 2632internal static extern int GdipSetClipRectI(HandleRef graphics, int x, int y, 2637internal static extern int GdipSetClipPath(HandleRef graphics, HandleRef path, CombineMode mode); 2641internal static extern int GdipSetClipRegion(HandleRef graphics, HandleRef region, CombineMode mode); 2645internal static extern int GdipResetClip(HandleRef graphics); 2649internal static extern int GdipTranslateClip(HandleRef graphics, float dx, float dy); 2653internal static extern int GdipGetClip(HandleRef graphics, HandleRef region); 2657internal static extern int GdipGetClipBounds(HandleRef graphics, ref GPRECTF rect); 2661internal static extern int GdipIsClipEmpty(HandleRef graphics, 2666internal static extern int GdipGetVisibleClipBounds(HandleRef graphics, ref GPRECTF rect); 2670internal static extern int GdipIsVisibleClipEmpty(HandleRef graphics, 2675internal static extern int GdipIsVisiblePoint(HandleRef graphics, float x, float y, 2680internal static extern int GdipIsVisiblePointI(HandleRef graphics, int x, int y, 2685internal static extern int GdipIsVisibleRect(HandleRef graphics, float x, float y, 2691internal static extern int GdipIsVisibleRectI(HandleRef graphics, int x, int y, 2697internal static extern int GdipSaveGraphics(HandleRef graphics, out int state); 2701internal static extern int GdipRestoreGraphics(HandleRef graphics, int state); 2705internal static extern int GdipBeginContainer(HandleRef graphics, ref GPRECTF dstRect, 2711internal static extern int GdipBeginContainer2(HandleRef graphics, out int state); 2715internal static extern int GdipBeginContainerI(HandleRef graphics, ref GPRECT dstRect, 2721internal static extern int GdipEndContainer(HandleRef graphics, int state); 2725internal static extern int GdipGetMetafileHeaderFromWmf(HandleRef hMetafile, // WMF 2731internal static extern int GdipGetMetafileHeaderFromEmf(HandleRef hEnhMetafile, // EMF 2746internal static extern int GdipGetMetafileHeaderFromMetafile(HandleRef metafile, 2751internal static extern int GdipGetHemfFromMetafile(HandleRef metafile, 2756internal static extern int GdipCreateMetafileFromWmf(HandleRef hMetafile, [MarshalAs(UnmanagedType.Bool)]bool deleteWmf, WmfPlaceableFileHeader wmfplacealbeHeader, out IntPtr metafile); 2760internal static extern int GdipCreateMetafileFromEmf(HandleRef hEnhMetafile, bool deleteEmf, out IntPtr metafile); 2772internal static extern int GdipRecordMetafile(HandleRef referenceHdc, 2781internal static extern int GdipRecordMetafile(HandleRef referenceHdc, 2783HandleRef pframeRect, 2790internal static extern int GdipRecordMetafileI(HandleRef referenceHdc, 2800HandleRef referenceHdc, 2810HandleRef referenceHdc, 2812HandleRef pframeRect, 2820HandleRef referenceHdc, 2830HandleRef referenceHdc, 2840HandleRef referenceHdc, 2842HandleRef pframeRect, 2850HandleRef referenceHdc, 2861internal static extern int GdipComment(HandleRef graphics, int sizeData, byte[] data); 2889internal static extern int GdipGetFontCollectionFamilyCount(HandleRef fontCollection, out int numFound); 2894internal static extern int GdipGetFontCollectionFamilyList(HandleRef fontCollection, int numSought, IntPtr[] gpfamilies, 2899internal static extern int GdipPrivateAddFontFile(HandleRef fontCollection, string filename); 2903internal static extern int GdipPrivateAddMemoryFont(HandleRef fontCollection, HandleRef memory, int length); 2911internal static extern int GdipCreateFontFamilyFromName(string name, HandleRef fontCollection, out IntPtr FontFamily); 2927private static extern int IntGdipDeleteFontFamily(HandleRef fontFamily); 2928internal static int GdipDeleteFontFamily(HandleRef fontFamily) { 2936internal static extern int GdipCloneFontFamily(HandleRef fontfamily, out IntPtr clonefontfamily); 2940internal static extern int GdipGetFamilyName(HandleRef family, StringBuilder name, int language); 2944internal static extern int GdipIsStyleAvailable(HandleRef family, FontStyle style, out int isStyleAvailable); 2948internal static extern int GdipGetEmHeight(HandleRef family, FontStyle style, out int EmHeight); 2952internal static extern int GdipGetCellAscent(HandleRef family, FontStyle style, out int CellAscent); 2956internal static extern int GdipGetCellDescent(HandleRef family, FontStyle style, out int CellDescent); 2960internal static extern int GdipGetLineSpacing(HandleRef family, FontStyle style, out int LineSpaceing); 2967internal static extern int GdipCreateFontFromDC(HandleRef hdc, ref IntPtr font); 2971internal static extern int GdipCreateFontFromLogfontA(HandleRef hdc, [In, Out, MarshalAs(UnmanagedType.AsAny)] object lf, out IntPtr font); 2975internal static extern int GdipCreateFontFromLogfontW(HandleRef hdc, [In, Out, MarshalAs(UnmanagedType.AsAny)] object lf, out IntPtr font); 2979internal static extern int GdipCreateFont(HandleRef fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font); 2983internal static extern int GdipGetLogFontW(HandleRef font, HandleRef graphics, [In, Out, MarshalAs(UnmanagedType.AsAny)] object lf); 2987internal static extern int GdipGetLogFontA(HandleRef font, HandleRef graphics, [In, Out, MarshalAs(UnmanagedType.AsAny)] object lf); 2992internal static extern int GdipCloneFont(HandleRef font, out IntPtr cloneFont); 2996private static extern int IntGdipDeleteFont(HandleRef font); 2997internal static int GdipDeleteFont(HandleRef font) { 3005internal static extern int GdipGetFamily(HandleRef font, out IntPtr family); 3010internal static extern int GdipGetFontStyle(HandleRef font, out FontStyle style); 3014internal static extern int GdipGetFontSize(HandleRef font, out float size); 3018internal static extern int GdipGetFontHeight(HandleRef font, HandleRef graphics, out float size); 3022internal static extern int GdipGetFontHeightGivenDPI(HandleRef font, float dpi, out float size); 3027internal static extern int GdipGetFontUnit(HandleRef font, out GraphicsUnit unit); 3033internal static extern int GdipDrawString(HandleRef graphics, string textString, int length, HandleRef font, ref GPRECTF layoutRect, 3034HandleRef stringFormat, HandleRef brush); 3037internal static extern int GdipMeasureString(HandleRef graphics, string textString, int length, HandleRef font, ref GPRECTF layoutRect, 3038HandleRef stringFormat, [In, Out] ref GPRECTF boundingBox, out int codepointsFitted, out int linesFilled); 3042internal static extern int GdipMeasureCharacterRanges(HandleRef graphics, string textString, int length, HandleRef font, ref GPRECTF layoutRect, HandleRef stringFormat, 3047internal static extern int GdipSetStringFormatMeasurableCharacterRanges(HandleRef format, int rangeCount, [In, Out] CharacterRange[] range); 3063private static extern int IntGdipDeleteStringFormat(HandleRef format); 3064internal static int GdipDeleteStringFormat(HandleRef format) { 3072internal static extern int GdipCloneStringFormat(HandleRef format, out IntPtr newFormat); 3076internal static extern int GdipSetStringFormatFlags(HandleRef format, StringFormatFlags options); 3080internal static extern int GdipGetStringFormatFlags(HandleRef format, out StringFormatFlags result); 3084internal static extern int GdipSetStringFormatAlign(HandleRef format, StringAlignment align); 3088internal static extern int GdipGetStringFormatAlign(HandleRef format, out StringAlignment align); 3092internal static extern int GdipSetStringFormatLineAlign(HandleRef format, StringAlignment align); 3096internal static extern int GdipGetStringFormatLineAlign(HandleRef format, out StringAlignment align); 3100internal static extern int GdipSetStringFormatHotkeyPrefix(HandleRef format, HotkeyPrefix hotkeyPrefix); 3104internal static extern int GdipGetStringFormatHotkeyPrefix(HandleRef format, out HotkeyPrefix hotkeyPrefix); 3108internal static extern int GdipSetStringFormatTabStops(HandleRef format, float firstTabOffset, int count, float[] tabStops); 3112internal static extern int GdipGetStringFormatTabStops(HandleRef format, int count, out float firstTabOffset, [In, Out]float[] tabStops); 3116internal static extern int GdipGetStringFormatTabStopCount(HandleRef format, out int count); 3120internal static extern int GdipGetStringFormatMeasurableCharacterRangeCount(HandleRef format, out int count); 3124internal static extern int GdipSetStringFormatTrimming(HandleRef format, StringTrimming trimming); 3128internal static extern int GdipGetStringFormatTrimming(HandleRef format, out StringTrimming trimming); 3132internal static extern int GdipSetStringFormatDigitSubstitution(HandleRef format, int langID, StringDigitSubstitute sds); 3136internal static extern int GdipGetStringFormatDigitSubstitution(HandleRef format, out int langID, out StringDigitSubstitute sds); 3923public static extern IntPtr IntCreateCompatibleBitmap(HandleRef hDC, int width, int height); 3926public static IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height) { 3957public static extern int BitBlt(HandleRef hDC, int x, int y, int nWidth, int nHeight, 3958HandleRef hSrcDC, int xSrc, int ySrc, int dwRop); 3966public static extern int GetDIBits(HandleRef hdc, HandleRef hbm, int arg1, int arg2, IntPtr arg3, ref NativeMethods.BITMAPINFO_FLAT bmi, int arg5); 3978public static extern uint GetPaletteEntries(HandleRef hpal, int iStartIndex, int nEntries, byte[] lppe); 3982public static extern IntPtr IntCreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset); 3983public static IntPtr CreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset) { 3989public static extern IntPtr GlobalFree(HandleRef handle); 3992public static extern int StartDoc(HandleRef hDC, DOCINFO lpDocInfo); 3995public static extern int StartPage(HandleRef hDC); 3998public static extern int EndPage(HandleRef hDC); 4002public static extern int AbortDoc(HandleRef hDC); 4005public static extern int EndDoc(HandleRef hDC); 4026public static extern int DocumentProperties(HandleRef hwnd, HandleRef hPrinter, string pDeviceName, IntPtr /*DEVMODE*/ pDevModeOutput, HandleRef /*DEVMODE*/ pDevModeInput, int fMode); 4030public static extern int DocumentProperties(HandleRef hwnd, HandleRef hPrinter, string pDeviceName, IntPtr /*DEVMODE*/ pDevModeOutput, IntPtr /*DEVMODE*/ pDevModeInput, int fMode); 4050public static extern IntPtr GlobalLock(HandleRef handle); 4053public static extern IntPtr /*HDC*/ ResetDC(HandleRef hDC, HandleRef /*DEVMODE*/ lpDevMode); 4056public static extern bool GlobalUnlock(HandleRef handle); 4066public static extern int GetClipRgn(HandleRef hDC, HandleRef hRgn); 4069public static extern int SelectClipRgn(HandleRef hDC, HandleRef hRgn); 4169public static extern int ExtEscape(HandleRef hDC, int nEscape, int cbInput, ref int inData, int cbOutput, [Out] out int outData); 4172public static extern int ExtEscape(HandleRef hDC, int nEscape, int cbInput, byte[] inData, int cbOutput, [Out] out int outData); 4177public static extern int IntersectClipRect(HandleRef hDC, int x1, int y1, int x2, int y2); 4777internal static extern int IntDeleteObject(HandleRef hObject); 4778public static int DeleteObject(HandleRef hObject) 4796public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj); 4818public unsafe static extern IntPtr IntExtractAssociatedIcon(HandleRef hInst, StringBuilder iconPath, ref int index); 4822public unsafe static IntPtr ExtractAssociatedIcon(HandleRef hInst, StringBuilder iconPath, ref int index) { 4828private static extern IntPtr IntLoadIcon(HandleRef hInst, IntPtr iconId); 4831public static IntPtr LoadIcon(HandleRef hInst, int iconId) { // we only use the case were the low word of the IntPtr is used a resource id but it still has to be an intptr 4837private static extern int IntLoadIconWithScaleDown(HandleRef hInst, IntPtr iconId, int cx, int cy, ref IntPtr phico); 4840public static int LoadIconWithScaleDown(HandleRef hInst, int iconId, int cx, int cy, ref IntPtr phico) { // we only use the case were the low word of the IntPtr is used a resource id but it still has to be an intptr 4846private static extern bool IntDestroyIcon(HandleRef hIcon); 4847public static bool DestroyIcon(HandleRef hIcon) { 4854private static extern IntPtr IntCopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags); 4857public static IntPtr CopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags) { 4873public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] SafeNativeMethods.BITMAP bm); 4877public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] SafeNativeMethods.LOGFONT lf); 4878public static int GetObject(HandleRef hObject, SafeNativeMethods.LOGFONT lp) { 4907public static extern bool GetIconInfo(HandleRef hIcon, [In, Out] SafeNativeMethods.ICONINFO info); 4920public static extern bool DrawIconEx(HandleRef hDC, int x, int y, HandleRef hIcon, int width, int height, int iStepIfAniCursor, HandleRef hBrushFlickerFree, int diFlags);
commonui\System\Drawing\BufferedGraphics.cs (1)
157private void RenderInternal(HandleRef refTargetDC, BufferedGraphics buffer) {
commonui\System\Drawing\Graphics.cs (2)
921HandleRef screenDC = new HandleRef( null, dc.Hdc ); 922HandleRef targetDC = new HandleRef( null, this.GetHdc()); // this DC
commonui\System\Drawing\NativeMethods.cs (1)
19internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
commonui\System\Drawing\Printing\PageSettings.cs (1)
239HandleRef hdc = new HandleRef(dc, dc.Hdc);
commonui\System\Drawing\Printing\PrinterSettings.cs (2)
532HandleRef hdc = new HandleRef(dc, dc.Hdc); 575HandleRef hdc = new HandleRef(dc, dc.Hdc);
commonui\System\Drawing\UnsafeNativeMethods.cs (14)
27public static extern void CopyMemory(HandleRef destData, HandleRef srcData, int size); 31private static extern IntPtr IntGetDC(HandleRef hWnd); 34public static IntPtr GetDC(HandleRef hWnd) { 40private static extern bool IntDeleteDC(HandleRef hDC); 41public static bool DeleteDC(HandleRef hDC) { 48private static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC); 49public static int ReleaseDC(HandleRef hWnd, HandleRef hDC) { 94private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 97public static IntPtr CreateCompatibleDC(HandleRef hDC) { 123public static extern int GetDeviceCaps(HandleRef hDC, int nIndex); 127public static extern int GetObjectType(HandleRef hObject);
misc\DbgUtil.cs (2)
66public static extern int FormatMessage(int dwFlags, HandleRef lpSource, int dwMessageId, int dwLanguageId, StringBuilder lpBuffer, int nSize, HandleRef arguments);
misc\GDI\DeviceContext.cs (5)
275public static DeviceContext CreateDC(string driverName, string deviceName, string fileName, HandleRef devMode) 288public static DeviceContext CreateIC(string driverName, string deviceName, string fileName, HandleRef devMode) 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 606HandleRef hRegion = new HandleRef(region, region.HRegion);
misc\GDI\UnsafeNativeMethods.cs (114)
39public static extern IntPtr IntGetDC(HandleRef hWnd); 42public static IntPtr GetDC(HandleRef hWnd) { 54public static extern bool IntDeleteDC(HandleRef hDC); 55public static bool DeleteDC(HandleRef hDC) { 61public static bool DeleteHDC(HandleRef hDC) { 70public static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC); 71public static int ReleaseDC(HandleRef hWnd, HandleRef hDC) { 81public static extern IntPtr IntCreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 84public static IntPtr CreateDC(String lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 95public static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 98public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 111public static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 114public static IntPtr CreateCompatibleDC(HandleRef hDC) 124public static extern int IntSaveDC(HandleRef hDC); 125public static int SaveDC(HandleRef hDC) 134public static extern bool IntRestoreDC(HandleRef hDC, int nSavedDC); 135public static bool RestoreDC(HandleRef hDC, int nSavedDC) 147public static extern IntPtr WindowFromDC(HandleRef hDC); 151public static extern int GetDeviceCaps(HandleRef hDC, int nIndex); 155public static extern bool IntOffsetViewportOrgEx(HandleRef hDC, int nXOffset, int nYOffset, [In, Out] IntNativeMethods.POINT point); 156public static bool OffsetViewportOrgEx(HandleRef hDC, int nXOffset, int nYOffset, [In, Out] IntNativeMethods.POINT point) 165public static extern int IntSetGraphicsMode(HandleRef hDC, int iMode); 166public static int SetGraphicsMode(HandleRef hDC, int iMode) 175public static extern int GetGraphicsMode(HandleRef hDC); 179public static extern int GetROP2(HandleRef hdc); 183public static extern int SetROP2(HandleRef hDC, int nDrawMode); 189public static extern IntNativeMethods.RegionFlags IntCombineRgn(HandleRef hRgnDest, HandleRef hRgnSrc1, HandleRef hRgnSrc2, RegionCombineMode combineMode); 190public static IntNativeMethods.RegionFlags CombineRgn(HandleRef hRgnDest, HandleRef hRgnSrc1, HandleRef hRgnSrc2, RegionCombineMode combineMode) { 205public static extern int IntGetClipRgn(HandleRef hDC, HandleRef hRgn); 206public static int GetClipRgn(HandleRef hDC, HandleRef hRgn) { 214public static extern IntNativeMethods.RegionFlags IntSelectClipRgn(HandleRef hDC, HandleRef hRgn); 215public static IntNativeMethods.RegionFlags SelectClipRgn(HandleRef hDC, HandleRef hRgn) 224public static extern IntNativeMethods.RegionFlags IntGetRgnBox(HandleRef hRgn, [In, Out] ref IntNativeMethods.RECT clipRect); 225public static IntNativeMethods.RegionFlags GetRgnBox(HandleRef hRgn, [In, Out] ref IntNativeMethods.RECT clipRect) 250public static extern bool IntDeleteObject(HandleRef hObject); 251public static bool DeleteObject(HandleRef hObject) 261public static extern int IntGetObject(HandleRef hBrush, int nSize, [In, Out] IntNativeMethods.LOGBRUSH lb); 262public static int GetObject(HandleRef hBrush, IntNativeMethods.LOGBRUSH lb) 272public static extern int IntGetObject(HandleRef hFont, int nSize, [In, Out] IntNativeMethods.LOGFONT lf); 273public static int GetObject(HandleRef hFont, IntNativeMethods.LOGFONT lp) 282public static extern IntPtr IntSelectObject(HandleRef hdc, HandleRef obj); 285public static IntPtr SelectObject(HandleRef hdc, HandleRef obj) 294public static extern IntPtr IntGetCurrentObject(HandleRef hDC, int uObjectType); 297public static IntPtr GetCurrentObject(HandleRef hDC, int uObjectType) 322public static extern int GetNearestColor(HandleRef hDC, int color); 326public static extern int /*COLORREF*/ SetTextColor(HandleRef hDC, int crColor); 330public static extern int GetTextAlign(HandleRef hdc); 334public static extern int /*COLORREF*/ GetTextColor(HandleRef hDC); 338public static extern int SetBkColor(HandleRef hDC, int clr); 342public static extern int IntSetBkMode(HandleRef hDC, int nBkMode); 343public static int SetBkMode(HandleRef hDC, int nBkMode) 352public static extern int IntGetBkMode(HandleRef hDC); 353public static int GetBkMode(HandleRef hDC) 362public static extern int GetBkColor(HandleRef hDC); 367public static extern int DrawTextW(HandleRef hDC, string lpszString, int nCount, ref IntNativeMethods.RECT lpRect, int nFormat); 371public static extern int DrawTextA(HandleRef hDC, byte[] lpszString, int byteCount, ref IntNativeMethods.RECT lpRect, int nFormat); 373public static int DrawText( HandleRef hDC, string text, ref IntNativeMethods.RECT lpRect, int nFormat ) 406public static extern int DrawTextExW(HandleRef hDC, string lpszString, int nCount, ref IntNativeMethods.RECT lpRect, int nFormat, [In, Out] IntNativeMethods.DRAWTEXTPARAMS lpDTParams); 410public static extern int DrawTextExA(HandleRef hDC, byte[] lpszString, int byteCount, ref IntNativeMethods.RECT lpRect, int nFormat, [In, Out] IntNativeMethods.DRAWTEXTPARAMS lpDTParams); 412public static int DrawTextEx(HandleRef hDC, string text, ref IntNativeMethods.RECT lpRect, int nFormat, [In, Out] IntNativeMethods.DRAWTEXTPARAMS lpDTParams) 446public static extern int GetTextExtentPoint32W(HandleRef hDC, string text, int len, [In, Out] IntNativeMethods.SIZE size); 451public static extern int GetTextExtentPoint32A(HandleRef hDC, byte[] lpszString, int byteCount, [In, Out] IntNativeMethods.SIZE size); 453public static int GetTextExtentPoint32(HandleRef hDC, string text, [In, Out] IntNativeMethods.SIZE size) 484internal static extern bool ExtTextOut(HandleRef hdc, int x, int y, int options, ref IntNativeMethods.RECT rect, string str, int length, int[] spacing); 488public static extern bool IntLineTo(HandleRef hdc, int x, int y); 489public static bool LineTo(HandleRef hdc, int x, int y) 498public static extern bool IntMoveToEx(HandleRef hdc, int x, int y, IntNativeMethods.POINT pt); 499public static bool MoveToEx(HandleRef hdc, int x, int y, IntNativeMethods.POINT pt) 508public static extern bool IntRectangle(HandleRef hdc, int left, int top, int right, int bottom); 509public static bool Rectangle(HandleRef hdc, int left, int top, int right, int bottom) 518public static extern bool IntFillRect(HandleRef hdc, [In] ref IntNativeMethods.RECT rect, HandleRef hbrush); 519public static bool FillRect(HandleRef hDC, [In] ref IntNativeMethods.RECT rect, HandleRef hbrush) 528public static extern int IntSetMapMode(HandleRef hDC, int nMapMode); 529public static int SetMapMode(HandleRef hDC, int nMapMode) 538public static extern int IntGetMapMode(HandleRef hDC); 539public static int GetMapMode(HandleRef hDC) 548public static extern bool IntGetViewportExtEx(HandleRef hdc, [In, Out] IntNativeMethods.SIZE lpSize); 549public static bool GetViewportExtEx( HandleRef hdc, [In, Out] IntNativeMethods.SIZE lpSize ) 558public static extern bool IntGetViewportOrgEx(HandleRef hdc, [In, Out] IntNativeMethods.POINT lpPoint); 559public static bool GetViewportOrgEx( HandleRef hdc, [In, Out] IntNativeMethods.POINT lpPoint ) 568public static extern bool IntSetViewportExtEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.SIZE size); 569public static bool SetViewportExtEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.SIZE size) 577public static extern bool IntSetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.POINT point); 578public static bool SetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.POINT point) 589public static extern int GetTextMetricsW(HandleRef hDC, [In, Out] ref IntNativeMethods.TEXTMETRIC lptm); 593public static extern int GetTextMetricsA(HandleRef hDC, [In, Out] ref IntNativeMethods.TEXTMETRICA lptm); 595public static int GetTextMetrics(HandleRef hDC, ref IntNativeMethods.TEXTMETRIC lptm) 638public static extern bool IntBeginPath(HandleRef hDC); 639public static bool BeginPath(HandleRef hDC) 648public static extern bool IntEndPath(HandleRef hDC); 649public static bool EndPath(HandleRef hDC) 658public static extern bool IntStrokePath(HandleRef hDC); 659public static bool StrokePath(HandleRef hDC) 668public static extern bool IntAngleArc(HandleRef hDC, int x, int y, int radius, float startAngle, float endAngle); 669public static bool AngleArc(HandleRef hDC, int x, int y, int radius, float startAngle, float endAngle) 679HandleRef hDC, 690HandleRef hDC, 710public static extern int SetTextAlign(HandleRef hDC, int nMode); 714public static extern bool IntEllipse(HandleRef hDc, int x1, int y1, int x2, int y2); 715public static bool Ellipse(HandleRef hDc, int x1, int y1, int x2, int y2)
System.IdentityModel.Selectors (2)
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (2)
98[In] HandleRef strings, 510HandleRef data = new HandleRef(handle, stringsRootHandle.AddrOfPinnedObject());
System.ServiceModel.Internals (2)
System\Runtime\Diagnostics\EventLogger.cs (1)
307HandleRef data = new HandleRef(handle, stringsRootHandle.AddrOfPinnedObject());
System\Runtime\Interop\UnsafeNativeMethods.cs (1)
236uint eventID, byte[] userSID, ushort numStrings, uint dataLen, HandleRef strings,
System.Web (15)
Compilation\CompilationLock.cs (1)
34private HandleRef _mutexHandle;
FileChangesMonitor.cs (2)
412HandleRef _ndirMonCompletionHandle; // handleref of a pointer to native dir mon as int 486HandleRef ndirMonCompletionHandle = _ndirMonCompletionHandle;
ImpersonationContext.cs (2)
16private HandleRef _savedToken; 49protected void ImpersonateToken(HandleRef token) {
State\OutOfProcStateClientManager.cs (2)
269HandleRef socketHandle; 691internal HandleRef _socketHandle;
UnsafeNativeMethods.cs (8)
455internal static extern void DirMonClose(HandleRef dirMon, bool fNeedToDispose); 922internal static extern void InstrumentedMutexDelete(HandleRef mutex); 925internal static extern int InstrumentedMutexGetLock(HandleRef mutex, int timeout); 928internal static extern int InstrumentedMutexReleaseLock(HandleRef mutex); 931internal static extern void InstrumentedMutexSetState(HandleRef mutex, int state); 1138HandleRef socket, 1155internal static extern void SessionNDFreeBody(HandleRef body); 1158internal static extern void SessionNDCloseConnection(HandleRef socket);
System.Windows.Forms (692)
misc\DbgUtil.cs (2)
66public static extern int FormatMessage(int dwFlags, HandleRef lpSource, int dwMessageId, int dwLanguageId, StringBuilder lpBuffer, int nSize, HandleRef arguments);
misc\GDI\DeviceContext.cs (5)
275public static DeviceContext CreateDC(string driverName, string deviceName, string fileName, HandleRef devMode) 288public static DeviceContext CreateIC(string driverName, string deviceName, string fileName, HandleRef devMode) 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 606HandleRef hRegion = new HandleRef(region, region.HRegion);
misc\GDI\UnsafeNativeMethods.cs (114)
39public static extern IntPtr IntGetDC(HandleRef hWnd); 42public static IntPtr GetDC(HandleRef hWnd) { 54public static extern bool IntDeleteDC(HandleRef hDC); 55public static bool DeleteDC(HandleRef hDC) { 61public static bool DeleteHDC(HandleRef hDC) { 70public static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC); 71public static int ReleaseDC(HandleRef hWnd, HandleRef hDC) { 81public static extern IntPtr IntCreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 84public static IntPtr CreateDC(String lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 95public static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 98public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 111public static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 114public static IntPtr CreateCompatibleDC(HandleRef hDC) 124public static extern int IntSaveDC(HandleRef hDC); 125public static int SaveDC(HandleRef hDC) 134public static extern bool IntRestoreDC(HandleRef hDC, int nSavedDC); 135public static bool RestoreDC(HandleRef hDC, int nSavedDC) 147public static extern IntPtr WindowFromDC(HandleRef hDC); 151public static extern int GetDeviceCaps(HandleRef hDC, int nIndex); 155public static extern bool IntOffsetViewportOrgEx(HandleRef hDC, int nXOffset, int nYOffset, [In, Out] IntNativeMethods.POINT point); 156public static bool OffsetViewportOrgEx(HandleRef hDC, int nXOffset, int nYOffset, [In, Out] IntNativeMethods.POINT point) 165public static extern int IntSetGraphicsMode(HandleRef hDC, int iMode); 166public static int SetGraphicsMode(HandleRef hDC, int iMode) 175public static extern int GetGraphicsMode(HandleRef hDC); 179public static extern int GetROP2(HandleRef hdc); 183public static extern int SetROP2(HandleRef hDC, int nDrawMode); 189public static extern IntNativeMethods.RegionFlags IntCombineRgn(HandleRef hRgnDest, HandleRef hRgnSrc1, HandleRef hRgnSrc2, RegionCombineMode combineMode); 190public static IntNativeMethods.RegionFlags CombineRgn(HandleRef hRgnDest, HandleRef hRgnSrc1, HandleRef hRgnSrc2, RegionCombineMode combineMode) { 205public static extern int IntGetClipRgn(HandleRef hDC, HandleRef hRgn); 206public static int GetClipRgn(HandleRef hDC, HandleRef hRgn) { 214public static extern IntNativeMethods.RegionFlags IntSelectClipRgn(HandleRef hDC, HandleRef hRgn); 215public static IntNativeMethods.RegionFlags SelectClipRgn(HandleRef hDC, HandleRef hRgn) 224public static extern IntNativeMethods.RegionFlags IntGetRgnBox(HandleRef hRgn, [In, Out] ref IntNativeMethods.RECT clipRect); 225public static IntNativeMethods.RegionFlags GetRgnBox(HandleRef hRgn, [In, Out] ref IntNativeMethods.RECT clipRect) 250public static extern bool IntDeleteObject(HandleRef hObject); 251public static bool DeleteObject(HandleRef hObject) 261public static extern int IntGetObject(HandleRef hBrush, int nSize, [In, Out] IntNativeMethods.LOGBRUSH lb); 262public static int GetObject(HandleRef hBrush, IntNativeMethods.LOGBRUSH lb) 272public static extern int IntGetObject(HandleRef hFont, int nSize, [In, Out] IntNativeMethods.LOGFONT lf); 273public static int GetObject(HandleRef hFont, IntNativeMethods.LOGFONT lp) 282public static extern IntPtr IntSelectObject(HandleRef hdc, HandleRef obj); 285public static IntPtr SelectObject(HandleRef hdc, HandleRef obj) 294public static extern IntPtr IntGetCurrentObject(HandleRef hDC, int uObjectType); 297public static IntPtr GetCurrentObject(HandleRef hDC, int uObjectType) 322public static extern int GetNearestColor(HandleRef hDC, int color); 326public static extern int /*COLORREF*/ SetTextColor(HandleRef hDC, int crColor); 330public static extern int GetTextAlign(HandleRef hdc); 334public static extern int /*COLORREF*/ GetTextColor(HandleRef hDC); 338public static extern int SetBkColor(HandleRef hDC, int clr); 342public static extern int IntSetBkMode(HandleRef hDC, int nBkMode); 343public static int SetBkMode(HandleRef hDC, int nBkMode) 352public static extern int IntGetBkMode(HandleRef hDC); 353public static int GetBkMode(HandleRef hDC) 362public static extern int GetBkColor(HandleRef hDC); 367public static extern int DrawTextW(HandleRef hDC, string lpszString, int nCount, ref IntNativeMethods.RECT lpRect, int nFormat); 371public static extern int DrawTextA(HandleRef hDC, byte[] lpszString, int byteCount, ref IntNativeMethods.RECT lpRect, int nFormat); 373public static int DrawText( HandleRef hDC, string text, ref IntNativeMethods.RECT lpRect, int nFormat ) 406public static extern int DrawTextExW(HandleRef hDC, string lpszString, int nCount, ref IntNativeMethods.RECT lpRect, int nFormat, [In, Out] IntNativeMethods.DRAWTEXTPARAMS lpDTParams); 410public static extern int DrawTextExA(HandleRef hDC, byte[] lpszString, int byteCount, ref IntNativeMethods.RECT lpRect, int nFormat, [In, Out] IntNativeMethods.DRAWTEXTPARAMS lpDTParams); 412public static int DrawTextEx(HandleRef hDC, string text, ref IntNativeMethods.RECT lpRect, int nFormat, [In, Out] IntNativeMethods.DRAWTEXTPARAMS lpDTParams) 446public static extern int GetTextExtentPoint32W(HandleRef hDC, string text, int len, [In, Out] IntNativeMethods.SIZE size); 451public static extern int GetTextExtentPoint32A(HandleRef hDC, byte[] lpszString, int byteCount, [In, Out] IntNativeMethods.SIZE size); 453public static int GetTextExtentPoint32(HandleRef hDC, string text, [In, Out] IntNativeMethods.SIZE size) 484internal static extern bool ExtTextOut(HandleRef hdc, int x, int y, int options, ref IntNativeMethods.RECT rect, string str, int length, int[] spacing); 488public static extern bool IntLineTo(HandleRef hdc, int x, int y); 489public static bool LineTo(HandleRef hdc, int x, int y) 498public static extern bool IntMoveToEx(HandleRef hdc, int x, int y, IntNativeMethods.POINT pt); 499public static bool MoveToEx(HandleRef hdc, int x, int y, IntNativeMethods.POINT pt) 508public static extern bool IntRectangle(HandleRef hdc, int left, int top, int right, int bottom); 509public static bool Rectangle(HandleRef hdc, int left, int top, int right, int bottom) 518public static extern bool IntFillRect(HandleRef hdc, [In] ref IntNativeMethods.RECT rect, HandleRef hbrush); 519public static bool FillRect(HandleRef hDC, [In] ref IntNativeMethods.RECT rect, HandleRef hbrush) 528public static extern int IntSetMapMode(HandleRef hDC, int nMapMode); 529public static int SetMapMode(HandleRef hDC, int nMapMode) 538public static extern int IntGetMapMode(HandleRef hDC); 539public static int GetMapMode(HandleRef hDC) 548public static extern bool IntGetViewportExtEx(HandleRef hdc, [In, Out] IntNativeMethods.SIZE lpSize); 549public static bool GetViewportExtEx( HandleRef hdc, [In, Out] IntNativeMethods.SIZE lpSize ) 558public static extern bool IntGetViewportOrgEx(HandleRef hdc, [In, Out] IntNativeMethods.POINT lpPoint); 559public static bool GetViewportOrgEx( HandleRef hdc, [In, Out] IntNativeMethods.POINT lpPoint ) 568public static extern bool IntSetViewportExtEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.SIZE size); 569public static bool SetViewportExtEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.SIZE size) 577public static extern bool IntSetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.POINT point); 578public static bool SetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out] IntNativeMethods.POINT point) 589public static extern int GetTextMetricsW(HandleRef hDC, [In, Out] ref IntNativeMethods.TEXTMETRIC lptm); 593public static extern int GetTextMetricsA(HandleRef hDC, [In, Out] ref IntNativeMethods.TEXTMETRICA lptm); 595public static int GetTextMetrics(HandleRef hDC, ref IntNativeMethods.TEXTMETRIC lptm) 638public static extern bool IntBeginPath(HandleRef hDC); 639public static bool BeginPath(HandleRef hDC) 648public static extern bool IntEndPath(HandleRef hDC); 649public static bool EndPath(HandleRef hDC) 658public static extern bool IntStrokePath(HandleRef hDC); 659public static bool StrokePath(HandleRef hDC) 668public static extern bool IntAngleArc(HandleRef hDC, int x, int y, int radius, float startAngle, float endAngle); 669public static bool AngleArc(HandleRef hDC, int x, int y, int radius, float startAngle, float endAngle) 679HandleRef hDC, 690HandleRef hDC, 710public static extern int SetTextAlign(HandleRef hDC, int nMode); 714public static extern bool IntEllipse(HandleRef hDc, int x1, int y1, int x2, int y2); 715public static bool Ellipse(HandleRef hDc, int x1, int y1, int x2, int y2)
misc\GDI\WindowsGraphics2.cs (11)
78HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 108HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 211HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 298HandleRef hdc = new HandleRef(null, this.dc.Hdc); 385HandleRef hdc = new HandleRef(null, this.dc.Hdc); 487HandleRef hdc = new HandleRef(null, this.dc.Hdc); 538public static Rectangle AdjustForVerticalAlignment(HandleRef hdc, string text, Rectangle bounds, IntTextFormatFlags flags, IntNativeMethods.DRAWTEXTPARAMS dtparams) 588HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 626HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 658HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 703HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc );
winforms\Managed\System\WinForms\Application.cs (6)
1241private static ThreadContext GetContextForHandle(HandleRef handle) { 1307internal static void ParkHandle(HandleRef handle, DpiAwarenessContext dpiAwarenessContext = DpiAwarenessContext.DPI_AWARENESS_CONTEXT_UNSPECIFIED) { 1354internal static void UnparkHandle(HandleRef handle, DpiAwarenessContext context) { 3405HandleRef hwndOwner = new HandleRef(null, IntPtr.Zero); 4182internal void ParkHandle(HandleRef handle) { 4194internal void UnparkHandle(HandleRef handle) {
winforms\Managed\System\WinForms\ComboBox.cs (2)
5875HandleRef hRef = new HandleRef(null, hWnd); 5885static string GetClassName(HandleRef hRef) {
winforms\Managed\System\WinForms\ContainerControl.cs (3)
744HandleRef hdc = new HandleRef(this, dc); 754HandleRef hfont = new HandleRef(this, FontHandle); 755HandleRef hfontOld = new HandleRef(this, SafeNativeMethods.SelectObject(hdc, hfont));
winforms\Managed\System\WinForms\Control.cs (15)
3085HandleRef hwnd; 10337private void PrintToMetaFile(HandleRef hDC, IntPtr lParam) { 10352HandleRef hClippingRegion = new HandleRef(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x,viewportOrg.y, viewportOrg.x + this.Width, viewportOrg.y + this.Height)); 10370internal virtual void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) { 10401private void PrintToMetaFile_SendPrintMessage(HandleRef hDC, IntPtr lParam) { 10970HandleRef parentHandle = new HandleRef(this, UnsafeNativeMethods.GetParent(new HandleRef(this, this.Handle))); 19228HandleRef hBitmapDC = NativeMethods.NullHandleRef; 19229HandleRef hBitmap = NativeMethods.NullHandleRef; 19230HandleRef hOriginalBmp = NativeMethods.NullHandleRef; 19231HandleRef hMetafileDC = NativeMethods.NullHandleRef; 19237internal MetafileDCWrapper(HandleRef hOriginalDC, Size size) { 19293private unsafe bool DICopy(HandleRef hdcDest, HandleRef hdcSrc, NativeMethods.RECT rect, bool bStretch) { 19300HandleRef hNullBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(1, 1, 1, 1, IntPtr.Zero)); 19304HandleRef hBitmap = new HandleRef(this, SafeNativeMethods.SelectObject(hdcSrc, hNullBitmap));
winforms\Managed\System\WinForms\ControlPaint.cs (2)
358HandleRef targetHDC = new HandleRef( null, targetDC.GetHdc()); 359HandleRef screenHDC = new HandleRef( null, dc.Hdc );
winforms\Managed\System\WinForms\Form.cs (9)
2509private HandleRef TaskbarOwner { 2576HandleRef key = value ? NativeMethods.HWND_TOPMOST : NativeMethods.HWND_NOTOPMOST; 6429HandleRef ownerHwnd = NativeMethods.NullHandleRef; 7745private List<HandleRef> ownedWindows; 7754HandleRef hRef = new HandleRef(null, hWnd); 7762this.ownedWindows = new List<HandleRef>(); 7774foreach (HandleRef hRef in this.ownedWindows) 7782internal void SetOwners(HandleRef hRefOwner) 7786foreach (HandleRef hRef in this.ownedWindows)
winforms\Managed\System\WinForms\Help.cs (2)
222HandleRef handle; 313HandleRef handle;
winforms\Managed\System\WinForms\Label.cs (1)
1619internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) {
winforms\Managed\System\WinForms\MaskedTextBox.cs (1)
1201HandleRef handle = new HandleRef(this, this.Handle);
winforms\Managed\System\WinForms\NativeMethods.cs (7)
62public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 667public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 669public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 671public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 673public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2)); 675public static HandleRef HWND_MESSAGE = new HandleRef(null, new IntPtr(-3)); 2985HandleRef hwndBldrOwner,
winforms\Managed\System\WinForms\NativeWindow.cs (2)
1085HandleRef href = new HandleRef(b, b.handle); 1361HandleRef href = new HandleRef(this, handle);
winforms\Managed\System\WinForms\Panel.cs (1)
291internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) {
winforms\Managed\System\WinForms\SafeNativeMethods.cs (190)
27public static extern int SHAutoComplete(HandleRef hwndEdit, int flags); 50public static extern int GetSystemPaletteEntries(HandleRef hdc, int iStartIndex, int nEntries, byte[] lppe); 53public static extern int GetDIBits(HandleRef hdc, HandleRef hbm, int uStartScan, int cScanLines, byte[] lpvBits, ref NativeMethods.BITMAPINFO_FLAT bmi, int uUsage); 56public static extern int StretchDIBits(HandleRef hdc, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight, byte[] lpBits, ref NativeMethods.BITMAPINFO_FLAT lpBitsInfo, int iUsage, int dwRop); 60public static extern IntPtr IntCreateCompatibleBitmap(HandleRef hDC, int width, int height); 63public static IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height) { 69public static extern bool GetScrollInfo(HandleRef hWnd, int fnBar, [In, Out] NativeMethods.SCROLLINFO si); 73public static extern bool IsAccelerator(HandleRef hAccel, int cAccelEntries, [In] ref NativeMethods.MSG lpMsg, short[] lpwCmd); 79public static extern int GetBitmapBits(HandleRef hbmp, int cbBuffer, byte[] lpvBits); 85public static extern void SysFreeString(HandleRef bstr); 89public static extern void OleCreatePropertyFrame(HandleRef hwndOwner, int x, int y, [MarshalAs(UnmanagedType.LPWStr)]string caption, int objects, [MarshalAs(UnmanagedType.Interface)] ref object pobjs, int pages, HandleRef pClsid, int locale, int reserved1, IntPtr reserved2); 92public static extern void OleCreatePropertyFrame(HandleRef hwndOwner, int x, int y, [MarshalAs(UnmanagedType.LPWStr)]string caption, int objects, [MarshalAs(UnmanagedType.Interface)] ref object pobjs, int pages, Guid[] pClsid, int locale, int reserved1, IntPtr reserved2); 95public static extern void OleCreatePropertyFrame(HandleRef hwndOwner, int x, int y, [MarshalAs(UnmanagedType.LPWStr)]string caption, int objects, HandleRef lplpobjs, int pages, HandleRef pClsid, int locale, int reserved1, IntPtr reserved2); 98public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, int dwData); 101public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, string dwData); 104public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, [MarshalAs(UnmanagedType.LPStruct)]NativeMethods.HH_POPUP dwData); 107public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, [MarshalAs(UnmanagedType.LPStruct)]NativeMethods.HH_FTS_QUERY dwData); 110public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, [MarshalAs(UnmanagedType.LPStruct)]NativeMethods.HH_AKLINK dwData); 113public static extern void VariantInit(HandleRef pObject); 116public static extern void VariantClear(HandleRef pObject); 120public static extern bool LineTo(HandleRef hdc, int x, int y); 124public static extern bool MoveToEx(HandleRef hdc, int x, int y, NativeMethods.POINT pt); 129HandleRef hdc, int left, int top, int right, int bottom); 133public static extern bool PatBlt(HandleRef hdc, int left, int top, int width, int height, int rop); 160public static extern bool ExternalDeleteObject(HandleRef hObject); 163internal static extern bool IntDeleteObject(HandleRef hObject); 164public static bool DeleteObject(HandleRef hObject) { 183public static extern bool SetWindowExtEx(HandleRef hDC, int x, int y, [In, Out] NativeMethods.SIZE size); 187public static extern int FormatMessage(int dwFlags, HandleRef lpSource, int dwMessageId, 188int dwLanguageId, StringBuilder lpBuffer, int nSize, HandleRef arguments); 234public static extern bool ImageList_Destroy(HandleRef himl); 241public static extern bool ImageList_Destroy_Native(HandleRef himl); 245public static extern int ImageList_GetImageCount(HandleRef himl); 248public static extern int ImageList_Add(HandleRef himl, HandleRef hbmImage, HandleRef hbmMask); 251public static extern int ImageList_ReplaceIcon(HandleRef himl, int index, HandleRef hicon); 254public static extern int ImageList_SetBkColor(HandleRef himl, int clrBk); 257public static extern bool ImageList_Draw(HandleRef himl, int i, HandleRef hdcDst, int x, int y, int fStyle); 260public static extern bool ImageList_Replace(HandleRef himl, int i, HandleRef hbmImage, HandleRef hbmMask); 263public static extern bool ImageList_DrawEx(HandleRef himl, int i, HandleRef hdcDst, int x, int y, int dx, int dy, int rgbBk, int rgbFg, int fStyle); 266public static extern bool ImageList_GetIconSize(HandleRef himl, out int x, out int y); 282public static extern IntPtr ImageList_Duplicate(HandleRef himl); 287public static extern bool ImageList_Remove(HandleRef himl, int i); 290public static extern bool ImageList_GetImageInfo(HandleRef himl, int i, NativeMethods.IMAGEINFO pImageInfo); 309public static extern bool ImageList_Write(HandleRef himl, UnsafeNativeMethods.IStream pstm); 312public static extern int ImageList_WriteEx(HandleRef himl, int dwFlags, UnsafeNativeMethods.IStream pstm); 315public static extern bool TrackPopupMenuEx(HandleRef hmenu, int fuFlags, int x, int y, HandleRef hwnd, NativeMethods.TPMPARAMS tpm); 321public static extern IntPtr ActivateKeyboardLayout(HandleRef hkl, int uFlags); 333public static extern bool GetMonitorInfo(HandleRef hmonitor, [In, Out]NativeMethods.MONITORINFOEX info); 342public static extern IntPtr MonitorFromWindow(HandleRef handle, int flags); 345public static extern bool EnumDisplayMonitors(HandleRef hdc, NativeMethods.COMRECT rcClip, NativeMethods.MonitorEnumProc lpfnEnum, IntPtr dwData); 348private static extern IntPtr /*HPALETTE*/ IntCreateHalftonePalette(HandleRef hdc); 349public static IntPtr /*HPALETTE*/ CreateHalftonePalette(HandleRef hdc) { 354public static extern int GetPaletteEntries(HandleRef hpal, int iStartIndex, int nEntries, int[] lppe); 358public static extern int GetTextMetricsW(HandleRef hDC, [In, Out] ref NativeMethods.TEXTMETRIC lptm); 361public static extern int GetTextMetricsA(HandleRef hDC, [In, Out] ref NativeMethods.TEXTMETRICA lptm); 363public static int GetTextMetrics(HandleRef hDC, ref NativeMethods.TEXTMETRIC lptm) { 402private static extern IntPtr IntCreateDIBSection(HandleRef hdc, HandleRef pbmi, int iUsage, byte[] ppvBits, IntPtr hSection, int dwOffset); 405public static IntPtr CreateDIBSection(HandleRef hdc, HandleRef pbmi, int iUsage, byte[] ppvBits, IntPtr hSection, int dwOffset) { 437private static extern IntPtr /*HBRUSH*/ IntCreatePatternBrush(HandleRef hbmp); 440public static IntPtr /*HBRUSH*/ CreatePatternBrush(HandleRef hbmp) { 463public static extern bool SetViewportExtEx(HandleRef hDC, int x, int y, NativeMethods.SIZE size); 466public static extern IntPtr LoadCursor(HandleRef hInst, int iconId); 475public static extern bool GetIconInfo(HandleRef hIcon, [In, Out] NativeMethods.ICONINFO info); 479public static extern int IntersectClipRect(HandleRef hDC, int x1, int y1, int x2, int y2); 482private static extern IntPtr IntCopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags); 483public static IntPtr CopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags) { 486public static IntPtr CopyImageAsCursor(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags) { 508public static extern bool EnableWindow(HandleRef hWnd, bool enable); 511public static extern bool GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 517public static extern int GetUpdateRgn(HandleRef hwnd, HandleRef hrgn, bool fErase); 520public static extern bool ValidateRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 537public static extern int FillRect(HandleRef hdc, [In] ref NativeMethods.RECT rect, HandleRef hbrush); 541 public static extern int /*COLORREF*/ GetTextColor(HandleRef hDC); 546public static extern int GetBkColor(HandleRef hDC); 550public static extern int /*COLORREF*/ SetTextColor(HandleRef hDC, int crColor); 553public static extern int SetBkColor(HandleRef hDC, int clr); 556public static extern IntPtr /* HPALETTE */SelectPalette(HandleRef hdc, HandleRef hpal, int bForceBackground); 559public static extern bool SetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out] NativeMethods.POINT point); 571public static extern int CombineRgn(HandleRef hRgn, HandleRef hRgn1, HandleRef hRgn2, int nCombineMode); 574public static extern int RealizePalette(HandleRef hDC); 578public static extern bool LPtoDP(HandleRef hDC, [In, Out] ref NativeMethods.RECT lpRect, int nCount); 581public static extern bool SetWindowOrgEx(HandleRef hDC, int x, int y, [In, Out] NativeMethods.POINT point); 584public static extern bool GetViewportOrgEx(HandleRef hDC, [In, Out] NativeMethods.POINT point); 587public static extern int SetMapMode(HandleRef hDC, int nMapMode); 591public static extern bool IsWindowEnabled(HandleRef hWnd); 594public static extern bool IsWindowVisible(HandleRef hWnd); 609public static extern int GetWindowThreadProcessId(HandleRef hWnd, out int lpdwProcessId); 613public static extern bool GetExitCodeThread(HandleRef hWnd, out int lpdwExitCode); 616public static extern bool ShowWindow(HandleRef hWnd, int nCmdShow); 619public static extern bool SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, 624public static extern int GetWindowTextLength(HandleRef hWnd); 635public static extern bool RedrawWindow(HandleRef hwnd, ref NativeMethods.RECT rcUpdate, HandleRef hrgnUpdate, int flags); 638public static extern bool RedrawWindow(HandleRef hwnd, NativeMethods.COMRECT rcUpdate, HandleRef hrgnUpdate, int flags); 641public static extern bool InvalidateRect(HandleRef hWnd, ref NativeMethods.RECT rect, bool erase); 644public static extern bool InvalidateRect(HandleRef hWnd, NativeMethods.COMRECT rect, bool erase); 647public static extern bool InvalidateRgn(HandleRef hWnd, HandleRef hrgn, bool erase); 650public static extern bool UpdateWindow(HandleRef hWnd); 656public static extern int ScrollWindowEx(HandleRef hWnd, int nXAmount, int nYAmount, NativeMethods.COMRECT rectScrollRegion, ref NativeMethods.RECT rectClip, HandleRef hrgnUpdate, ref NativeMethods.RECT prcUpdate, int flags); 665public static extern bool DrawMenuBar(HandleRef hWnd); 668public extern static bool IsChild(HandleRef parent, HandleRef child); 671public static extern IntPtr SetTimer(HandleRef hWnd, int nIDEvent, int uElapse, IntPtr lpTimerFunc); 674public static extern bool KillTimer(HandleRef hwnd, int idEvent); 678public static extern int MessageBox(HandleRef hWnd, string text, string caption, int type); 681public static extern IntPtr SelectObject(HandleRef hDC, HandleRef hObject); 687public static extern bool ScrollWindow(HandleRef hWnd, int nXAmount, int nYAmount, ref NativeMethods.RECT rectScrollRegion, ref NativeMethods.RECT rectClip); 702public static extern bool IsWindowUnicode(HandleRef hWnd); 705public static extern bool DrawEdge(HandleRef hDC, ref NativeMethods.RECT rect, int edge, int flags); 708public static extern bool DrawFrameControl(HandleRef hDC, ref NativeMethods.RECT rect, int type, int state); 711public static extern int GetClipRgn(HandleRef hDC, HandleRef hRgn); 714public static extern int GetRgnBox(HandleRef hRegion, ref NativeMethods.RECT clipRect); 717public static extern int SelectClipRgn(HandleRef hDC, HandleRef hRgn); 721public static extern int SetROP2(HandleRef hDC, int nDrawMode); 724public static extern bool DrawIcon(HandleRef hDC, int x, int y, HandleRef hIcon); 727public static extern bool DrawIconEx(HandleRef hDC, int x, int y, HandleRef hIcon, int width, int height, int iStepIfAniCursor, HandleRef hBrushFlickerFree, int diFlags); 730public static extern int SetBkMode(HandleRef hDC, int nBkMode); 734public static extern bool BitBlt(HandleRef hDC, int x, int y, int nWidth, int nHeight, 735HandleRef hSrcDC, int xSrc, int ySrc, int dwRop); 739public static extern bool ShowCaret(HandleRef hWnd); 742public static extern bool HideCaret(HandleRef hWnd); 760public static extern IntPtr OpenThemeData(HandleRef hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszClassList); 763public static extern int CloseThemeData(HandleRef hTheme); 769public static extern bool IsThemePartDefined(HandleRef hTheme, int iPartId, int iStateId); 772public static extern int DrawThemeBackground(HandleRef hTheme, HandleRef hdc, int partId, int stateId, [In] NativeMethods.COMRECT pRect, [In] NativeMethods.COMRECT pClipRect); 775public static extern int DrawThemeEdge(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pDestRect, int uEdge, int uFlags, [Out] NativeMethods.COMRECT pContentRect); 778public static extern int DrawThemeParentBackground(HandleRef hwnd, HandleRef hdc, [In] NativeMethods.COMRECT prc); 781public static extern int DrawThemeText(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [MarshalAs(UnmanagedType.LPWStr)] string pszText, int iCharCount, int dwTextFlags, int dwTextFlags2, [In] NativeMethods.COMRECT pRect); 784public static extern int GetThemeBackgroundContentRect(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pBoundingRect, [Out] NativeMethods.COMRECT pContentRect); 787public static extern int GetThemeBackgroundExtent(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pContentRect, [Out] NativeMethods.COMRECT pExtentRect); 790public static extern int GetThemeBackgroundRegion(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pRect, ref IntPtr pRegion); 793public static extern int GetThemeBool(HandleRef hTheme, int iPartId, int iStateId, int iPropId, ref bool pfVal); 796public static extern int GetThemeColor(HandleRef hTheme, int iPartId, int iStateId, int iPropId, ref int pColor); 799public static extern int GetThemeEnumValue(HandleRef hTheme, int iPartId, int iStateId, int iPropId, ref int piVal); 802public static extern int GetThemeFilename(HandleRef hTheme, int iPartId, int iStateId, int iPropId, StringBuilder pszThemeFilename, int cchMaxBuffChars); 805public static extern int GetThemeFont(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, int iPropId, NativeMethods.LOGFONT pFont); 808public static extern int GetThemeInt(HandleRef hTheme, int iPartId, int iStateId, int iPropId, ref int piVal); 811public static extern int GetThemePartSize(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT prc, System.Windows.Forms.VisualStyles.ThemeSizeType eSize, [Out] NativeMethods.SIZE psz); 814public static extern int GetThemePosition(HandleRef hTheme, int iPartId, int iStateId, int iPropId, [Out] NativeMethods.POINT pPoint); 817public static extern int GetThemeMargins(HandleRef hTheme, HandleRef hDC, int iPartId, int iStateId, int iPropId, ref NativeMethods.MARGINS margins); 820public static extern int GetThemeString(HandleRef hTheme, int iPartId, int iStateId, int iPropId, StringBuilder pszBuff, int cchMaxBuffChars); 826public static extern int GetThemeTextExtent(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [MarshalAs(UnmanagedType.LPWStr)] string pszText, int iCharCount, int dwTextFlags, [In] NativeMethods.COMRECT pBoundingRect, [Out] NativeMethods.COMRECT pExtentRect); 829public static extern int GetThemeTextMetrics(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, ref System.Windows.Forms.VisualStyles.TextMetrics ptm); 832 public static extern int HitTestThemeBackground(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, int dwOptions, [In] NativeMethods.COMRECT pRect, HandleRef hrgn, [In] NativeMethods.POINTSTRUCT ptTest, ref int pwHitTestCode); 835public static extern bool IsThemeBackgroundPartiallyTransparent(HandleRef hTheme, int iPartId, int iStateId); 838public static extern bool GetThemeSysBool(HandleRef hTheme, int iBoolId); 841public static extern int GetThemeSysInt(HandleRef hTheme, int iIntId, ref int piValue);
winforms\Managed\System\WinForms\StatusStrip.cs (2)
194HandleRef rootHwnd = WindowsFormsUtils.GetRootHWnd(this); 563HandleRef rootHwnd = WindowsFormsUtils.GetRootHWnd(this);
winforms\Managed\System\WinForms\StringSource.cs (1)
66public bool Bind(HandleRef edit, int options) {
winforms\Managed\System\WinForms\ToolStrip.cs (13)
2838internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) { 3673HandleRef toolStripHDC = new HandleRef(this, toolStripWindowsGraphics.GetHdc()); 3674HandleRef itemHDC = ItemHdcInfo.GetCachedItemDC(toolStripHDC, bitmapSize); 4530HandleRef thisHandle = new HandleRef(this, this.Handle); 4531HandleRef otherHandle = new HandleRef(null, otherHwnd); 4539HandleRef thisHwndRoot = WindowsFormsUtils.GetRootHWnd(this); 4540HandleRef otherHwndRoot = WindowsFormsUtils.GetRootHWnd(otherHandle); 4731HandleRef rootHwnd = WindowsFormsUtils.GetRootHWnd(this); 5166HandleRef rootHwnd = WindowsFormsUtils.GetRootHWnd(ownerToolStrip); 5218private HandleRef cachedItemHDC = NativeMethods.NullHandleRef; 5220private HandleRef cachedItemBitmap = NativeMethods.NullHandleRef; 5224public HandleRef GetCachedItemDC(HandleRef toolStripHDC, Size bitmapSize) {
winforms\Managed\System\WinForms\ToolStripDropDown.cs (3)
1102HandleRef topMostFlag = (topMost) ? NativeMethods.HWND_TOPMOST : NativeMethods.HWND_NOTOPMOST; 1679HandleRef ownerHandle = new HandleRef(ownerWindow, ownerWindow.Handle); 2231HandleRef activeHwndHandleRef = ToolStripManager.ModalMenuFilter.ActiveHwnd;
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (1)
280HandleRef menuHandle = new HandleRef(null, hmenu);
winforms\Managed\System\WinForms\ToolStripManager.cs (11)
733private HandleRef _activeHwnd = NativeMethods.NullHandleRef; // the window that was active when we showed the dropdown 734private HandleRef _lastActiveWindow = NativeMethods.NullHandleRef; // the window that was last known to be active 768internal static HandleRef ActiveHwnd { 785private HandleRef ActiveHwndInternal { 1202private static bool IsChildOrSameWindow(HandleRef hwndParent, HandleRef hwndChild) { 1246HandleRef hwndActiveToolStrip = new HandleRef(activeToolStrip, activeToolStrip.Handle); 1247HandleRef hwndCurrentActiveWindow = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()); 1641HandleRef rootWindowOfToolStrip = WindowsFormsUtils.GetRootHWnd(topMostToolStrip); 1642HandleRef rootWindowOfControl = WindowsFormsUtils.GetRootHWnd(activeControl); 1745HandleRef topmostParentOfMenu = WindowsFormsUtils.GetRootHWnd(menuStripToActivate);
winforms\Managed\System\WinForms\ToolStripTextBox.cs (4)
721HandleRef hNonClientRegion = NativeMethods.NullHandleRef; 722HandleRef hClientRegion = NativeMethods.NullHandleRef; 723HandleRef hTotalRegion = NativeMethods.NullHandleRef; 852HandleRef hdc = new HandleRef(this, UnsafeNativeMethods.GetWindowDC(new HandleRef(this,m.HWnd)));
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (260)
182public static extern int ReadClassStg(HandleRef pStg, [In, Out] ref Guid pclsid); 189public static extern int GetClassName(HandleRef hwnd, StringBuilder lpClassName, int nMaxCount); 195public static IntPtr SetClassLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 206public static extern IntPtr SetClassLongPtr32(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 210public static extern IntPtr SetClassLongPtr64(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 362public static extern int VarFormat(ref object pvarIn, HandleRef pstrFormat, int iFirstDay, int iFirstWeek, uint dwFlags, [In, Out]ref IntPtr pbstr); 365public static extern int DragQueryFile(HandleRef hDrop, int iFile, StringBuilder lpszFile, int cch); 367public static int DragQueryFileLongPath(HandleRef hDrop, int iFile, StringBuilder lpszFile) 401public static extern bool EnumChildWindows(HandleRef hwndParent, NativeMethods.EnumChildrenCallback lpEnumFunc, HandleRef lParam); 404public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 407public static extern IntPtr ShellExecute_NoBFM(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 410public static extern int SetScrollPos(HandleRef hWnd, int nBar, int nPos, bool bRedraw); 413public static extern bool EnableScrollBar(HandleRef hWnd, int nBar, int value); 420public extern static bool InsertMenuItem(HandleRef hMenu, int uItem, bool fByPosition, NativeMethods.MENUITEMINFO_T lpmii); 423public static extern IntPtr GetMenu(HandleRef hWnd); 426public static extern bool GetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, [In, Out] NativeMethods.MENUITEMINFO_T lpmii); 429public static extern bool GetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, [In, Out] NativeMethods.MENUITEMINFO_T_RW lpmii); 432public extern static bool SetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, NativeMethods.MENUITEMINFO_T lpmii); 448public static extern bool EndDialog(HandleRef hWnd, IntPtr result); 460public static extern void CopyMemory(HandleRef destData, HandleRef srcData, int size); 482private static extern IntPtr IntDuplicateHandle(HandleRef processSource, HandleRef handleSource, HandleRef processTarget, ref IntPtr handleTarget, int desiredAccess, bool inheritHandle, int options); 485public static IntPtr DuplicateHandle(HandleRef processSource, HandleRef handleSource, HandleRef processTarget, ref IntPtr handleTarget, int desiredAccess, bool inheritHandle, int options) { 500public static extern IntPtr SetWindowsHookEx(int hookid, NativeMethods.HookProc pfnhook, HandleRef hinst, int threadid); 512public static extern bool UnhookWindowsHookEx(HandleRef hhook); 518public static extern IntPtr CallNextHookEx(HandleRef hhook, int code, IntPtr wparam, IntPtr lparam); 521public static extern int ScreenToClient( HandleRef hWnd, [In, Out] NativeMethods.POINT pt ); 524public static extern int GetModuleFileName(HandleRef hModule, StringBuilder buffer, int length); 525public static StringBuilder GetModuleFileNameLongPath(HandleRef hModule) 545public static extern bool IsDialogMessage(HandleRef hWndDlg, [In, Out] ref NativeMethods.MSG msg); 563public static extern int CoRegisterMessageFilter(HandleRef newFilter, ref IntPtr oldMsgFilter); 573public extern static bool EnumThreadWindows(int dwThreadId, NativeMethods.EnumThreadWindowsCallback lpfn, HandleRef lParam); 579public extern static IntPtr SendDlgItemMessage(HandleRef hDlg, int nIDDlgItem, int Msg, IntPtr wParam, IntPtr lParam); 588private static extern IntPtr _ChildWindowFromPointEx(HandleRef hwndParent, POINTSTRUCT pt, int uFlags); 589public static IntPtr ChildWindowFromPointEx(HandleRef hwndParent, int x, int y, int uFlags) { 595private static extern bool IntCloseHandle(HandleRef handle); 596public static bool CloseHandle(HandleRef handle) { 603private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 606public static IntPtr CreateCompatibleDC(HandleRef hDC) { 640private static extern IntPtr IntMapViewOfFile(HandleRef hFileMapping, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap); 643public static IntPtr MapViewOfFile(HandleRef hFileMapping, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap) { 649private static extern bool IntUnmapViewOfFile(HandleRef pvBaseAddress); 650public static bool UnmapViewOfFile(HandleRef pvBaseAddress) { 657private static extern IntPtr IntGetDCEx(HandleRef hWnd, HandleRef hrgnClip, int flags); 660public static IntPtr GetDCEx(HandleRef hWnd, HandleRef hrgnClip, int flags) { 667public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.BITMAP bm); 671public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGPEN lp); 672public static int GetObject(HandleRef hObject, NativeMethods.LOGPEN lp) { 678public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGBRUSH lb); 679public static int GetObject(HandleRef hObject, NativeMethods.LOGBRUSH lb) { 685public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGFONT lf); 686public static int GetObject(HandleRef hObject, NativeMethods.LOGFONT lp) { 693public static extern int GetObject(HandleRef hObject, int nSize, ref int nEntries); 696public static extern int GetObject(HandleRef hObject, int nSize, int[] nEntries); 699public static extern int GetObjectType(HandleRef hObject); 703private static extern IntPtr IntCreateAcceleratorTable(/*ACCEL*/ HandleRef pentries, int cCount); 706public static IntPtr CreateAcceleratorTable(/*ACCEL*/ HandleRef pentries, int cCount) { 711private static extern bool IntDestroyAcceleratorTable(HandleRef hAccel); 712public static bool DestroyAcceleratorTable(HandleRef hAccel) { 725public static extern IntPtr SetCapture(HandleRef hwnd); 741private static extern int IntSetWindowRgn(HandleRef hwnd, HandleRef hrgn, bool fRedraw); 742public static int SetWindowRgn(HandleRef hwnd, HandleRef hrgn, bool fRedraw) { 754public static extern int GetWindowText(HandleRef hWnd, StringBuilder lpString, int nMaxCount); 763public static extern bool SetWindowText(HandleRef hWnd, string text); 771public static extern IntPtr GlobalReAlloc(HandleRef handle, int bytes, int flags); 775public static extern IntPtr GlobalLock(HandleRef handle); 779public static extern bool GlobalUnlock(HandleRef handle); 783public static extern IntPtr GlobalFree(HandleRef handle); 787public static extern int GlobalSize(HandleRef handle); 791public static extern bool ImmSetConversionStatus(HandleRef hIMC, int conversion, int sentence); 795public static extern bool ImmGetConversionStatus(HandleRef hIMC, ref int conversion, ref int sentence); 799public static extern IntPtr ImmGetContext(HandleRef hWnd); 803public static extern bool ImmReleaseContext(HandleRef hWnd, HandleRef hIMC); 807public static extern IntPtr ImmAssociateContext(HandleRef hWnd, HandleRef hIMC); 811public static extern bool ImmDestroyContext(HandleRef hIMC); 819public static extern bool ImmSetOpenStatus(HandleRef hIMC, bool open); 823public static extern bool ImmGetOpenStatus(HandleRef hIMC); 827public static extern bool ImmNotifyIME(HandleRef hIMC, int dwAction, int dwIndex, int dwValue); 831public static extern IntPtr SetFocus(HandleRef hWnd); 835public static extern IntPtr GetParent(HandleRef hWnd); 839public static extern IntPtr GetAncestor(HandleRef hWnd, int flags); 843public static extern bool IsChild(HandleRef hWndParent, HandleRef hwnd); 848public static extern bool IsZoomed(HandleRef hWnd); 856public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints); 860public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] NativeMethods.POINT pt, int cPoints); 864public static extern IntPtr SendMessage(HandleRef hWnd, int msg, bool wParam, int lParam); 868public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, int[] lParam); 872public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int[] wParam, int[] lParam); 876public static extern IntPtr SendMessage(HandleRef hWnd, int msg, ref int wParam, ref int lParam); 880public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam); 884public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, string lParam); 888public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, StringBuilder lParam); 892public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_T lParam); 896public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_TOOLTIP lParam); 900public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTON lParam); 904public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTONINFO lParam); 908public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_ITEM lParam); 912public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_INSERTSTRUCT lParam); 916public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TV_HITTESTINFO lParam); 920public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVBKIMAGE lParam); 924public static extern int SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.LVHITTESTINFO lParam); 928public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TCITEM_T lParam); 932public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.HDLAYOUT hdlayout); 938public static extern IntPtr SendMessage(HandleRef hWnd, int msg, HandleRef wParam, int lParam); 941public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, HandleRef lParam); 948public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.PARAFORMAT lParam); 951public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATA lParam); 954public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMAT2A lParam); 957public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATW lParam); 960public static extern int SendMessage(HandleRef hWnd, int msg, int wParam, [Out, MarshalAs(UnmanagedType.IUnknown)]out object editOle); 963public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.CHARRANGE lParam); 966public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.FINDTEXT lParam); 969public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TEXTRANGE lParam); 972public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.POINT lParam); 975public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, int lParam); 978public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.REPASTESPECIAL lParam); 981public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM lParam); 984public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM64 lParam); 987public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.GETTEXTLENGTHEX wParam, int lParam); 993public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.SIZE lParam); 999public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVFINDINFO lParam); 1002public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVHITTESTINFO lParam); 1005public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN_T lParam); 1008public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVITEM lParam); 1011public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN lParam); 1014public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVGROUP lParam); 1017public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, [In, Out] NativeMethods.LVINSERTMARK lParam); 1020public static extern bool SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVINSERTMARK lParam); 1023public static extern bool SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LVTILEVIEWINFO lParam); 1029public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MCHITTESTINFO lParam); 1032public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIME lParam); 1035public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIMEARRAY lParam); 1038public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LOGFONT lParam); 1041public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MSG lParam); 1044public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, int lParam); 1047public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); 1050public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, [In, Out] ref NativeMethods.RECT lParam); 1053public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, ref short wParam, ref short lParam); 1056public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, [In, Out, MarshalAs(UnmanagedType.Bool)] ref bool wParam, IntPtr lParam); 1059public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, IntPtr lParam); 1062public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref NativeMethods.RECT lParam); 1065public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref Rectangle lParam); 1068public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, NativeMethods.ListViewCompareCallback pfnCompare); 1072public static extern IntPtr SendMessageTimeout(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int timeout, out IntPtr pdwResult); 1078public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent); 1081public static extern bool GetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 1084public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 1087public static extern IntPtr GetDlgItem(HandleRef hWnd, int nIDDlgItem); 1118public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName); 1122public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, [In, Out] NativeMethods.WNDCLASS_I wc); 1125public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, IntPtr h); 1209public static extern bool GetUserObjectInformation(HandleRef hObj, int nIndex, [MarshalAs(UnmanagedType.LPStruct)] NativeMethods.USEROBJECTFLAGS pvBuffer, int nLength, ref int lpnLengthNeeded); 1212public static extern int ClientToScreen( HandleRef hWnd, [In, Out] NativeMethods.POINT pt ); 1224public static extern int RegisterDragDrop(HandleRef hwnd, UnsafeNativeMethods.IOleDropTarget target); 1227public static extern int RevokeDragDrop(HandleRef hwnd); 1230public static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 1233public static extern bool PeekMessageW([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 1236public static extern bool PeekMessageA([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 1247public static extern bool PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam); 1253public static extern IntPtr LresultFromObject(ref Guid refiid, IntPtr wParam, HandleRef pAcc); 1256public static extern int CreateStdAccessibleObject(HandleRef hWnd, int objID, ref Guid refiid, [In, Out, MarshalAs(UnmanagedType.Interface)] ref object pAcc); 1259public static extern void NotifyWinEvent(int winEvent, HandleRef hwnd, int objType, int objID); 1262public static extern int GetMenuItemID(HandleRef hMenu, int nPos); 1265public static extern IntPtr GetSubMenu(HandleRef hwnd, int index); 1268public static extern int GetMenuItemCount(HandleRef hMenu); 1274private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 1275public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1281private static extern bool IntEndPaint(HandleRef hWnd, ref NativeMethods.PAINTSTRUCT lpPaint); 1282public static bool EndPaint(HandleRef hWnd, [In, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1289private static extern IntPtr IntGetDC(HandleRef hWnd); 1292public static IntPtr GetDC(HandleRef hWnd) { 1298private static extern IntPtr IntGetWindowDC(HandleRef hWnd); 1301public static IntPtr GetWindowDC(HandleRef hWnd) { 1307private static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC); 1308public static int ReleaseDC(HandleRef hWnd, HandleRef hDC) { 1315private static extern IntPtr IntCreateDC(string lpszDriver, string lpszDeviceName, string lpszOutput, HandleRef devMode); 1324public static IntPtr CreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) { 1335public extern static IntPtr SendCallbackMessage(HandleRef hWnd, int Msg, IntPtr wParam, IntPtr lParam); 1339public static extern void DragAcceptFiles(HandleRef hWnd, bool fAccept); 1343public static extern int GetDeviceCaps(HandleRef hDC, int nIndex); 1347public static extern bool GetScrollInfo(HandleRef hWnd, int fnBar, NativeMethods.SCROLLINFO si); 1351public static extern int SetScrollInfo(HandleRef hWnd, int fnBar, NativeMethods.SCROLLINFO si, bool redraw); 1367public static extern bool FreeLibrary(HandleRef hModule); 1373public static IntPtr GetWindowLong(HandleRef hWnd, int nIndex) 1384public static extern IntPtr GetWindowLong32(HandleRef hWnd, int nIndex); 1389public static extern IntPtr GetWindowLongPtr64(HandleRef hWnd, int nIndex); 1395public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, HandleRef dwNewLong) 1406public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 1410public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 1412public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc) 1423public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc); 1427public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc); 1431public static extern UnsafeNativeMethods.ILockBytes CreateILockBytesOnHGlobal(HandleRef hGlobal, bool fDeleteOnRelease); 1447public static extern bool RemoveMenu(HandleRef hMenu, int uPosition, int uFlags); 1451private static extern bool IntDestroyMenu(HandleRef hMenu); 1452public static bool DestroyMenu(HandleRef hMenu) { 1459public static extern bool SetForegroundWindow(HandleRef hWnd); 1463public static extern IntPtr GetSystemMenu(HandleRef hWnd, bool bRevert); 1475public static extern bool SetLayeredWindowAttributes(HandleRef hwnd, int crKey, byte bAlpha, int dwFlags); 1479public extern static bool SetMenu(HandleRef hWnd, HandleRef hMenu); 1483public static extern int GetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement); 1492public static extern bool SetMenuDefaultItem(HandleRef hwnd, int nIndex, bool pos); 1496public static extern bool EnableMenuItem(HandleRef hMenu, int UIDEnabledItem, int uEnable); 1500public static extern IntPtr SetActiveWindow(HandleRef hWnd); 1504private static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 1507public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) { 1521public static extern IntPtr SetCursor(HandleRef hcursor); 1533private static extern bool IntDestroyCursor(HandleRef hCurs); 1534public static bool DestroyCursor(HandleRef hCurs) { 1541public static extern bool IsWindow(HandleRef hWnd); 1545private static extern bool IntDeleteDC(HandleRef hDC); 1546public static bool DeleteDC(HandleRef hDC) { 1551public static bool DeleteCompatibleDC(HandleRef hDC) 1562public static extern bool GetMessageA([In, Out] ref NativeMethods.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax); 1566public static extern bool GetMessageW([In, Out] ref NativeMethods.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax); 1570public static extern IntPtr PostMessage(HandleRef hwnd, int msg, int wparam, int lparam); 1574public static extern IntPtr PostMessage(HandleRef hwnd, int msg, int wparam, IntPtr lparam); 1578public static extern bool GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 1582public static extern bool GetClientRect(HandleRef hWnd, IntPtr rect); 1596public static extern IntPtr WindowFromDC( HandleRef hDC ); 1601HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)] object pvParam); 1606HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)]object pvParam) { 1614public static extern bool IntDestroyWindow(HandleRef hWnd); 1615public static bool DestroyWindow(HandleRef hWnd) { 1621public static extern bool UnregisterClass(string className, HandleRef hInstance); 1641public static extern bool SetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement); 1646public static extern uint GetDpiForWindow(HandleRef hWnd); 1661public static extern int GetRegionData(HandleRef hRgn, int size, IntPtr lpRgnData); 6415[In] HandleRef hwndEdit, // hwnd of editbox or editbox deriviative. 6429[In] HandleRef hwndEdit, // hwnd of editbox or editbox deriviative. 8293private static extern bool CloseHandle(HandleRef handle); 8309internal static extern int UiaHostProviderFromHwnd(HandleRef hwnd, out IRawElementProviderSimple provider); 8312internal static extern IntPtr UiaReturnRawElementProvider(HandleRef hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (18)
288HandleRef hdc = new HandleRef(wgr, wgr.WindowsGraphics.DeviceContext.Hdc); 322HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 360HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 451HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 496HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 519HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 543HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 571HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 683HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 754HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 788HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 833HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 877HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 902HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 923HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 947HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 990HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc ); 1132internal static ThemeHandle Create(string className, bool throwExceptionOnFail, HandleRef hWndRef) {
winforms\Managed\System\WinForms\WinFormsUtils.cs (6)
287public static HandleRef GetRootHWnd(HandleRef hwnd) { 293public static HandleRef GetRootHWnd(Control control) { 609public DCMapping(HandleRef hDC, Rectangle bounds) { 616HandleRef hOriginalClippingRegion = NativeMethods.NullHandleRef; 630HandleRef hClippingRegion = new HandleRef(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x + bounds.Left, viewportOrg.y + bounds.Top, viewportOrg.x + bounds.Right, viewportOrg.y + bounds.Bottom));
System.Workflow.Activities (8)
Common\NativeMethods.cs (8)
269public static extern bool LineTo(HandleRef hdc, int x, int y); 272public static extern bool MoveToEx(HandleRef hdc, int x, int y, POINT pt); 275public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj); 278public static extern IntPtr GetCurrentObject(HandleRef hDC, uint uObjectType); 281public static extern int DeleteObject(HandleRef hObject); 287public static extern int SetWorldTransform(HandleRef hdc, XFORM xform); 290public static extern int SetGraphicsMode(HandleRef hdc, int iMode);
System.Workflow.ComponentModel (16)
AuthoringOM\Design\DesignerHelpers.cs (6)
905private HandleRef hdc; 906private HandleRef oldPen; 907private HandleRef oldPenEx; 908private HandleRef oldBrush; 1108private HandleRef hpen; 1139internal HandleRef Handle
Shared\NativeMethods.cs (10)
283public static extern bool LineTo(HandleRef hdc, int x, int y); 286public static extern bool MoveToEx(HandleRef hdc, int x, int y, POINT pt); 289public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj); 292public static extern IntPtr GetCurrentObject(HandleRef hDC, uint uObjectType); 295public static extern int DeleteObject(HandleRef hObject); 301public static extern int SetWorldTransform(HandleRef hdc, XFORM xform); 304public static extern int SetGraphicsMode(HandleRef hdc, int iMode); 329public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName); 338public static extern bool FreeLibrary(HandleRef hModule);
WindowsBase (227)
Base\System\Windows\SplashScreen.cs (2)
205HandleRef nullHandle = new HandleRef(null, IntPtr.Zero); 360HandleRef hwnd = new HandleRef(null, _hwnd);
Shared\MS\Win32\HwndSubclass.cs (1)
722private HandleRef _hwndHandleRef;
Shared\MS\Win32\NativeMethodsCLR.cs (5)
105public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 901public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 902public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 903public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 904public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
Shared\MS\Win32\NativeMethodsOther.cs (3)
315internal HandleRef MakeHandleRef(object obj) 1341public HandleRef MakeHandleRef(object wrapper) 1421public HandleRef MakeHandleRef( object wrapper)
Shared\MS\Win32\NativeMethodsSetLastError.cs (15)
117public static extern bool EnableWindow(HandleRef hWnd, bool enable); 126public static extern IntPtr GetParent(HandleRef hWnd); 132public static extern Int32 GetWindowLong(HandleRef hWnd, int nIndex ); 138public static extern NativeMethods.WndProc GetWindowLongWndProc(HandleRef hWnd, int nIndex); 144public static extern IntPtr GetWindowLongPtr(HandleRef hWnd, int nIndex); 147public static extern NativeMethods.WndProc GetWindowLongPtrWndProc(HandleRef hWnd, int nIndex); 150public static extern int GetWindowText(HandleRef hWnd, [Out] StringBuilder lpString, int nMaxCount); 153public static extern int GetWindowTextLength(HandleRef hWnd); 156public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints); 159public static extern IntPtr SetFocus(HandleRef hWnd); 162public static extern Int32 SetWindowLong(HandleRef hWnd, int nIndex, Int32 dwNewLong); 168public static extern Int32 SetWindowLongWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong); 171public static extern IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong); 177public static extern IntPtr SetWindowLongPtrWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong);
Shared\MS\Win32\SafeNativeMethodsCLR.cs (41)
71public static IntPtr ActivateKeyboardLayout(HandleRef hkl, int uFlags) 104internal static void GetMonitorInfo(HandleRef hmonitor, [In, Out]NativeMethods.MONITORINFOEX info) 140public static IntPtr MonitorFromWindow(HandleRef handle, int flags) 152public static NativeMethods.CursorHandle LoadCursor(HandleRef hInst, IntPtr iconId) 206internal static void GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect) 217internal static NativeMethods.RECT GetClientRect(HandleRef hWnd) 229internal static void GetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect) 252public static bool IsWindowEnabled(HandleRef hWnd) 262public static bool IsWindowVisible(HandleRef hWnd) 309public static void SetTimer(HandleRef hWnd, int nIDEvent, int uElapse) 324public static bool TrySetTimer(HandleRef hWnd, int nIDEvent, int uElapse) 341public static bool KillTimer(HandleRef hwnd, int idEvent) 376public static bool IsWindowUnicode(HandleRef hWnd) 388public static IntPtr SetCursor(HandleRef hcursor) 411public static void ScreenToClient(HandleRef hWnd, [In, Out] NativeMethods.POINT pt) 484public static IntPtr SetCapture(HandleRef hwnd) 585/// - See remarks for <see cref="SafeNativeMethodsPrivate.GetProcessDpiAwareness(HandleRef, out IntPtr)"/> 589/// Critical - Calls into <see cref="SafeNativeMethodsPrivate.GetProcessDpiAwareness(HandleRef, out IntPtr)"/> 593internal static NativeMethods.PROCESS_DPI_AWARENESS GetProcessDpiAwareness(HandleRef hProcess) 686internal static uint GetDpiForWindow(HandleRef hwnd) 829HandleRef hWnd, 855HandleRef hWnd, 879public static extern bool IsWindowVisible(HandleRef hWnd); 888public static extern bool IntGetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 891public static extern bool IntGetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 903public static extern IntPtr ActivateKeyboardLayout(HandleRef hkl, int uFlags); 909public static extern IntPtr SetTimer(HandleRef hWnd, int nIDEvent, int uElapse, NativeMethods.TimerProc lpTimerFunc); 912public static extern IntPtr TrySetTimer(HandleRef hWnd, int nIDEvent, int uElapse, NativeMethods.TimerProc lpTimerFunc); 915public static extern bool KillTimer(HandleRef hwnd, int idEvent); 918public static extern bool IsWindowUnicode(HandleRef hWnd); 924public static extern bool IsWindowEnabled(HandleRef hWnd); 933public static extern bool IntGetMonitorInfo(HandleRef hmonitor, [In, Out]NativeMethods.MONITORINFOEX info); 936public static extern IntPtr MonitorFromWindow(HandleRef handle, int flags); 943public static extern IntPtr SetCapture(HandleRef hwnd); 946public static extern IntPtr SetCursor(HandleRef hcursor); 955public static extern NativeMethods.CursorHandle LoadCursor(HandleRef hInst, IntPtr iconId); 966public static extern int IntScreenToClient(HandleRef hWnd, [In, Out] NativeMethods.POINT pt); 1021internal static extern uint GetProcessDpiAwareness([In] HandleRef hProcess, out IntPtr awareness); 1078[In] HandleRef hWnd, 1103[In] HandleRef hWnd, 1171internal static extern uint GetDpiForWindow([In] HandleRef hwnd);
Shared\MS\Win32\SafeNativeMethodsOther.cs (1)
285internal static Int32 GetWindowStyle(HandleRef hWnd, bool exStyle)
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (133)
155public static extern bool SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, int x, int y, int cx, int cy, int flags); 162public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 169public static extern uint GetDpiForMonitor(HandleRef hMonitor, NativeMethods.MONITOR_DPI_TYPE dpiType, out uint dpiX, out uint dpiY); 187public static extern bool EnableNonClientDpiScaling(HandleRef hWnd); 194public static extern int GetClassName(HandleRef hwnd, StringBuilder lpClassName, int nMaxCount); 201public static extern int MessageBox(HandleRef hWnd, string text, string caption, int type); 208public static extern int CriticalSetWindowTheme(HandleRef hWnd, string subAppName, string subIdList); 212public static extern IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height); 220public static extern IntPtr CriticalCreateCompatibleBitmap(HandleRef hDC, int width, int height); 243public static extern int GetBitmapBits(HandleRef hbmp, int cbBuffer, byte[] lpvBits); 250public static extern bool ShowWindow(HandleRef hWnd, int nCmdShow); 256public static void DeleteObject(HandleRef hObject) 270public static bool DeleteObjectNoThrow(HandleRef hObject) 291public static extern bool IntDeleteObject(HandleRef hObject); 295public static extern IntPtr SelectObject(HandleRef hdc, IntPtr obj); 302public static extern IntPtr SelectObject(HandleRef hdc, NativeMethods.BitmapHandle obj); 309public static extern IntPtr CriticalSelectObject(HandleRef hdc, IntPtr obj); 323public static extern bool BitBlt(HandleRef hDC, int x, int y, int nWidth, int nHeight, 324HandleRef hSrcDC, int xSrc, int ySrc, int dwRop); 331public static extern bool CriticalPrintWindow(HandleRef hWnd, HandleRef hDC, int flags); 339public static extern bool CriticalRedrawWindow(HandleRef hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, int flags); 342public static extern int DragQueryFile(HandleRef hDrop, int iFile, StringBuilder lpszFile, int cch); 349public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 465private static extern int IntGetModuleFileName(HandleRef hModule, StringBuilder buffer, int length); 471internal static string GetModuleFileName(HandleRef hModule) 577public extern static bool EnumThreadWindows(int dwThreadId, NativeMethods.EnumThreadWindowsCallback lpfn, HandleRef lParam); 587private static extern bool IntCloseHandle(HandleRef handle); 593public static bool CloseHandleNoThrow(HandleRef handle) 618private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 627public static extern IntPtr CriticalCreateCompatibleDC(HandleRef hDC); 635public static IntPtr CreateCompatibleDC(HandleRef hDC) 648private static extern bool IntUnmapViewOfFile(HandleRef pvBaseAddress); 669public static bool UnmapViewOfFileNoThrow(HandleRef pvBaseAddress) 689public static bool EnableWindow(HandleRef hWnd, bool enable) 708public static bool EnableWindowNoThrow(HandleRef hWnd, bool enable) 717public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.BITMAP bm); 784public static extern int GetWindowThreadProcessId(HandleRef hWnd, out int lpdwProcessId); 817public static extern bool InvalidateRect(HandleRef hWnd, IntPtr rect, bool erase); 827internal static int GetWindowText(HandleRef hWnd, [Out] StringBuilder lpString, int nMaxCount) 845internal static int GetWindowTextLength(HandleRef hWnd) 873public static extern IntPtr GlobalReAlloc(HandleRef handle, IntPtr bytes, int flags); 881public static extern IntPtr GlobalLock(HandleRef handle); 889public static extern bool GlobalUnlock(HandleRef handle); 897public static extern IntPtr GlobalFree(HandleRef handle); 905public static extern IntPtr GlobalSize(HandleRef handle); 914public static extern bool ImmSetConversionStatus(HandleRef hIMC, int conversion, int sentence); 922public static extern bool ImmGetConversionStatus(HandleRef hIMC, ref int conversion, ref int sentence); 930public static extern IntPtr ImmGetContext(HandleRef hWnd); 938public static extern bool ImmReleaseContext(HandleRef hWnd, HandleRef hIMC); 946public static extern IntPtr ImmAssociateContext(HandleRef hWnd, HandleRef hIMC); 955public static extern bool ImmSetOpenStatus(HandleRef hIMC, bool open); 963public static extern bool ImmGetOpenStatus(HandleRef hIMC); 971public static extern bool ImmNotifyIME(HandleRef hIMC, int dwAction, int dwIndex, int dwValue); 979public static extern int ImmGetProperty(HandleRef hkl, int flags); 988public static extern int ImmGetCompositionString(HandleRef hIMC, int dwIndex, char[] lpBuf, int dwBufLen); 997public static extern int ImmGetCompositionString(HandleRef hIMC, int dwIndex, byte[] lpBuf, int dwBufLen); 1006public static extern int ImmGetCompositionString(HandleRef hIMC, int dwIndex, int[] lpBuf, int dwBufLen); 1015public static extern int ImmGetCompositionString(HandleRef hIMC, int dwIndex, IntPtr lpBuf, int dwBufLen); 1021public static extern int ImmConfigureIME(HandleRef hkl, HandleRef hwnd, int dwData, IntPtr pvoid); 1024public static extern int ImmConfigureIME(HandleRef hkl, HandleRef hwnd, int dwData, [In] ref NativeMethods.REGISTERWORD registerWord); 1032public static extern int ImmSetCompositionWindow(HandleRef hIMC, [In, Out] ref NativeMethods.COMPOSITIONFORM compform); 1040public static extern int ImmSetCandidateWindow(HandleRef hIMC, [In, Out] ref NativeMethods.CANDIDATEFORM candform); 1043public static extern IntPtr ImmGetDefaultIMEWnd(HandleRef hwnd); 1050internal static IntPtr SetFocus(HandleRef hWnd) 1066internal static bool TrySetFocus(HandleRef hWnd) 1076internal static bool TrySetFocus(HandleRef hWnd, ref IntPtr result) 1093internal static IntPtr GetParent(HandleRef hWnd) 1112public static extern IntPtr GetAncestor(HandleRef hWnd, int flags); 1119public static extern bool IsChild(HandleRef hWndParent, HandleRef hwnd); 1138public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent); 1188public static extern IntPtr IntGetProcAddress(HandleRef hModule, string lpProcName); 1194public static IntPtr GetProcAddress(HandleRef hModule, string lpProcName) 1218public static extern IntPtr GetProcAddressNoThrow(HandleRef hModule, string lpProcName); 1497private static extern int IntClientToScreen(HandleRef hWnd, [In, Out] NativeMethods.POINT pt); 1503public static void ClientToScreen(HandleRef hWnd, [In, Out] NativeMethods.POINT pt) 1533public static extern int RegisterDragDrop(HandleRef hwnd, UnsafeNativeMethods.IOleDropTarget target); 1541public static extern int RevokeDragDrop(HandleRef hwnd); 1551public static extern bool PeekMessage([In, Out] ref System.Windows.Interop.MSG msg, HandleRef hwnd, WindowMessage msgMin, WindowMessage msgMax, int remove); 1556public static extern bool SetProp(HandleRef hWnd, string propName, HandleRef data); 1566private static extern bool IntPostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam); 1572internal static void PostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam) 1586internal static extern bool TryPostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam); 1595public static extern void NotifyWinEvent(int winEvent, HandleRef hwnd, int objType, int objID); 1603private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 1609public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1619private static extern bool IntEndPaint(HandleRef hWnd, ref NativeMethods.PAINTSTRUCT lpPaint); 1625public static bool EndPaint(HandleRef hWnd, [In, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1636private static extern IntPtr IntGetDC(HandleRef hWnd); 1644public static IntPtr GetDC(HandleRef hWnd) 1663private static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC); 1668public static int ReleaseDC(HandleRef hWnd, HandleRef hDC) { 1680public static extern int GetDeviceCaps(HandleRef hDC, int nIndex); 1696public static extern bool SetForegroundWindow(HandleRef hWnd); 1731public static extern bool SetLayeredWindowAttributes(HandleRef hwnd, int crKey, byte bAlpha, int dwFlags); 1748public static extern IntPtr SetActiveWindow(HandleRef hWnd); 1840private static extern NativeMethods.BitmapHandle PrivateCreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO bitmapInfo, int iUsage, ref IntPtr ppvBits, SafeFileMappingHandle hSection, int dwOffset); 1845internal static NativeMethods.BitmapHandle CreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO bitmapInfo, int iUsage, ref IntPtr ppvBits, SafeFileMappingHandle hSection, int dwOffset) 1893private static extern bool PrivateDestroyIcon(HandleRef handle); 1898internal static bool DestroyIcon(HandleRef handle) 1941public static extern bool IsWindow(HandleRef hWnd); 1945private static extern bool IntDeleteDC(HandleRef hDC); 1952public static void DeleteDC(HandleRef hDC) 1967private static extern bool IntCriticalDeleteDC(HandleRef hDC); 1973public static void CriticalDeleteDC(HandleRef hDC) 1992private static extern int IntGetMessageW([In, Out] ref System.Windows.Interop.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax); 1997public static bool GetMessageW([In, Out] ref System.Windows.Interop.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax) 2046HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)] object pvParam); 2054HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)]object pvParam) { 2071public static extern bool IntDestroyWindow(HandleRef hWnd); 2077public static void DestroyWindow(HandleRef hWnd) 2108public static void EnumChildWindows(HandleRef hwndParent, EnumChildrenCallback lpEnumFunc, HandleRef lParam) 2120private static extern bool IntEnumChildWindows(HandleRef hwndParent, EnumChildrenCallback lpEnumFunc, HandleRef lParam); 2128public static extern int GetWindowRgn(HandleRef hWnd, HandleRef hRgn); 2136public static extern bool PtInRegion(HandleRef hRgn, int X, int Y); 4238internal extern static IntPtr GetMenu([In] HandleRef hWnd);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (26)
93public static extern bool CreateCaret(HandleRef hwnd, NativeMethods.BitmapHandle hbitmap, int width, int height); 100public static extern bool ShowCaret(HandleRef hwnd); 107public static extern bool HideCaret(HandleRef hwnd); 114public static extern bool ShowWindowAsync(HandleRef hWnd, int nCmdShow); 512internal static extern IntPtr SendMessage( HandleRef hWnd, WindowMessage msg, IntPtr wParam, NativeMethods.IconHandle iconHandle ); 538HandleRef hwnd, IntPtr pcrKey, IntPtr pbAlpha, IntPtr pdwFlags); 655internal static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 678internal static IntPtr CriticalSetWindowLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 701internal static IntPtr CriticalSetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong) 733internal static IntPtr GetWindowLongPtr(HandleRef hWnd, int nIndex ) 769internal static Int32 GetWindowLong(HandleRef hWnd, int nIndex ) 808internal static NativeMethods.WndProc GetWindowLongWndProc(HandleRef hWnd) 908private static extern bool IntSetWindowText(HandleRef hWnd, string text); 916internal static void SetWindowText(HandleRef hWnd, string text) 929private static extern bool GetIconInfoImpl(HandleRef hIcon, [Out] ICONINFO_IMPL piconinfo); 949internal static void GetIconInfo(HandleRef hIcon, out NativeMethods.ICONINFO piconinfo) 997private static extern bool IntGetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement); 1006internal static void GetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement) 1016private static extern bool IntSetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement); 1025internal static void SetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement) 1094public static extern bool BeginPanningFeedback(HandleRef hwnd); 1125HandleRef hwnd, 1147HandleRef hwnd, 1600public static HandleRef SetWindowsHookEx(HookType idHook, HookProc lpfn, IntPtr hMod, int dwThreadId) 1623public static extern bool UnhookWindowsHookEx(HandleRef hhk); 1630public static extern IntPtr CallNextHookEx(HandleRef hhk, int nCode, IntPtr wParam, IntPtr lParam);