2940 references to HandleRef
PresentationCore (136)
Core\CSharp\MS\Internal\Automation\ElementUtil.cs (1)
155
SafeSecurityHelper.TransformLocalRectToScreen(new
HandleRef
(null, hwnd), ref rcWin32);
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (3)
498
HandleRef desktopWnd = new
HandleRef
(null, IntPtr.Zero);
511
_dpi = MS.Win32.UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), NativeMethods.LOGPIXELSY);
516
MS.Win32.UnsafeNativeMethods.ReleaseDC(desktopWnd, new
HandleRef
(null, dc));
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (1)
428
new
HandleRef
(null, hModule), "GetAlternateList") != IntPtr.Zero ?
Core\CSharp\System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
60
UnsafeNativeMethods.GetWindowText(new
HandleRef
(null, hwnd), sb, sb.Capacity);
96
SafeNativeMethods.GetWindowRect(new
HandleRef
(null, hwnd), ref rc);
Core\CSharp\System\Windows\Clipboard.cs (1)
676
IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new
HandleRef
(null, hModule), "WldpIsDynamicCodePolicyEnabled");
Core\CSharp\System\Windows\DataObject.cs (43)
831
Win32GlobalFree(new
HandleRef
(this, medium.unionmember));
1616
hDC = Win32GetDC(new
HandleRef
(this, IntPtr.Zero));
1619
sourceDC = Win32CreateCompatibleDC(new
HandleRef
(this, hDC));
1622
sourceObject = Win32SelectObject(new
HandleRef
(this, sourceDC), hBitmap);
1625
destinationDC = Win32CreateCompatibleDC(new
HandleRef
(this, hDC));
1628
hBitmapNew = Win32CreateCompatibleBitmap(new
HandleRef
(this, hDC), width, height);
1631
destinationObject = Win32SelectObject(new
HandleRef
(this, destinationDC), hBitmapNew);
1637
Win32BitBlt(new
HandleRef
(this, destinationDC), width, height, new
HandleRef
(null, sourceDC), /* SRCCOPY */0x00CC0020);
1642
Win32SelectObject(new
HandleRef
(this, sourceDC), sourceObject);
1643
Win32SelectObject(new
HandleRef
(this, destinationDC), destinationObject);
1646
Win32DeleteDC(new
HandleRef
(this, sourceDC));
1647
Win32DeleteDC(new
HandleRef
(this, destinationDC));
1650
Win32ReleaseDC(new
HandleRef
(this, IntPtr.Zero), new
HandleRef
(this, hDC));
1656
Win32DeleteObject(new
HandleRef
(this, hBitmap));
2041
ptr = Win32GlobalLock(new
HandleRef
(this, handle));
2054
Win32GlobalUnlock(new
HandleRef
(this, handle));
2088
Win32DeleteObject(new
HandleRef
(this, hbitmap));
2168
basePtr = Win32GlobalLock(new
HandleRef
(this, handle));
2208
Win32GlobalUnlock(new
HandleRef
(this, handle));
2243
ptr = Win32GlobalLock(new
HandleRef
(this, handle));
2264
Win32GlobalUnlock(new
HandleRef
(this, handle));
2298
ptr = Win32GlobalLock(new
HandleRef
(this, handle));
2314
Win32GlobalUnlock(new
HandleRef
(this, handle));
2356
pointerUtf8 = Win32GlobalLock(new
HandleRef
(this, handle));
2374
Win32GlobalUnlock(new
HandleRef
(this, handle));
2474
int byteCount = NativeMethods.IntPtrToInt32(Win32GlobalSize(new
HandleRef
(this, handle)));
2483
handle = Win32GlobalReAlloc(new
HandleRef
(this, handle),
2541
Win32DeleteObject(new
HandleRef
(null, hbitmap));
3104
IntPtr ptr = Win32GlobalLock(new
HandleRef
(this, hglobal));
3115
Win32GlobalUnlock(new
HandleRef
(this, hglobal));
3121
Win32GlobalFree(new
HandleRef
(this, hglobal));
3380
ptr = Win32GlobalLock(new
HandleRef
(this, handle));
3388
size = NativeMethods.IntPtrToInt32(Win32GlobalSize(new
HandleRef
(this, handle)));
3426
Win32GlobalUnlock(new
HandleRef
(this, handle));
3519
count = UnsafeNativeMethods.DragQueryFile(new
HandleRef
(this, hdrop), unchecked((int)0xFFFFFFFF), null, 0);
3526
if (UnsafeNativeMethods.DragQueryFile(new
HandleRef
(this, hdrop), i, sb, sb.Capacity) != 0)
3552
ptr = Win32GlobalLock(new
HandleRef
(this, handle));
3566
Win32GlobalUnlock(new
HandleRef
(this, handle));
3583
int utf8ByteSize = NativeMethods.IntPtrToInt32(Win32GlobalSize(new
HandleRef
(this, handle)));
3585
IntPtr pointerUtf8 = Win32GlobalLock(new
HandleRef
(this, handle));
3621
Win32GlobalUnlock(new
HandleRef
(this, handle));
Core\CSharp\System\Windows\DragDrop.cs (2)
494
new
HandleRef
(null, windowHandle),
518
new
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)
601
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
602
bool fOpen = UnsafeNativeMethods.ImmGetOpenStatus(new
HandleRef
(this, himc));
603
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
640
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
641
bool fOpen = UnsafeNativeMethods.ImmGetOpenStatus(new
HandleRef
(this, himc));
646
UnsafeNativeMethods.ImmSetOpenStatus(new
HandleRef
(this, himc), (value == InputMethodState.On));
649
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
872
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
873
UnsafeNativeMethods.ImmGetConversionStatus(new
HandleRef
(this, himc), ref convmode, ref sentence);
874
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
1013
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
1014
UnsafeNativeMethods.ImmGetConversionStatus(new
HandleRef
(this, himc), ref convmode, ref sentence);
1074
UnsafeNativeMethods.ImmSetConversionStatus(new
HandleRef
(this, himc), convmodeNew, sentence);
1077
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
1137
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
1138
UnsafeNativeMethods.ImmGetConversionStatus(new
HandleRef
(this, himc), ref convmode, ref sentence);
1139
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
1211
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
1212
UnsafeNativeMethods.ImmGetConversionStatus(new
HandleRef
(this, himc), ref convmode, ref sentence);
1229
UnsafeNativeMethods.ImmSetConversionStatus(new
HandleRef
(this, himc), convmode, sentenceNew);
1232
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
1455
UnsafeNativeMethods.ImmAssociateContext(new
HandleRef
(this, hwnd), new HandleRef(this, _defaultImc.Value));
1463
UnsafeNativeMethods.ImmAssociateContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, IntPtr.Zero));
1531
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
1532
UnsafeNativeMethods.ImmGetConversionStatus(new
HandleRef
(this, himc), ref immConvMode, ref sentence);
1533
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
1666
UnsafeNativeMethods.ImmConfigureIME(new
HandleRef
(this, hkl), new
HandleRef
(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero);
1731
UnsafeNativeMethods.ImmConfigureIME(new
HandleRef
(this, hkl), new
HandleRef
(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_REGISTERWORD, ref regWord);
1929
IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new
HandleRef
(this, IntPtr.Zero));
1930
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
1935
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
Core\CSharp\System\Windows\Input\InputProcessorProfiles.cs (1)
157
SafeNativeMethods.ActivateKeyboardLayout(new
HandleRef
(this,hklList[i]), 0);
Core\CSharp\System\Windows\Input\MouseDevice.cs (1)
2206
if (!SafeNativeMethods.IsWindowEnabled(new
HandleRef
(null, hwndHit)))
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (3)
530
UnsafeNativeMethods.TrySetFocus(new
HandleRef
(this, hwndRestoreFocus), ref hwndRestoreFocus);
872
int windowStyle = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this,hwnd), NativeMethods.GWL_STYLE);
878
IntPtr hwndParent = UnsafeNativeMethods.GetParent(new
HandleRef
(this, hwnd));
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (3)
529
SafeNativeMethods.ScreenToClient(new
HandleRef
(this,hwnd), pt);
1021
SafeNativeMethods.GetClientRect(new
HandleRef
(this,hwndToCheck), ref rcClient);
1022
SafeNativeMethods.ScreenToClient(new
HandleRef
(this,hwndToCheck), ptCursor);
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (1)
67
return new
HandleRef
(_hwndSource, handle);
Core\CSharp\System\Windows\Interop\HwndSource.cs (14)
327
UnsafeNativeMethods.CriticalSetWindowTheme(new
HandleRef
(this, _hwndWrapper.Handle), "", "");
873
UnsafeNativeMethods.HideCaret(new
HandleRef
(this, IntPtr.Zero));
905
UnsafeNativeMethods.ShowCaret(new
HandleRef
(this, IntPtr.Zero));
977
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this,_hwndWrapper.Handle), new
HandleRef
(null,IntPtr.Zero),
1005
IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new
HandleRef
(this, CriticalHandle), NativeMethods.GA_ROOT);
1008
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, hwndRoot), MS.Internal.Interop.WindowMessage.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), new IntPtr(NativeMethods.VK_SPACE));
1055
int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new
HandleRef
(this, _hwndWrapper.Handle), false));
1056
int styleEx = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new
HandleRef
(this, _hwndWrapper.Handle), true));
1157
return new
HandleRef
(this,Handle);
1372
SafeNativeMethods.GetClientRect(new
HandleRef
(this,_hwndWrapper.Handle), ref rc);
1594
SafeNativeMethods.GetWindowRect(new
HandleRef
(this, _hwndWrapper.Handle), ref windowRect);
1783
hwndRoot = UnsafeNativeMethods.GetAncestor(new
HandleRef
(this, CriticalHandle), NativeMethods.GA_ROOT);
1790
SafeNativeMethods.GetWindowRect(new
HandleRef
(this, hwndRoot), ref rc);
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (3)
62
UnsafeNativeMethods.SetProp(new
HandleRef
(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new
HandleRef
(null, new IntPtr(MultiTouchEnabledFlag)));
129
SafeNativeMethods.ScreenToClient(new
HandleRef
(this, hwnd), pt1);
Core\CSharp\System\Windows\Interop\HwndTarget.cs (6)
554
normalizedHwnd = new
HandleRef
(wrapperObject, hwndParent);
576
new
HandleRef
(this, hwnd),
580
if (!UnsafeNativeMethods.IsWindow(new
HandleRef
(this, hwnd)))
1931
new
HandleRef
(null, IntPtr.Zero), // HWND_TOP
1958
new
HandleRef
(null, IntPtr.Zero), // HWND_TOP
2092
SafeSecurityHelper.TransformLocalRectToScreen(new
HandleRef
(null, hwndParent), ref windowRectInScreenCoords);
Core\CSharp\System\Windows\Media\MediaContextNotificationWindow.cs (1)
252
new
HandleRef
(null, user32Module),
Core\CSharp\System\Windows\UIElement.cs (4)
1158
HandleRef desktopWnd = new
HandleRef
(null, IntPtr.Zero);
1175
dpiX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), NativeMethods.LOGPIXELSX);
1176
dpiY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), NativeMethods.LOGPIXELSY);
1182
UnsafeNativeMethods.ReleaseDC(desktopWnd, new
HandleRef
(null, dc));
Shared\MS\Internal\PointUtil.cs (2)
190
HandleRef handleRef = new
HandleRef
(inputSource, inputSource.CriticalHandle);
218
HandleRef handleRef = new
HandleRef
(inputSource, inputSource.CriticalHandle);
Shared\MS\Internal\SafeSecurityHelper.cs (1)
71
int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new
HandleRef
(null, IntPtr.Zero), ref rcWindowCoords, 2);
PresentationFramework (150)
src\Framework\Microsoft\Win32\CommonDialog.cs (2)
276
MoveToScreenCenter(new
HandleRef
(this,hwnd));
338
new
HandleRef
(this, _hwndOwnerWindow), // window to find monitor location for
src\Framework\Microsoft\Win32\FileDialog.cs (8)
699
_hwndFileDialog = UnsafeNativeMethods.GetParent(new
HandleRef
(this, hwnd));
740
MoveToScreenCenter(new
HandleRef
(this, _hwndFileDialog));
882
UnsafeNativeMethods.CriticalSetWindowLong(new
HandleRef
(this, hwnd), // hWnd (which window are we affecting)
903
UnsafeNativeMethods.CriticalSetWindowLong(new
HandleRef
(this, hwnd), // hWnd (which window are we affecting)
1195
UnsafeNativeMethods.SetFocus(new
HandleRef
(this, focusHandle));
1762
if (!UnsafeNativeMethods.IsWindow(new
HandleRef
(this, _hwndFileDialog)))
1768
int textLen = UnsafeNativeMethods.GetWindowTextLength(new
HandleRef
(this, _hwndFileDialog));
1772
UnsafeNativeMethods.GetWindowText(new
HandleRef
(this, _hwndFileDialog),
src\Framework\MS\Internal\AppModel\AppSecurityManager.cs (1)
157
UnsafeNativeMethods.ShellExecute( new
HandleRef
( null, IntPtr.Zero) , /*hwnd*/
src\Framework\MS\Internal\AppModel\IconHelper.cs (2)
53
var hdcDesktop = new
HandleRef
(null, UnsafeNativeMethods.GetDC(new HandleRef()));
261
new
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)
114
new
HandleRef
(null, ElevationPromptOwnerWindow), NativeMethods.GA_ROOT);
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (2)
291
IntPtr topWindow = UnsafeNativeMethods.GetAncestor(new
HandleRef
(this, CriticalHandle), 2/*GA_ROOT*/);
392
handleRef = new
HandleRef
( this, CriticalHandle ) ;
src\Framework\MS\Internal\Controls\ActiveXHelper.cs (4)
104
logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSX);
105
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
132
logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSY);
133
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
src\Framework\MS\Internal\Printing\Win32PrintDialog.cs (1)
153
if(0 != MS.Win32.UnsafeNativeMethods.MessageBox(new
HandleRef
(null, owner), message, caption, type))
src\Framework\System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
52
UnsafeNativeMethods.GetWindowText(new
HandleRef
(null, window.CriticalHandle), sb, sb.Capacity);
89
try { SafeNativeMethods.GetWindowRect(new
HandleRef
(null, windowHandle), ref rc); }
src\Framework\System\Windows\Controls\Primitives\Popup.cs (18)
2682
SafeNativeMethods.GetMonitorInfo(new
HandleRef
(null, monitor), monitorInfo);
2778
UnsafeNativeMethods.GetIconInfo(new
HandleRef
(null, hCursor), out iconInfo);
3145
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(null, Handle), new
HandleRef
(null, IntPtr.Zero),
3161
SafeNativeMethods.GetClientRect(new
HandleRef
(null, parent), ref rect);
3256
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(null, Handle),
3257
lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new
HandleRef
(null, lastWebOCHwnd),
3265
UnsafeNativeMethods.ShowWindow(new
HandleRef
(null, Handle), NativeMethods.SW_SHOWNA);
3269
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(null, Handle),
3286
UnsafeNativeMethods.ShowWindow(new
HandleRef
(null, Handle), NativeMethods.SW_HIDE);
3302
IntPtr lastHwnd = UnsafeNativeMethods.GetWindow(new
HandleRef
(null, Handle), NativeMethods.GW_HWNDLAST);
3308
if (UnsafeNativeMethods.GetClassName(new
HandleRef
(null, lastHwnd), sb, NativeMethods.MAX_PATH) != 0)
3316
lastHwnd = UnsafeNativeMethods.GetWindow(new
HandleRef
(null, lastHwnd), NativeMethods.GW_HWNDPREV);
3352
Int32 styles = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_EXSTYLE);
3367
UnsafeNativeMethods.CriticalSetWindowLong(new
HandleRef
(null, handle), NativeMethods.GWL_EXSTYLE, (IntPtr)styles);
3526
window = UnsafeNativeMethods.GetParent(new
HandleRef
(null, window));
3559
return UnsafeNativeMethods.GetParent(new
HandleRef
(null, child));
3788
SafeNativeMethods.GetMonitorInfo(new
HandleRef
(null, hMonitor), info);
src\Framework\System\windows\Documents\CaretElement.cs (1)
1019
bool returnValue = UnsafeNativeMethods.CreateCaret(new
HandleRef
(null, hwnd), bitmap, /*width*/ 0, /*height*/ 0);
src\Framework\System\Windows\Documents\ImmComposition.cs (26)
254
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
257
UnsafeNativeMethods.ImmNotifyIME(new
HandleRef
(this, himc), NativeMethods.NI_COMPOSITIONSTR, NativeMethods.CPS_COMPLETE, 0);
259
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
505
himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
517
size = UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0);
525
UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_RESULTSTR, result, size);
534
size = UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0);
541
UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_COMPSTR, composition, size);
548
cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0);
556
deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0);
564
size = UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0);
571
UnsafeNativeMethods.ImmGetCompositionString(new
HandleRef
(this, himc), NativeMethods.GCS_COMPATTR, attributes, size);
579
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
688
himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
803
UnsafeNativeMethods.ImmSetCandidateWindow(new
HandleRef
(this, himc), ref candform);
804
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
886
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
925
UnsafeNativeMethods.ImmSetCompositionWindow(new
HandleRef
(this, himc), ref compform);
926
UnsafeNativeMethods.ImmReleaseContext(new
HandleRef
(this, hwnd), new
HandleRef
(this, himc));
1764
int prop = UnsafeNativeMethods.ImmGetProperty(new
HandleRef
(this, SafeNativeMethods.GetKeyboardLayout(0)), NativeMethods.IGP_PROPERTY);
1934
IntPtr himc = UnsafeNativeMethods.ImmGetContext(new
HandleRef
(this, hwnd));
1943
hwndDefIme = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new
HandleRef
(this, hwnd));
src\Framework\System\Windows\Documents\MoveSizeWinEventHandler.cs (1)
96
hwndTemp = UnsafeNativeMethods.GetParent(new
HandleRef
(this, hwndTemp));
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
330
SafeNativeMethods.GetClientRect(new
HandleRef
(null, hwnd), ref rc);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
666
if (SafeNativeMethods.IsWindowEnabled(new
HandleRef
(null, helper.Handle)))
707
UnsafeNativeMethods.SetForegroundWindow(new
HandleRef
(null, hwnd));
src\Framework\System\windows\Documents\TextEditorTyping.cs (1)
1661
mouseInputPending = 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)
824
SafeNativeMethods.ScreenToClient(new
HandleRef
(null,win32Window.Handle), point);
2522
UnsafeNativeMethods.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)
521
NativeMethods.RECT rcClientRTLAdjusted = PointUtil.AdjustForRightToLeft(rcClient, new
HandleRef
(null, hwndParent));
697
_hwnd = new
HandleRef
(null, IntPtr.Zero);
809
new
HandleRef
(null, IntPtr.Zero),
902
HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new
HandleRef
(this, IntPtr.Zero)));
905
HandleRef hdcBitmap = new
HandleRef
(this, IntPtr.Zero);
906
HandleRef hBitmap = new
HandleRef
(this, IntPtr.Zero);
967
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, IntPtr.Zero), hdcScreen);
968
hdcScreen = new
HandleRef
(null, IntPtr.Zero);
973
hBitmap = new
HandleRef
(this, IntPtr.Zero);
979
hdcBitmap = new
HandleRef
(this, IntPtr.Zero);
1187
BuildWindow(new
HandleRef
(null, hwndParent));
1196
UnsafeNativeMethods.SetParent(_hwnd, new
HandleRef
(null,hwndParent));
1205
UnsafeNativeMethods.SetParent(_hwnd, new
HandleRef
(null, hwnd.Handle));
1246
int 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)
508
MessageBoxResult result = Win32ToMessageBoxResult (UnsafeNativeMethods.MessageBox (new
HandleRef
(null, owner), messageBoxText, caption, style));
src\Framework\System\Windows\SystemParameters.cs (3)
6388
HandleRef desktopWnd = new
HandleRef
(null, IntPtr.Zero);
6405
_dpiX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), NativeMethods.LOGPIXELSX);
6410
UnsafeNativeMethods.ReleaseDC(desktopWnd, new
HandleRef
(null, dc));
src\Framework\System\Windows\Window.cs (54)
359
if (UnsafeNativeMethods.IsWindow( new
HandleRef
( null, _dialogOwnerHandle ) ) != true)
393
style = 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))
507
UnsafeNativeMethods.TrySetFocus(new
HandleRef
(null, _dialogPreviousActiveHandle), ref _dialogPreviousActiveHandle);
579
return UnsafeNativeMethods.SetForegroundWindow(new
HandleRef
(null, CriticalHandle));
2911
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle),
2912
new
HandleRef
(null, IntPtr.Zero),
3004
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle),
3005
new
HandleRef
(null, IntPtr.Zero),
3097
UnsafeNativeMethods.SetWindowText(new
HandleRef
(this, CriticalHandle), title);
3117
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle),
3118
new
HandleRef
(null, IntPtr.Zero),
3690
if (SafeNativeMethods.IsWindowVisible(new
HandleRef
(null, hWnd)) &&
3691
SafeNativeMethods.IsWindowEnabled(new
HandleRef
(null, hWnd)))
3716
if (UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWnd)))
3721
UnsafeNativeMethods.EnableWindowNoThrow(new
HandleRef
(null, hWnd), state);
3944
if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new
HandleRef
(null, _ownerHandle)))
3993
SafeNativeMethods.GetMonitorInfo(new
HandleRef
(null, hMonitor), monitorInfo);
4004
IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new
HandleRef
(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST);
4080
int styleEx = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, hwndHandle), NativeMethods.GWL_EXSTYLE);
4084
UnsafeNativeMethods.GetWindowPlacement(new
HandleRef
(this, hwndHandle), ref wp);
4245
new
HandleRef
(this, CriticalHandle),
4323
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(null, CriticalHandle),
4648
(UnsafeNativeMethods.IsWindow(new
HandleRef
(this, _dialogPreviousActiveHandle)) == true))
4650
UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(this, _dialogPreviousActiveHandle));
5337
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0,
5354
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0,
5403
HandleRef hr = new
HandleRef
(this, CriticalHandle);
5565
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(null, CriticalHandle),
5806
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle),
5813
UnsafeNativeMethods.ShowWindow(new
HandleRef
(this, CriticalHandle), nCmd);
6191
UnsafeNativeMethods.GetWindowPlacement(new
HandleRef
(this, CriticalHandle), ref wp);
6257
UnsafeNativeMethods.SetWindowPlacement(new
HandleRef
(this, CriticalHandle), ref wp);
6280
IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new
HandleRef
(this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONULL);
6287
SafeNativeMethods.GetMonitorInfo(new
HandleRef
(this, hMonitor), monitorInfo);
6528
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle),
6529
new
HandleRef
(null, IntPtr.Zero),
6717
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero);
6981
SafeNativeMethods.GetClientRect(new
HandleRef
(this, CriticalHandle), ref physicalClientRc);
7207
UnsafeNativeMethods.CriticalSetWindowLong(new
HandleRef
(this,CriticalHandle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse.Value);
7208
UnsafeNativeMethods.CriticalSetWindowLong(new
HandleRef
(this,CriticalHandle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse.Value);
7210
UnsafeNativeMethods.SetWindowPos(new
HandleRef
(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0,
7865
monitor = SafeNativeMethods.MonitorFromWindow( new
HandleRef
( this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONEAREST );
7868
SafeNativeMethods.GetMonitorInfo( new
HandleRef
( this, monitor ) , monitorInfo);
7886
SafeNativeMethods.GetClientRect(new
HandleRef
(this, CriticalHandle), ref rc);
7902
SafeNativeMethods.GetWindowRect(new
HandleRef
(this, CriticalHandle), ref rc);
7922
SafeNativeMethods.GetClientRect(new
HandleRef
(this, CriticalHandle), ref rc);
7927
UnsafeNativeMethods.ClientToScreen(new
HandleRef
(this, _sourceWindow.CriticalHandle), pt);
8042
return UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this,CriticalHandle), NativeMethods.GWL_EXSTYLE);
8061
return UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this,CriticalHandle), NativeMethods.GWL_STYLE);
8410
var nullHandle = new
HandleRef
(null, IntPtr.Zero);
8417
UnsafeNativeMethods.ReleaseDC(nullHandle, new
HandleRef
(null, hdc));
8458
new
HandleRef
(null, hMonitor),
System (51)
compmod\microsoft\win32\NativeMethods.cs (1)
58
public readonly static HandleRef NullHandleRef = new
HandleRef
(null, IntPtr.Zero);
compmod\microsoft\win32\SystemEvents.cs (21)
126
if (UnsafeNativeMethods.GetUserObjectInformation(new
HandleRef
(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) {
414
defWindowProc = UnsafeNativeMethods.GetProcAddress(new
HandleRef
(this, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc);
439
if (!UnsafeNativeMethods.GetClassInfo(new
HandleRef
(this, hInstance), WndClass.lpszClassName, wndclassi)) {
455
if (0 != UnsafeNativeMethods.UnregisterClass(WndClass.lpszClassName, new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle(null)))) {
476
new
HandleRef
(this, hInstance), null);
493
IntPtr timerId = UnsafeNativeMethods.SendMessage(new
HandleRef
(systemEvents, systemEvents.windowHandle),
508
UnsafeNativeMethods.WTSUnRegisterSessionNotification(new
HandleRef
(systemEvents, systemEvents.windowHandle));
514
HandleRef href = new
HandleRef
(this, handle);
519
UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new
HandleRef
(this, DefWndProc));
536
UnsafeNativeMethods.UnregisterClass(className, new
HandleRef
(this, hInstance));
608
UnsafeNativeMethods.WTSRegisterSessionNotification(new
HandleRef
(systemEvents, systemEvents.windowHandle), NativeMethods.NOTIFY_FOR_THIS_SESSION);
610
SafeNativeMethods.FreeLibrary(new
HandleRef
(null, retval));
833
UnsafeNativeMethods.PostMessage(new
HandleRef
(systemEvents, systemEvents.windowHandle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero);
843
int res = (int) UnsafeNativeMethods.SendMessage(new
HandleRef
(systemEvents, systemEvents.windowHandle),
857
IntPtr res = UnsafeNativeMethods.SetTimer(new
HandleRef
(this, windowHandle), new
HandleRef
(this, timerId), (int) wParam, NativeMethods.NullHandleRef);
891
bool res = UnsafeNativeMethods.KillTimer(new
HandleRef
(this, windowHandle), new
HandleRef
(this, wParam));
1414
UnsafeNativeMethods.PostMessage(new
HandleRef
(systemEvents, systemEvents.windowHandle), NativeMethods.WM_QUIT, IntPtr.Zero, IntPtr.Zero);
1450
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, windowHandle), NativeMethods.WM_REFLECT + msg, wParam, newStringPtr);
1463
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, windowHandle), NativeMethods.WM_REFLECT + msg, wParam, lParam);
compmod\system\codedom\compiler\Executor.cs (1)
261
new
HandleRef
(null, environmentPtr), // IntPtr lpEnvironment,
services\io\system\io\FileSystemWatcher.cs (1)
730
new
HandleRef
(this, (IntPtr) buffPtr),
services\monitoring\system\diagnosticts\EventLogInternal.cs (1)
1719
sid, (short) strings.Length, rawData.Length, new
HandleRef
(this, stringsRootHandle.AddrOfPinnedObject()), rawData);
services\monitoring\system\diagnosticts\FileVersionInfo.cs (4)
330
if (UnsafeNativeMethods.VerQueryValue(new
HandleRef
(null, memPtr), "\\", ref memRef, out memLen)) {
355
if (UnsafeNativeMethods.VerQueryValue(new
HandleRef
(null, memPtr), name, ref memRef, out memLen)) {
370
if (UnsafeNativeMethods.VerQueryValue(new
HandleRef
(null, memPtr), "\\VarFileInfo\\Translation", ref memRef, out memLen)) {
467
if (UnsafeNativeMethods.GetFileVersionInfo(fileName, 0, infoSize, new
HandleRef
(null, memIntPtr))) {
services\monitoring\system\diagnosticts\Process.cs (9)
457
int length = NativeMethods.GetWindowTextLength(new
HandleRef
(this, handle)) * 2;
459
NativeMethods.GetWindowText(new
HandleRef
(this, handle), builder, builder.Capacity);
953
responding = NativeMethods.SendMessageTimeout(new
HandleRef
(this, mainWindow), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, NativeMethods.SMTO_ABORTIFHUNG, 5000, out result) != (IntPtr)0;
1242
int style = NativeMethods.GetWindowLong(new
HandleRef
(this, mainWindowHandle), NativeMethods.GWL_STYLE);
1244
NativeMethods.PostMessage(new
HandleRef
(this, mainWindowHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
1468
if (!NativeMethods.OpenProcessToken(new
HandleRef
(null, processHandle), NativeMethods.TOKEN_ADJUST_PRIVILEGES, out hToken)) {
1481
NativeMethods.AdjustTokenPrivileges(new
HandleRef
(null, hToken), false, tkp, 0, IntPtr.Zero, IntPtr.Zero);
1927
if (!NativeMethods.DuplicateHandle(new
HandleRef
(this, NativeMethods.GetCurrentProcess()),
1929
new
HandleRef
(this, NativeMethods.GetCurrentProcess()),
services\monitoring\system\diagnosticts\ProcessManager.cs (10)
49
if (NativeMethods.GetWindow(new
HandleRef
(this, handle), NativeMethods.GW_OWNER) != (IntPtr)0 || !NativeMethods.IsWindowVisible(new
HandleRef
(this, handle)))
70
NativeMethods.GetWindowThreadProcessId(new
HandleRef
(this, handle), out processId);
108
new
HandleRef
(null, NativeMethods.GetCurrentProcess()),
120
NativeMethods.AdjustTokenPrivileges(new
HandleRef
(null,tokenHandle), false, tp, 0, IntPtr.Zero, IntPtr.Zero);
365
HandleRef handleRef = new
HandleRef
(null, handle);
435
HandleRef handleRef = new
HandleRef
(null, handle);
669
if (!NativeMethods.GetModuleInformation(processHandle, new
HandleRef
(null, moduleHandle), ntModuleInfo, Marshal.SizeOf(ntModuleInfo)))
676
ret = NativeMethods.GetModuleBaseName(processHandle, new
HandleRef
(null, moduleHandle), baseName, baseName.Capacity * 2);
681
ret = NativeMethods.GetModuleFileNameEx(processHandle, new
HandleRef
(null, moduleHandle), fileName, fileName.Capacity * 2);
services\monitoring\system\diagnosticts\ProcessThread.cs (1)
360
if (NativeMethods.SetThreadAffinityMask(threadHandle, new
HandleRef
(this, value)) == IntPtr.Zero) {
services\monitoring\system\diagnosticts\processwaithandle.cs (2)
16
new
HandleRef
(this, NativeMethods.GetCurrentProcess()),
18
new
HandleRef
(this, NativeMethods.GetCurrentProcess()),
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (3)
26
Win32Interop.SetWindowLongPtr(new
HandleRef
(window, hwnd), Win32Interop.GWL_EXSTYLE, exStyle);
47
Win32Interop.SetWindowLongPtr(new
HandleRef
(window, hwnd), Win32Interop.GWL_STYLE, style);
76
Win32Interop.SetWindowLongPtr(new
HandleRef
(window, hwnd), Win32Interop.GWL_EXSTYLE, exStyle);
System.Configuration (1)
System\Configuration\ClientConfigPaths.cs (1)
118
while (((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)
1859
static internal readonly HandleRef NullHandleRef = new
HandleRef
(null, IntPtr.Zero);
fx\src\data\System\Data\Odbc\OdbcUtils.cs (1)
324
return new
HandleRef
(this, ptr);
System.Drawing (1052)
commonui\System\Drawing\Advanced\AdjustableArrowCap.cs (8)
65
int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapHeight(new
HandleRef
(this, nativeCap), height);
74
int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapHeight(new
HandleRef
(this, nativeCap), out height);
94
int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapWidth(new
HandleRef
(this, nativeCap), width);
103
int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapWidth(new
HandleRef
(this, nativeCap), out width);
123
int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapMiddleInset(new
HandleRef
(this, nativeCap), middleInset);
132
int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapMiddleInset(new
HandleRef
(this, nativeCap), out middleInset);
154
int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapFillState(new
HandleRef
(this, nativeCap), isFilled);
163
int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapFillState(new
HandleRef
(this, nativeCap), out isFilled);
commonui\System\Drawing\Advanced\CustomLineCap.cs (16)
87
new
HandleRef
(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath.nativePath),
88
new
HandleRef
(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath.nativePath),
155
int status = SafeNativeMethods.Gdip.GdipCloneCustomLineCap(new
HandleRef
(this, nativeCap), out cloneCap);
167
int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapType(new
HandleRef
(null, cap), out capType);
171
SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new
HandleRef
(null, cap));
184
SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new
HandleRef
(null, cap));
194
int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeCaps(new
HandleRef
(this, nativeCap), startCap, endCap);
206
int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeCaps(new
HandleRef
(this, nativeCap), out startCap, out endCap);
214
int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeJoin(new
HandleRef
(this, nativeCap), lineJoin);
224
int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeJoin(new
HandleRef
(this, nativeCap), out lineJoin);
244
int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseCap(new
HandleRef
(this, nativeCap), baseCap);
253
int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseCap(new
HandleRef
(this, nativeCap), out baseCap);
273
int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseInset(new
HandleRef
(this, nativeCap), inset);
282
int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseInset(new
HandleRef
(this, nativeCap), out inset);
303
int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapWidthScale(new
HandleRef
(this, nativeCap), widthScale);
312
int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapWidthScale(new
HandleRef
(this, nativeCap), out widthScale);
commonui\System\Drawing\Advanced\Font.cs (24)
65
new
HandleRef
(this, this.fontFamily.NativeFamily),
315
status = SafeNativeMethods.Gdip.GdipGetFontUnit(new
HandleRef
(this, nativeFont), out unit);
320
status = SafeNativeMethods.Gdip.GdipGetFontSize(new
HandleRef
(this, nativeFont), out size);
325
status = SafeNativeMethods.Gdip.GdipGetFontStyle(new
HandleRef
(this, nativeFont), out style);
330
status = SafeNativeMethods.Gdip.GdipGetFamily(new
HandleRef
(this, nativeFont), out nativeFamily);
390
status = SafeNativeMethods.Gdip.GdipGetFontSize(new
HandleRef
(this, this.nativeFont), out this.fontSize);
407
SafeNativeMethods.GetObject(new
HandleRef
(null, hfont), lf);
415
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
435
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
454
status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontA(new
HandleRef
(null, hdc), lf, out font);
456
status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(new
HandleRef
(null, hdc), lf, out font);
491
int status = SafeNativeMethods.Gdip.GdipCreateFontFromDC(new
HandleRef
(null, hdc), ref font);
513
int status = SafeNativeMethods.Gdip.GdipCloneFont(new
HandleRef
(this, nativeFont), out cloneFont);
590
SafeNativeMethods.Gdip.GdipDeleteFont(new
HandleRef
(this, this.nativeFont));
815
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
833
status = SafeNativeMethods.Gdip.GdipGetLogFontA(new
HandleRef
(this, this.NativeFont), new
HandleRef
(graphics, graphics.NativeGraphics), logFont);
835
status = SafeNativeMethods.Gdip.GdipGetLogFontW(new
HandleRef
(this, this.NativeFont), new
HandleRef
(graphics, graphics.NativeGraphics), logFont);
917
int status = SafeNativeMethods.Gdip.GdipGetFontHeight(new
HandleRef
(this, this.NativeFont), new
HandleRef
(graphics, graphics.NativeGraphics), out ht);
940
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
954
int status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(new
HandleRef
(this, this.NativeFont), dpi, out ht);
1013
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
commonui\System\Drawing\Advanced\FontCollection.cs (3)
59
int status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyCount(new
HandleRef
(this, nativeFontCollection), out numSought);
68
status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyList(new
HandleRef
(this, nativeFontCollection), numSought, gpfamilies,
79
SafeNativeMethods.Gdip.GdipCloneFontFamily(new
HandleRef
(null, (IntPtr)gpfamilies[f]), out native);
commonui\System\Drawing\Advanced\FontFamily.cs (8)
126
int status = SafeNativeMethods.Gdip.GdipCreateFontFamilyFromName(name, new
HandleRef
(fontCollection, nativeFontCollection), out fontfamily);
280
SafeNativeMethods.Gdip.GdipDeleteFontFamily(new
HandleRef
(this, this.nativeFamily));
325
int status = SafeNativeMethods.Gdip.GdipGetFamilyName(new
HandleRef
(this, this.NativeFamily), name, language);
453
int status = SafeNativeMethods.Gdip.GdipIsStyleAvailable(new
HandleRef
(this, this.NativeFamily), style, out bresult);
469
int status = SafeNativeMethods.Gdip.GdipGetEmHeight(new
HandleRef
(this, this.NativeFamily), style, out result);
487
int status = SafeNativeMethods.Gdip.GdipGetCellAscent(new
HandleRef
(this, this.NativeFamily), style, out result);
504
int status = SafeNativeMethods.Gdip.GdipGetCellDescent(new
HandleRef
(this, this.NativeFamily), style, out result);
520
int status = SafeNativeMethods.Gdip.GdipGetLineSpacing(new
HandleRef
(this, this.NativeFamily), style, out result);
commonui\System\Drawing\Advanced\Gdiplus.cs (6)
4144
int result = GetClipRgn(new
HandleRef
(null, hDC), new
HandleRef
(null, hTempRgn));
4152
DeleteObject(new
HandleRef
(null, hTempRgn));
4159
SelectClipRgn(new
HandleRef
(null, hDC), new
HandleRef
(null, hRgn));
4163
DeleteObject(new
HandleRef
(null, hRgn));
commonui\System\Drawing\Advanced\GraphicsPath.cs (107)
108
int status = SafeNativeMethods.Gdip.GdipCreatePath2(new
HandleRef
(null, ptbuf), new
HandleRef
(null, typebuf), count,
161
int status = SafeNativeMethods.Gdip.GdipCreatePath2I(new
HandleRef
(null, ptbuf), new
HandleRef
(null, typebuf), count,
185
int status = SafeNativeMethods.Gdip.GdipClonePath(new
HandleRef
(this, nativePath), out clonePath);
223
SafeNativeMethods.Gdip.GdipDeletePath(new
HandleRef
(this, nativePath));
260
int status = SafeNativeMethods.Gdip.GdipResetPath(new
HandleRef
(this, nativePath));
278
int status = SafeNativeMethods.Gdip.GdipGetPathFillMode(new
HandleRef
(this, nativePath), out fillmode);
293
int status = SafeNativeMethods.Gdip.GdipSetPathFillMode(new
HandleRef
(this, nativePath), (int) value);
321
int status = SafeNativeMethods.Gdip.GdipGetPathData(new
HandleRef
(this, nativePath), memoryPathData);
359
int status = SafeNativeMethods.Gdip.GdipStartPathFigure(new
HandleRef
(this, nativePath));
373
int status = SafeNativeMethods.Gdip.GdipClosePathFigure(new
HandleRef
(this, nativePath));
386
int status = SafeNativeMethods.Gdip.GdipClosePathFigures(new
HandleRef
(this, nativePath));
399
int status = SafeNativeMethods.Gdip.GdipSetPathMarker(new
HandleRef
(this, nativePath));
410
int status = SafeNativeMethods.Gdip.GdipClearPathMarkers(new
HandleRef
(this, nativePath));
421
int status = SafeNativeMethods.Gdip.GdipReversePath(new
HandleRef
(this, nativePath));
434
int status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(new
HandleRef
(this, nativePath), gppt);
489
int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(new
HandleRef
(this, nativePath),
492
new
HandleRef
(graphics, (graphics != null) ?
542
int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(new
HandleRef
(this, nativePath),
545
new
HandleRef
(graphics, (graphics != null) ?
603
int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(new
HandleRef
(this, nativePath),
606
new
HandleRef
(pen, pen.NativePen),
607
new
HandleRef
(graphics, (graphics != null) ?
666
int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(new
HandleRef
(this, nativePath),
669
new
HandleRef
(pen, pen.NativePen),
670
new
HandleRef
(graphics, (graphics != null) ?
697
int status = SafeNativeMethods.Gdip.GdipAddPathLine(new
HandleRef
(this, nativePath), x1, y1, x2, y2);
713
int status = SafeNativeMethods.Gdip.GdipAddPathLine2(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
740
int status = SafeNativeMethods.Gdip.GdipAddPathLineI(new
HandleRef
(this, nativePath), x1, y1, x2, y2);
757
int status = SafeNativeMethods.Gdip.GdipAddPathLine2I(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
788
int status = SafeNativeMethods.Gdip.GdipAddPathArc(new
HandleRef
(this, nativePath), x, y, width, height,
814
int status = SafeNativeMethods.Gdip.GdipAddPathArcI(new
HandleRef
(this, nativePath), x, y, width, height,
845
int status = SafeNativeMethods.Gdip.GdipAddPathBezier(new
HandleRef
(this, nativePath), x1, y1, x2, y2,
864
int status = SafeNativeMethods.Gdip.GdipAddPathBeziers(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
892
int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(new
HandleRef
(this, nativePath), x1, y1, x2, y2,
911
int status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
936
int status = SafeNativeMethods.Gdip.GdipAddPathCurve(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
953
int status = SafeNativeMethods.Gdip.GdipAddPathCurve2(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf),
974
int status = SafeNativeMethods.Gdip.GdipAddPathCurve3(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf),
997
int status = SafeNativeMethods.Gdip.GdipAddPathCurveI(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
1016
int status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf),
1037
int status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf),
1060
int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
1080
int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length, tension);
1101
int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
1121
int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length, tension);
1134
int status = SafeNativeMethods.Gdip.GdipAddPathRectangle(new
HandleRef
(this, nativePath), rect.X, rect.Y,
1153
int status = SafeNativeMethods.Gdip.GdipAddPathRectangles(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), rects.Length);
1169
int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(new
HandleRef
(this, nativePath), rect.X, rect.Y,
1187
int status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), rects.Length);
1215
int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(new
HandleRef
(this, nativePath), x, y, width, height);
1245
int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(new
HandleRef
(this, nativePath), x, y, width, height);
1272
int status = SafeNativeMethods.Gdip.GdipAddPathPie(new
HandleRef
(this, nativePath), x, y, width, height,
1289
int status = SafeNativeMethods.Gdip.GdipAddPathPieI(new
HandleRef
(this, nativePath), x, y, width, height,
1306
int status = SafeNativeMethods.Gdip.GdipAddPathPolygon(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
1324
int status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), points.Length);
1342
int status = SafeNativeMethods.Gdip.GdipAddPathPath(new
HandleRef
(this, nativePath), new
HandleRef
(addingPath, addingPath.nativePath), connect);
1365
int status = SafeNativeMethods.Gdip.GdipAddPathString(new
HandleRef
(this, nativePath),
1368
new
HandleRef
(family, (family != null) ? family.NativeFamily : IntPtr.Zero),
1372
new
HandleRef
(format, (format != null) ? format.nativeFormat : IntPtr.Zero));
1388
int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new
HandleRef
(this, nativePath),
1391
new
HandleRef
(family, (family != null) ? family.NativeFamily : IntPtr.Zero),
1395
new
HandleRef
(format, (format != null) ? format.nativeFormat : IntPtr.Zero));
1410
int status = SafeNativeMethods.Gdip.GdipAddPathString(new
HandleRef
(this, nativePath),
1413
new
HandleRef
(family, (family != null) ? family.NativeFamily : IntPtr.Zero),
1417
new
HandleRef
(format, (format != null) ? format.nativeFormat : IntPtr.Zero));
1432
int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new
HandleRef
(this, nativePath),
1435
new
HandleRef
(family, (family != null) ? family.NativeFamily : IntPtr.Zero),
1439
new
HandleRef
(format, (format != null) ? format.nativeFormat : IntPtr.Zero));
1457
int status = SafeNativeMethods.Gdip.GdipTransformPath(new
HandleRef
(this, nativePath),
1458
new
HandleRef
(matrix, matrix.nativeMatrix));
1503
int status = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(new
HandleRef
(this, nativePath),
1505
new
HandleRef
(matrix, nativeMatrix),
1506
new
HandleRef
(pen, nativePen));
1543
int status = SafeNativeMethods.Gdip.GdipFlattenPath(new
HandleRef
(this, nativePath),
1544
new
HandleRef
(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix),
1598
SafeNativeMethods.Gdip.GdipGetPointCount(new
HandleRef
(this, nativePath), out pointCount);
1603
int status = SafeNativeMethods.Gdip.GdipWidenPath(new
HandleRef
(this, nativePath),
1604
new
HandleRef
(pen, pen.NativePen),
1605
new
HandleRef
(matrix, nativeMatrix),
1650
int status = SafeNativeMethods.Gdip.GdipWarpPath(new
HandleRef
(this, nativePath),
1651
new
HandleRef
(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix),
1652
new
HandleRef
(null, buf),
1678
int status = SafeNativeMethods.Gdip.GdipGetPointCount(new
HandleRef
(this, nativePath), out count);
1700
int status = SafeNativeMethods.Gdip.GdipGetPathTypes(new
HandleRef
(this, nativePath), types, count);
1725
int status = SafeNativeMethods.Gdip.GdipGetPathPoints(new
HandleRef
(this, nativePath), new
HandleRef
(null, buf), count);
commonui\System\Drawing\Advanced\GraphicsPathIterator.cs (15)
43
int status = SafeNativeMethods.Gdip.GdipCreatePathIter(out nativeIter, new
HandleRef
(path, (path == null) ? IntPtr.Zero : path.nativePath));
70
SafeNativeMethods.Gdip.GdipDeletePathIter(new
HandleRef
(this, nativeIter));
110
int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpath(new
HandleRef
(this, nativeIter), out resultCount,
132
int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpathPath(new
HandleRef
(this, nativeIter), out resultCount,
133
new
HandleRef
(path, (path == null) ? IntPtr.Zero : path.nativePath), out isClosed);
151
int status = SafeNativeMethods.Gdip.GdipPathIterNextPathType(new
HandleRef
(this, nativeIter), out resultCount,
170
int status = SafeNativeMethods.Gdip.GdipPathIterNextMarker(new
HandleRef
(this, nativeIter), out resultCount,
189
int status = SafeNativeMethods.Gdip.GdipPathIterNextMarkerPath(new
HandleRef
(this, nativeIter), out resultCount,
190
new
HandleRef
(path, (path == null) ? IntPtr.Zero : path.nativePath));
206
int status = SafeNativeMethods.Gdip.GdipPathIterGetCount(new
HandleRef
(this, nativeIter), out resultCount);
223
int status = SafeNativeMethods.Gdip.GdipPathIterGetSubpathCount(new
HandleRef
(this, nativeIter), out resultCount);
240
int status = SafeNativeMethods.Gdip.GdipPathIterHasCurve(new
HandleRef
(this, nativeIter), out hasCurve);
254
int status = SafeNativeMethods.Gdip.GdipPathIterRewind(new
HandleRef
(this, nativeIter));
276
int status = SafeNativeMethods.Gdip.GdipPathIterEnumerate(new
HandleRef
(this, nativeIter), out resultCount,
318
int status = SafeNativeMethods.Gdip.GdipPathIterCopyData(new
HandleRef
(this, nativeIter), out resultCount,
commonui\System\Drawing\Advanced\HatchBrush.cs (4)
82
int status = SafeNativeMethods.Gdip.GdipCloneBrush(new
HandleRef
(this, this.NativeBrush), out cloneBrush);
102
int status = SafeNativeMethods.Gdip.GdipGetHatchStyle(new
HandleRef
(this, this.NativeBrush), out hatchStyle);
121
int status = SafeNativeMethods.Gdip.GdipGetHatchForegroundColor(new
HandleRef
(this, this.NativeBrush), out forecol);
142
int status = SafeNativeMethods.Gdip.GdipGetHatchBackgroundColor(new
HandleRef
(this, this.NativeBrush), out backcol);
commonui\System\Drawing\Advanced\ImageAttributes.cs (23)
107
SafeNativeMethods.Gdip.GdipDisposeImageAttributes(new
HandleRef
(this, nativeImageAttributes));
146
new
HandleRef
(this, nativeImageAttributes),
216
new
HandleRef
(this, nativeImageAttributes),
246
new
HandleRef
(this, nativeImageAttributes),
286
new
HandleRef
(this, nativeImageAttributes),
313
new
HandleRef
(this, nativeImageAttributes),
338
new
HandleRef
(this, nativeImageAttributes),
363
new
HandleRef
(this, nativeImageAttributes),
388
new
HandleRef
(this, nativeImageAttributes),
413
new
HandleRef
(this, nativeImageAttributes),
437
new
HandleRef
(this, nativeImageAttributes),
464
new
HandleRef
(this, nativeImageAttributes),
491
new
HandleRef
(this, nativeImageAttributes),
517
new
HandleRef
(this, nativeImageAttributes),
542
new
HandleRef
(this, nativeImageAttributes),
570
new
HandleRef
(this, nativeImageAttributes),
595
new
HandleRef
(this, nativeImageAttributes),
630
new
HandleRef
(this, nativeImageAttributes),
634
new
HandleRef
(null, memory));
661
new
HandleRef
(this, nativeImageAttributes),
714
new
HandleRef
(this, nativeImageAttributes),
733
new
HandleRef
(this, nativeImageAttributes), new
HandleRef
(null, memory), type);
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (30)
277
int status = SafeNativeMethods.Gdip.GdipCloneBrush(new
HandleRef
(this, this.NativeBrush), out cloneBrush);
291
int status = SafeNativeMethods.Gdip.GdipSetLineColors(new
HandleRef
(this, this.NativeBrush),
308
int status = SafeNativeMethods.Gdip.GdipGetLineColors(new
HandleRef
(this, this.NativeBrush), colors);
338
int status = SafeNativeMethods.Gdip.GdipGetLineRect(new
HandleRef
(this, this.NativeBrush), ref rect);
370
int status = SafeNativeMethods.Gdip.GdipGetLineGammaCorrection(new
HandleRef
(this, this.NativeBrush),
378
int status = SafeNativeMethods.Gdip.GdipSetLineGammaCorrection(new
HandleRef
(this, this.NativeBrush),
408
int status = SafeNativeMethods.Gdip.GdipGetLineBlendCount(new
HandleRef
(this, this.NativeBrush), out retval);
429
status = SafeNativeMethods.Gdip.GdipGetLineBlend(new
HandleRef
(this, this.NativeBrush), factors, positions, count);
472
int status = SafeNativeMethods.Gdip.GdipSetLineBlend(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(null, factors), new
HandleRef
(null, positions), count);
520
int status = SafeNativeMethods.Gdip.GdipSetLineSigmaBlend(new
HandleRef
(this, this.NativeBrush), focus, scale);
545
int status = SafeNativeMethods.Gdip.GdipSetLineLinearBlend(new
HandleRef
(this, this.NativeBrush), focus, scale);
565
int status = SafeNativeMethods.Gdip.GdipGetLinePresetBlendCount(new
HandleRef
(this, this.NativeBrush), out retval);
585
status = SafeNativeMethods.Gdip.GdipGetLinePresetBlend(new
HandleRef
(this, this.NativeBrush), colors, positions, count);
671
int status = SafeNativeMethods.Gdip.GdipSetLinePresetBlend(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(null, colors), new
HandleRef
(null, positions), count);
704
int status = SafeNativeMethods.Gdip.GdipSetLineWrapMode(new
HandleRef
(this, this.NativeBrush), unchecked((int) wrapMode));
713
int status = SafeNativeMethods.Gdip.GdipGetLineWrapMode(new
HandleRef
(this, this.NativeBrush), out mode);
751
int status = SafeNativeMethods.Gdip.GdipSetLineTransform(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(matrix, matrix.nativeMatrix));
762
int status = SafeNativeMethods.Gdip.GdipGetLineTransform(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(matrix, matrix.nativeMatrix));
788
int status = SafeNativeMethods.Gdip.GdipResetLineTransform(new
HandleRef
(this, this.NativeBrush));
819
int status = SafeNativeMethods.Gdip.GdipMultiplyLineTransform(new
HandleRef
(this, this.NativeBrush),
820
new
HandleRef
(matrix, matrix.nativeMatrix),
844
int status = SafeNativeMethods.Gdip.GdipTranslateLineTransform(new
HandleRef
(this, this.NativeBrush),
869
int status = SafeNativeMethods.Gdip.GdipScaleLineTransform(new
HandleRef
(this, this.NativeBrush),
895
int status = SafeNativeMethods.Gdip.GdipRotateLineTransform(new
HandleRef
(this, this.NativeBrush),
commonui\System\Drawing\Advanced\Matrix.cs (32)
94
int status = SafeNativeMethods.Gdip.GdipCreateMatrix3(ref gprectf, new
HandleRef
(null, buf), out matrix);
129
int status = SafeNativeMethods.Gdip.GdipCreateMatrix3I(ref gprect, new
HandleRef
(null, buf), out matrix);
154
SafeNativeMethods.Gdip.GdipDeleteMatrix(new
HandleRef
(this, nativeMatrix));
175
int status = SafeNativeMethods.Gdip.GdipCloneMatrix(new
HandleRef
(this, nativeMatrix), out cloneMatrix);
196
int status = SafeNativeMethods.Gdip.GdipGetMatrixElements(new
HandleRef
(this, nativeMatrix), buf);
238
int status = SafeNativeMethods.Gdip.GdipSetMatrixElements(new
HandleRef
(this, nativeMatrix),
268
int status = SafeNativeMethods.Gdip.GdipMultiplyMatrix(new
HandleRef
(this, nativeMatrix), new
HandleRef
(matrix, matrix.nativeMatrix),
295
int status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new
HandleRef
(this, nativeMatrix),
319
int status = SafeNativeMethods.Gdip.GdipScaleMatrix(new
HandleRef
(this, nativeMatrix), scaleX, scaleY, order);
345
int status = SafeNativeMethods.Gdip.GdipRotateMatrix(new
HandleRef
(this, nativeMatrix), angle, order);
375
status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new
HandleRef
(this, nativeMatrix), point.X, point.Y, order);
376
status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new
HandleRef
(this, nativeMatrix), angle, order);
377
status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new
HandleRef
(this, nativeMatrix), -point.X, -point.Y, order);
380
status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new
HandleRef
(this, nativeMatrix), -point.X, -point.Y, order);
381
status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new
HandleRef
(this, nativeMatrix), angle, order);
382
status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new
HandleRef
(this, nativeMatrix), point.X, point.Y, order);
395
int status = SafeNativeMethods.Gdip.GdipShearMatrix(new
HandleRef
(this, nativeMatrix), shearX, shearY, MatrixOrder.Prepend);
409
int status = SafeNativeMethods.Gdip.GdipShearMatrix(new
HandleRef
(this, nativeMatrix), shearX, shearY, order);
421
int status = SafeNativeMethods.Gdip.GdipInvertMatrix(new
HandleRef
(this, nativeMatrix));
441
int status = SafeNativeMethods.Gdip.GdipTransformMatrixPoints(new
HandleRef
(this, nativeMatrix),
442
new
HandleRef
(null, buf),
473
int status = SafeNativeMethods.Gdip.GdipTransformMatrixPointsI(new
HandleRef
(this, nativeMatrix),
474
new
HandleRef
(null, buf),
505
int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPoints(new
HandleRef
(this, nativeMatrix),
506
new
HandleRef
(null, buf),
546
int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPointsI(new
HandleRef
(this, nativeMatrix),
547
new
HandleRef
(null, buf),
575
int status = SafeNativeMethods.Gdip.GdipIsMatrixInvertible(new
HandleRef
(this, nativeMatrix), out isInvertible);
592
int status = SafeNativeMethods.Gdip.GdipIsMatrixIdentity(new
HandleRef
(this, nativeMatrix), out isIdentity);
615
int status = SafeNativeMethods.Gdip.GdipIsMatrixEqual(new
HandleRef
(this, nativeMatrix),
616
new
HandleRef
(matrix2, matrix2.nativeMatrix),
commonui\System\Drawing\Advanced\Metafile.cs (19)
68
int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromWmf(new
HandleRef
(null, hmetafile), deleteWmf, wmfHeader, out metafile);
94
int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(new
HandleRef
(null, henhmetafile), deleteEmf, out metafile);
172
int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new
HandleRef
(null, referenceHdc),
237
int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new
HandleRef
(null, referenceHdc),
303
status = SafeNativeMethods.Gdip.GdipRecordMetafile(new
HandleRef
(null, referenceHdc),
312
status = SafeNativeMethods.Gdip.GdipRecordMetafileI(new
HandleRef
(null, referenceHdc),
363
int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, new
HandleRef
(null, referenceHdc),
442
new
HandleRef
(null, referenceHdc),
525
new
HandleRef
(null, referenceHdc),
535
new
HandleRef
(null, referenceHdc),
587
new
HandleRef
(null, referenceHdc),
654
new
HandleRef
(null, referenceHdc),
725
new
HandleRef
(null, referenceHdc),
735
new
HandleRef
(null, referenceHdc),
773
int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromWmf(new
HandleRef
(null, hmetafile), wmfHeader, header.wmf);
796
int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(new
HandleRef
(null, henhmetafile), header.emf);
913
int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromMetafile(new
HandleRef
(this, nativeImage), memory);
956
int status = SafeNativeMethods.Gdip.GdipGetHemfFromMetafile(new
HandleRef
(this, nativeImage), out hEmf);
977
int status = SafeNativeMethods.Gdip.GdipPlayMetafileRecord(new
HandleRef
(this, nativeImage),
commonui\System\Drawing\Advanced\PathGradientBrush.cs (39)
67
int status = SafeNativeMethods.Gdip.GdipCreatePathGradient(new
HandleRef
(null, pointsBuf),
127
int status = SafeNativeMethods.Gdip.GdipCreatePathGradientI(new
HandleRef
(null, pointsBuf),
164
int status = SafeNativeMethods.Gdip.GdipCreatePathGradientFromPath(new
HandleRef
(path, path.nativePath),
191
int status = SafeNativeMethods.Gdip.GdipCloneBrush(new
HandleRef
(this, this.NativeBrush), out cloneBrush);
212
int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterColor(new
HandleRef
(this, this.NativeBrush), out argb);
221
int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterColor(new
HandleRef
(this, this.NativeBrush), value.ToArgb());
238
int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new
HandleRef
(this, this.NativeBrush),
252
status = SafeNativeMethods.Gdip.GdipSetPathGradientSurroundColorsWithCount(new
HandleRef
(this, this.NativeBrush),
264
int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new
HandleRef
(this, this.NativeBrush),
272
status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorsWithCount(new
HandleRef
(this, this.NativeBrush),
315
int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterPoint(new
HandleRef
(this, this.NativeBrush), point);
324
int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterPoint(new
HandleRef
(this, this.NativeBrush), new GPPOINTF(value));
337
int status = SafeNativeMethods.Gdip.GdipGetPathGradientRect(new
HandleRef
(this, this.NativeBrush), ref rect);
364
int status = SafeNativeMethods.Gdip.GdipGetPathGradientBlendCount(new
HandleRef
(this, this.NativeBrush), out retval);
384
status = SafeNativeMethods.Gdip.GdipGetPathGradientBlend(new
HandleRef
(this, this.NativeBrush), factors, positions, count);
429
int status = SafeNativeMethods.Gdip.GdipSetPathGradientBlend(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(null, factors), new
HandleRef
(null, positions), count);
481
int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new
HandleRef
(this, this.NativeBrush), focus, scale);
506
int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new
HandleRef
(this, this.NativeBrush), focus, scale);
521
int status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlendCount(new
HandleRef
(this, this.NativeBrush), out retval);
548
status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlend(new
HandleRef
(this, this.NativeBrush), colors, positions, count);
605
int status = SafeNativeMethods.Gdip.GdipSetPathGradientPresetBlend(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(null, colors), new
HandleRef
(null, positions), count);
641
int status = SafeNativeMethods.Gdip.GdipSetPathGradientTransform(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(matrix, matrix.nativeMatrix));
650
int status = SafeNativeMethods.Gdip.GdipGetPathGradientTransform(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(matrix, matrix.nativeMatrix));
679
int status = SafeNativeMethods.Gdip.GdipResetPathGradientTransform(new
HandleRef
(this, this.NativeBrush));
709
int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new
HandleRef
(this, this.NativeBrush),
710
new
HandleRef
(matrix, matrix.nativeMatrix),
738
int status = SafeNativeMethods.Gdip.GdipTranslatePathGradientTransform(new
HandleRef
(this, this.NativeBrush),
766
int status = SafeNativeMethods.Gdip.GdipScalePathGradientTransform(new
HandleRef
(this, this.NativeBrush),
794
int status = SafeNativeMethods.Gdip.GdipRotatePathGradientTransform(new
HandleRef
(this, this.NativeBrush),
815
int status = SafeNativeMethods.Gdip.GdipGetPathGradientFocusScales(new
HandleRef
(this, this.NativeBrush), scaleX, scaleY);
823
int status = SafeNativeMethods.Gdip.GdipSetPathGradientFocusScales(new
HandleRef
(this, this.NativeBrush), value.X, value.Y);
834
int status = SafeNativeMethods.Gdip.GdipSetPathGradientWrapMode(new
HandleRef
(this, this.NativeBrush), unchecked((int) wrapMode));
843
int status = SafeNativeMethods.Gdip.GdipGetPathGradientWrapMode(new
HandleRef
(this, this.NativeBrush), out mode);
commonui\System\Drawing\Advanced\PrivateFontCollection.cs (3)
99
int status = SafeNativeMethods.Gdip.GdipPrivateAddFontFile(new
HandleRef
(this, nativeFontCollection), filename);
125
int status = SafeNativeMethods.Gdip.GdipPrivateAddMemoryFont(new
HandleRef
(this, nativeFontCollection), new
HandleRef
(null, memory), length);
commonui\System\Drawing\Advanced\SafeCustomLineCapHandle.cs (1)
35
status = SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new
HandleRef
(this, handle));
commonui\System\Drawing\Advanced\StringFormat.cs (20)
164
int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new
HandleRef
(format, format.nativeFormat), out nativeFormat);
187
SafeNativeMethods.Gdip.GdipDeleteStringFormat(new
HandleRef
(this, nativeFormat));
214
int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new
HandleRef
(this, nativeFormat), out cloneFormat);
233
int status = SafeNativeMethods.Gdip.GdipGetStringFormatFlags(new
HandleRef
(this, nativeFormat), out format);
242
int status = SafeNativeMethods.Gdip.GdipSetStringFormatFlags(new
HandleRef
(this, nativeFormat), value);
258
int status = SafeNativeMethods.Gdip.GdipSetStringFormatMeasurableCharacterRanges(new
HandleRef
(this, nativeFormat), ranges.Length, ranges);
274
int status = SafeNativeMethods.Gdip.GdipGetStringFormatAlign(new
HandleRef
(this, nativeFormat), out alignment);
289
int status = SafeNativeMethods.Gdip.GdipSetStringFormatAlign(new
HandleRef
(this, nativeFormat), value);
305
int status = SafeNativeMethods.Gdip.GdipGetStringFormatLineAlign(new
HandleRef
(this, nativeFormat), out alignment);
318
int status = SafeNativeMethods.Gdip.GdipSetStringFormatLineAlign(new
HandleRef
(this, nativeFormat), value);
335
int status = SafeNativeMethods.Gdip.GdipGetStringFormatHotkeyPrefix(new
HandleRef
(this, nativeFormat), out hotkeyPrefix);
350
int status = SafeNativeMethods.Gdip.GdipSetStringFormatHotkeyPrefix(new
HandleRef
(this, nativeFormat), value);
365
int status = SafeNativeMethods.Gdip.GdipSetStringFormatTabStops(new
HandleRef
(this, nativeFormat), firstTabOffset, tabStops.Length, tabStops);
378
int status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStopCount(new
HandleRef
(this, nativeFormat), out count);
384
status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStops(new
HandleRef
(this, nativeFormat), count, out firstTabOffset, tabStops);
404
int status = SafeNativeMethods.Gdip.GdipGetStringFormatTrimming(new
HandleRef
(this, nativeFormat), out trimming);
418
int status = SafeNativeMethods.Gdip.GdipSetStringFormatTrimming(new
HandleRef
(this, nativeFormat), value);
483
int status = SafeNativeMethods.Gdip.GdipSetStringFormatDigitSubstitution(new
HandleRef
(this, nativeFormat), language, substitute);
499
int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new
HandleRef
(this, nativeFormat), out lang, out digitSubstitute);
517
int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new
HandleRef
(this, nativeFormat), out language, out digitSubstitute);
commonui\System\Drawing\Advanced\TextureBrush.cs (21)
83
int status = SafeNativeMethods.Gdip.GdipCreateTexture(new
HandleRef
(image, image.nativeImage),
121
int status = SafeNativeMethods.Gdip.GdipCreateTexture2(new
HandleRef
(image, image.nativeImage),
163
int status = SafeNativeMethods.Gdip.GdipCreateTexture2I(new
HandleRef
(image, image.nativeImage),
218
int status = SafeNativeMethods.Gdip.GdipCreateTextureIA(new
HandleRef
(image, image.nativeImage),
219
new
HandleRef
(imageAttr, (imageAttr == null) ?
273
int status = SafeNativeMethods.Gdip.GdipCreateTextureIAI(new
HandleRef
(image, image.nativeImage),
274
new
HandleRef
(imageAttr, (imageAttr == null) ?
307
int status = SafeNativeMethods.Gdip.GdipCloneBrush(new
HandleRef
(this, this.NativeBrush), out cloneBrush);
320
int status = SafeNativeMethods.Gdip.GdipSetTextureTransform(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(matrix, matrix.nativeMatrix));
329
int status = SafeNativeMethods.Gdip.GdipGetTextureTransform(new
HandleRef
(this, this.NativeBrush), new
HandleRef
(matrix, matrix.nativeMatrix));
361
int status = SafeNativeMethods.Gdip.GdipSetTextureWrapMode(new
HandleRef
(this, this.NativeBrush), unchecked((int) wrapMode));
371
int status = SafeNativeMethods.Gdip.GdipGetTextureWrapMode(new
HandleRef
(this, this.NativeBrush), out mode);
414
int status = SafeNativeMethods.Gdip.GdipGetTextureImage(new
HandleRef
(this, this.NativeBrush), out image);
433
int status = SafeNativeMethods.Gdip.GdipResetTextureTransform(new
HandleRef
(this, this.NativeBrush));
463
int status = SafeNativeMethods.Gdip.GdipMultiplyTextureTransform(new
HandleRef
(this, this.NativeBrush),
464
new
HandleRef
(matrix, matrix.nativeMatrix),
491
int status = SafeNativeMethods.Gdip.GdipTranslateTextureTransform(new
HandleRef
(this, this.NativeBrush),
520
int status = SafeNativeMethods.Gdip.GdipScaleTextureTransform(new
HandleRef
(this, this.NativeBrush),
549
int status = SafeNativeMethods.Gdip.GdipRotateTextureTransform(new
HandleRef
(this, this.NativeBrush),
commonui\System\Drawing\Bitmap.cs (24)
70
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, bitmap));
73
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, bitmap));
112
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, bitmap));
115
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, bitmap));
144
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, bitmap));
147
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, bitmap));
179
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, bitmap));
182
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, bitmap));
218
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, bitmap));
221
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, bitmap));
244
int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, unchecked((int) format), new
HandleRef
(null, scan0), out bitmap);
297
int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, new
HandleRef
(g, g.NativeGraphics), out bitmap);
358
int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(new
HandleRef
(null, hicon), out bitmap);
379
int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(new
HandleRef
(null, hinstance),
380
new
HandleRef
(null, name),
421
int status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(new
HandleRef
(this, nativeImage), out hBitmap,
444
int status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(new
HandleRef
(this, nativeImage), out hIcon);
502
new
HandleRef
(this, nativeImage),
536
new
HandleRef
(this, nativeImage),
647
int status = SafeNativeMethods.Gdip.GdipBitmapLockBits(new
HandleRef
(this, nativeImage), ref gprect,
663
int status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(new
HandleRef
(this, nativeImage), bitmapdata);
688
int status = SafeNativeMethods.Gdip.GdipBitmapGetPixel(new
HandleRef
(this, nativeImage), x, y, out color);
715
int status = SafeNativeMethods.Gdip.GdipBitmapSetPixel(new
HandleRef
(this, nativeImage), x, y, color.ToArgb());
727
int status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(new
HandleRef
(this, nativeImage), xDpi, yDpi);
commonui\System\Drawing\Brush.cs (1)
104
SafeNativeMethods.Gdip.GdipDeleteBrush(new
HandleRef
(this, this.nativeBrush));
commonui\System\Drawing\BufferedGraphics.cs (4)
118
RenderInternal(new
HandleRef
(Graphics, targetDC), this);
133
RenderInternal(new
HandleRef
(target, targetDC), this);
148
RenderInternal(new
HandleRef
(null, targetDC), this);
162
new
HandleRef
(buffer.Graphics, sourceDC), 0, 0, rop);
commonui\System\Drawing\BufferedGraphicsContext.cs (17)
253
hbm = SafeNativeMethods.CreateCompatibleBitmap(new
HandleRef
(null, hdc), 1, 1);
265
SafeNativeMethods.GetDIBits(new
HandleRef
(null, hdc),
266
new
HandleRef
(null, hbm),
283
SafeNativeMethods.GetDIBits(new
HandleRef
(null, hdc),
284
new
HandleRef
(null, hbm),
296
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hbm));
344
palRet = SafeNativeMethods.GetPaletteEntries(new
HandleRef
(null, palHalftone), 0, cColors, aj);
348
palRet = SafeNativeMethods.GetPaletteEntries(new
HandleRef
(null, hpal), 0, cColors, aj);
380
compatDC = UnsafeNativeMethods.CreateCompatibleDC(new
HandleRef
(null, src));
400
oldBitmap = SafeNativeMethods.SelectObject(new
HandleRef
(this, compatDC), new
HandleRef
(this, dib));
450
int objType = UnsafeNativeMethods.GetObjectType(new
HandleRef
(null, hdc));
489
hbmRet = SafeNativeMethods.CreateDIBSection(new
HandleRef
(null, hdc), ref pbmi, NativeMethods.DIB_RGB_COLORS, ref ppvBits, IntPtr.Zero, 0);
530
SafeNativeMethods.SelectObject(new
HandleRef
(this, compatDC), new
HandleRef
(this, oldBitmap));
536
UnsafeNativeMethods.DeleteDC(new
HandleRef
(this, compatDC));
552
SafeNativeMethods.DeleteObject(new
HandleRef
(this, dib));
commonui\System\Drawing\Graphics.cs (313)
152
int status = SafeNativeMethods.Gdip.GdipCreateFromHDC(new
HandleRef
(null, hdc), out nativeGraphics);
178
int status = SafeNativeMethods.Gdip.GdipCreateFromHDC2(new
HandleRef
(null, hdc), new
HandleRef
(null, hdevice), out gdipNativeGraphics);
212
int status = SafeNativeMethods.Gdip.GdipCreateFromHWND(new
HandleRef
(null, hwnd), out nativeGraphics);
239
int status = SafeNativeMethods.Gdip.GdipGetImageGraphicsContext(new
HandleRef
(image, image.nativeImage),
286
int status = SafeNativeMethods.Gdip.GdipGetDC(new
HandleRef
(this, this.NativeGraphics), out hdc);
333
int status = SafeNativeMethods.Gdip.GdipReleaseDC(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(null, hdc));
405
SafeNativeMethods.Gdip.GdipDeleteGraphics(new
HandleRef
(this, this.nativeGraphics));
454
int status = SafeNativeMethods.Gdip.GdipFlush(new
HandleRef
(this, this.NativeGraphics), intention);
480
int status = SafeNativeMethods.Gdip.GdipGetCompositingMode(new
HandleRef
(this, this.NativeGraphics), out mode);
495
int status = SafeNativeMethods.Gdip.GdipSetCompositingMode(new
HandleRef
(this, this.NativeGraphics), unchecked((int)value));
511
int status = SafeNativeMethods.Gdip.GdipGetRenderingOrigin(new
HandleRef
(this, this.NativeGraphics), out x, out y);
520
int status = SafeNativeMethods.Gdip.GdipSetRenderingOrigin(new
HandleRef
(this, this.NativeGraphics), value.X, value.Y);
536
int status = SafeNativeMethods.Gdip.GdipGetCompositingQuality(new
HandleRef
(this, this.NativeGraphics), out cq);
551
int status = SafeNativeMethods.Gdip.GdipSetCompositingQuality(new
HandleRef
(this, this.NativeGraphics),
572
int status = SafeNativeMethods.Gdip.GdipGetTextRenderingHint(new
HandleRef
(this, this.NativeGraphics), out hint);
587
int status = SafeNativeMethods.Gdip.GdipSetTextRenderingHint(new
HandleRef
(this, this.NativeGraphics), value);
603
int status = SafeNativeMethods.Gdip.GdipGetTextContrast(new
HandleRef
(this, this.NativeGraphics), out tgv);
612
int status = SafeNativeMethods.Gdip.GdipSetTextContrast(new
HandleRef
(this, this.NativeGraphics), value);
628
int status = SafeNativeMethods.Gdip.GdipGetSmoothingMode(new
HandleRef
(this, this.NativeGraphics), out mode);
643
int status = SafeNativeMethods.Gdip.GdipSetSmoothingMode(new
HandleRef
(this, this.NativeGraphics), value);
659
int status = SafeNativeMethods.Gdip.GdipGetPixelOffsetMode(new
HandleRef
(this, this.NativeGraphics), out mode);
674
int status = SafeNativeMethods.Gdip.GdipSetPixelOffsetMode(new
HandleRef
(this, this.NativeGraphics), value);
705
int status = SafeNativeMethods.Gdip.GdipGetInterpolationMode(new
HandleRef
(this, this.NativeGraphics), out mode);
721
int status = SafeNativeMethods.Gdip.GdipSetInterpolationMode(new
HandleRef
(this, this.NativeGraphics), unchecked((int)value));
741
int status = SafeNativeMethods.Gdip.GdipGetWorldTransform(new
HandleRef
(this, this.NativeGraphics),
742
new
HandleRef
(matrix, matrix.nativeMatrix));
751
int status = SafeNativeMethods.Gdip.GdipSetWorldTransform(new
HandleRef
(this, this.NativeGraphics),
752
new
HandleRef
(value, value.nativeMatrix));
772
int status = SafeNativeMethods.Gdip.GdipGetPageUnit(new
HandleRef
(this, this.NativeGraphics), out unit);
787
int status = SafeNativeMethods.Gdip.GdipSetPageUnit(new
HandleRef
(this, this.NativeGraphics), unchecked((int) value));
802
int status = SafeNativeMethods.Gdip.GdipGetPageScale(new
HandleRef
(this, this.NativeGraphics), scale);
813
int status = SafeNativeMethods.Gdip.GdipSetPageScale(new
HandleRef
(this, this.NativeGraphics), value);
828
int status = SafeNativeMethods.Gdip.GdipGetDpiX(new
HandleRef
(this, this.NativeGraphics), dpi);
845
int status = SafeNativeMethods.Gdip.GdipGetDpiY(new
HandleRef
(this, this.NativeGraphics), dpi);
921
HandleRef screenDC = new
HandleRef
( null, dc.Hdc );
922
HandleRef targetDC = new
HandleRef
( null, this.GetHdc()); // this DC
951
int status = SafeNativeMethods.Gdip.GdipResetWorldTransform(new
HandleRef
(this, this.NativeGraphics));
979
int status = SafeNativeMethods.Gdip.GdipMultiplyWorldTransform(new
HandleRef
(this, this.NativeGraphics),
980
new
HandleRef
(matrix, matrix.nativeMatrix),
998
int status = SafeNativeMethods.Gdip.GdipTranslateWorldTransform(new
HandleRef
(this, this.NativeGraphics), dx, dy, order);
1025
int status = SafeNativeMethods.Gdip.GdipScaleWorldTransform(new
HandleRef
(this, this.NativeGraphics), sx, sy, order);
1043
int status = SafeNativeMethods.Gdip.GdipRotateWorldTransform(new
HandleRef
(this, this.NativeGraphics), angle, order);
1066
int status = SafeNativeMethods.Gdip.GdipTransformPoints(new
HandleRef
(this, this.NativeGraphics), unchecked((int)destSpace),
1099
int status = SafeNativeMethods.Gdip.GdipTransformPointsI(new
HandleRef
(this, this.NativeGraphics), unchecked((int)destSpace),
1124
int status = SafeNativeMethods.Gdip.GdipGetNearestColor(new
HandleRef
(this, this.NativeGraphics), ref nearest);
1152
int status = SafeNativeMethods.Gdip.GdipDrawLine(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x1, y1, x2, y2);
1184
int status = SafeNativeMethods.Gdip.GdipDrawLines(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1185
new
HandleRef
(this, buf), points.Length);
1208
int status = SafeNativeMethods.Gdip.GdipDrawLineI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x1, y1, x2, y2);
1240
int status = SafeNativeMethods.Gdip.GdipDrawLinesI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1241
new
HandleRef
(this, buf), points.Length);
1263
int status = SafeNativeMethods.Gdip.GdipDrawArc(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y,
1293
int status = SafeNativeMethods.Gdip.GdipDrawArcI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y,
1322
int status = SafeNativeMethods.Gdip.GdipDrawBezier(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x1, y1,
1356
int status = SafeNativeMethods.Gdip.GdipDrawBeziers(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1357
new
HandleRef
(this, buf), points.Length);
1393
int status = SafeNativeMethods.Gdip.GdipDrawBeziersI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1394
new
HandleRef
(this, buf), points.Length);
1427
int status = SafeNativeMethods.Gdip.GdipDrawRectangle(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y,
1446
int status = SafeNativeMethods.Gdip.GdipDrawRectangleI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y, width, height);
1469
int status = SafeNativeMethods.Gdip.GdipDrawRectangles(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1470
new
HandleRef
(this, buf), rects.Length);
1496
int status = SafeNativeMethods.Gdip.GdipDrawRectanglesI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1497
new
HandleRef
(this, buf), rects.Length);
1530
int status = SafeNativeMethods.Gdip.GdipDrawEllipse(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y,
1559
int status = SafeNativeMethods.Gdip.GdipDrawEllipseI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y,
1591
int status = SafeNativeMethods.Gdip.GdipDrawPie(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y, width,
1623
int status = SafeNativeMethods.Gdip.GdipDrawPieI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), x, y, width,
1644
int status = SafeNativeMethods.Gdip.GdipDrawPolygon(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1645
new
HandleRef
(this, buf), points.Length);
1669
int status = SafeNativeMethods.Gdip.GdipDrawPolygonI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1670
new
HandleRef
(this, buf), points.Length);
1693
int status = SafeNativeMethods.Gdip.GdipDrawPath(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen),
1694
new
HandleRef
(path, path.nativePath));
1716
int status = SafeNativeMethods.Gdip.GdipDrawCurve(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1742
int status = SafeNativeMethods.Gdip.GdipDrawCurve2(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1777
int status = SafeNativeMethods.Gdip.GdipDrawCurve3(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1804
int status = SafeNativeMethods.Gdip.GdipDrawCurveI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1829
int status = SafeNativeMethods.Gdip.GdipDrawCurve2I(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1855
int status = SafeNativeMethods.Gdip.GdipDrawCurve3I(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1883
int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1909
int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1935
int status = SafeNativeMethods.Gdip.GdipDrawClosedCurveI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1960
int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2I(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(pen, pen.NativePen), new
HandleRef
(this, buf),
1977
int status = SafeNativeMethods.Gdip.GdipGraphicsClear(new
HandleRef
(this, this.NativeGraphics), color.ToArgb());
2007
int status = SafeNativeMethods.Gdip.GdipFillRectangle(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush), x, y,
2036
int status = SafeNativeMethods.Gdip.GdipFillRectangleI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush), x, y, width, height);
2059
int status = SafeNativeMethods.Gdip.GdipFillRectangles(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2060
new
HandleRef
(this, buf), rects.Length);
2086
int status = SafeNativeMethods.Gdip.GdipFillRectanglesI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2087
new
HandleRef
(this, buf), rects.Length);
2123
int status = SafeNativeMethods.Gdip.GdipFillPolygon(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2124
new
HandleRef
(this, buf), points.Length, unchecked((int) fillMode));
2159
int status = SafeNativeMethods.Gdip.GdipFillPolygonI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2160
new
HandleRef
(this, buf), points.Length, unchecked((int) fillMode));
2193
int status = SafeNativeMethods.Gdip.GdipFillEllipse(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush), x, y,
2222
int status = SafeNativeMethods.Gdip.GdipFillEllipseI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush), x, y,
2255
int status = SafeNativeMethods.Gdip.GdipFillPie(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush), x, y,
2275
int status = SafeNativeMethods.Gdip.GdipFillPieI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush), x, y,
2294
int status = SafeNativeMethods.Gdip.GdipFillPath(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2295
new
HandleRef
(path, path.nativePath));
2318
int status = SafeNativeMethods.Gdip.GdipFillClosedCurve(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2319
new
HandleRef
(this, buf), points.Length);
2352
int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2353
new
HandleRef
(this, buf), points.Length,
2379
int status = SafeNativeMethods.Gdip.GdipFillClosedCurveI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2380
new
HandleRef
(this, buf), points.Length);
2410
int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2I(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2411
new
HandleRef
(this, buf), points.Length,
2435
int status = SafeNativeMethods.Gdip.GdipFillRegion(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(brush, brush.NativeBrush),
2436
new
HandleRef
(region, region.nativeRegion));
2502
int 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));
2526
int status = SafeNativeMethods.Gdip.GdipMeasureString(new
HandleRef
(this, this.NativeGraphics), text, text.Length, new
HandleRef
(font, font.NativeFont), ref grfLayout,
2527
new
HandleRef
(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat),
2556
int status = SafeNativeMethods.Gdip.GdipMeasureString(new
HandleRef
(this, this.NativeGraphics), text, text.Length, new
HandleRef
(font, font.NativeFont),
2558
new
HandleRef
(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat),
2592
int status = SafeNativeMethods.Gdip.GdipMeasureString(new
HandleRef
(this, this.NativeGraphics), text, text.Length, new
HandleRef
(font, font.NativeFont),
2594
new
HandleRef
(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat),
2641
int status = SafeNativeMethods.Gdip.GdipGetStringFormatMeasurableCharacterRangeCount(new
HandleRef
(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat)
2659
status = SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(new
HandleRef
(this, this.NativeGraphics), text, text.Length, new
HandleRef
(font, font.NativeFont), ref grf,
2660
new
HandleRef
(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat),
2763
int status = SafeNativeMethods.Gdip.GdipDrawImage(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(image, image.nativeImage),
2790
int status = SafeNativeMethods.Gdip.GdipDrawImageRect(new
HandleRef
(this, this.NativeGraphics),
2791
new
HandleRef
(image, image.nativeImage),
2819
int status = SafeNativeMethods.Gdip.GdipDrawImageI(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(image, image.nativeImage),
2846
int status = SafeNativeMethods.Gdip.GdipDrawImageRectI(new
HandleRef
(this, this.NativeGraphics),
2847
new
HandleRef
(image, image.nativeImage),
2932
int status = SafeNativeMethods.Gdip.GdipDrawImagePoints(new
HandleRef
(this, this.NativeGraphics),
2933
new
HandleRef
(image, image.nativeImage),
2934
new
HandleRef
(this, buf), count);
2965
int status = SafeNativeMethods.Gdip.GdipDrawImagePointsI(new
HandleRef
(this, this.NativeGraphics),
2966
new
HandleRef
(image, image.nativeImage),
2967
new
HandleRef
(this, buf), count);
2996
new
HandleRef
(this, this.NativeGraphics),
2997
new
HandleRef
(image, image.nativeImage),
3024
new
HandleRef
(this, this.NativeGraphics),
3025
new
HandleRef
(image, image.nativeImage),
3052
new
HandleRef
(this, this.NativeGraphics),
3053
new
HandleRef
(image, image.nativeImage),
3086
new
HandleRef
(this, this.NativeGraphics),
3087
new
HandleRef
(image, image.nativeImage),
3126
new
HandleRef
(this, this.NativeGraphics),
3127
new
HandleRef
(image, image.nativeImage),
3128
new
HandleRef
(this, buf),
3184
new
HandleRef
(this, this.NativeGraphics),
3185
new
HandleRef
(image, image.nativeImage),
3186
new
HandleRef
(this, buf),
3193
new
HandleRef
(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)),
3195
new
HandleRef
(null, (IntPtr)callbackData));
3250
new
HandleRef
(this, this.NativeGraphics),
3251
new
HandleRef
(image, image.nativeImage),
3252
new
HandleRef
(this, buf),
3259
new
HandleRef
(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)),
3261
new
HandleRef
(null, (IntPtr)callbackData));
3308
new
HandleRef
(this, this.NativeGraphics),
3309
new
HandleRef
(image, image.nativeImage),
3319
new
HandleRef
(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)),
3321
new
HandleRef
(null, callbackData));
3363
new
HandleRef
(this, this.NativeGraphics),
3364
new
HandleRef
(image, image.nativeImage),
3374
new
HandleRef
(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)),
3376
new
HandleRef
(null, callbackData));
3408
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoint(new
HandleRef
(this, this.NativeGraphics),
3409
new
HandleRef
(metafile, mf),
3412
new
HandleRef
(null, callbackData),
3413
new
HandleRef
(imageAttr, ia));
3443
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointI(new
HandleRef
(this, this.NativeGraphics),
3444
new
HandleRef
(metafile, mf),
3447
new
HandleRef
(null, callbackData),
3448
new
HandleRef
(imageAttr, ia));
3481
new
HandleRef
(this, this.NativeGraphics),
3482
new
HandleRef
(metafile, mf),
3485
new
HandleRef
(null, callbackData),
3486
new
HandleRef
(imageAttr, ia));
3517
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestRectI(new
HandleRef
(this, this.NativeGraphics),
3518
new
HandleRef
(metafile, mf),
3521
new
HandleRef
(null, callbackData),
3522
new
HandleRef
(imageAttr, ia));
3560
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoints(new
HandleRef
(this, this.NativeGraphics),
3561
new
HandleRef
(metafile, mf),
3565
new
HandleRef
(null, callbackData),
3566
new
HandleRef
(imageAttr, ia));
3606
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointsI(new
HandleRef
(this, this.NativeGraphics),
3607
new
HandleRef
(metafile, mf),
3611
new
HandleRef
(null, callbackData),
3612
new
HandleRef
(imageAttr, ia));
3648
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoint(new
HandleRef
(this, this.NativeGraphics),
3649
new
HandleRef
(metafile, mf),
3654
new
HandleRef
(null, callbackData),
3655
new
HandleRef
(imageAttr, ia));
3691
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointI(new
HandleRef
(this, this.NativeGraphics),
3692
new
HandleRef
(metafile, mf),
3697
new
HandleRef
(null, callbackData),
3698
new
HandleRef
(imageAttr, ia));
3735
new
HandleRef
(this, this.NativeGraphics),
3736
new
HandleRef
(metafile, mf),
3741
new
HandleRef
(null, callbackData),
3742
new
HandleRef
(imageAttr, ia));
3781
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestRectI(new
HandleRef
(this, this.NativeGraphics),
3782
new
HandleRef
(metafile, mf),
3787
new
HandleRef
(null, callbackData),
3788
new
HandleRef
(imageAttr, ia));
3840
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoints(new
HandleRef
(this, this.NativeGraphics),
3841
new
HandleRef
(metafile, mf),
3847
new
HandleRef
(null, callbackData),
3848
new
HandleRef
(imageAttr, ia));
3902
int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointsI(new
HandleRef
(this, this.NativeGraphics),
3903
new
HandleRef
(metafile, mf),
3909
new
HandleRef
(null, callbackData),
3910
new
HandleRef
(imageAttr, ia));
3940
int status = SafeNativeMethods.Gdip.GdipSetClipGraphics(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(g, g.NativeGraphics), combineMode);
3958
int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
3977
int status = SafeNativeMethods.Gdip.GdipSetClipRect(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
3999
int status = SafeNativeMethods.Gdip.GdipSetClipPath(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(path, path.nativePath), combineMode);
4014
int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(region, region.nativeRegion), combineMode);
4025
int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
4037
int status = SafeNativeMethods.Gdip.GdipSetClipRect(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
4052
int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(region, region.nativeRegion),
4064
int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
4079
int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new
HandleRef
(this, this.NativeGraphics),
4080
new
HandleRef
(region, region.nativeRegion),
4092
int status = SafeNativeMethods.Gdip.GdipResetClip(new
HandleRef
(this, this.NativeGraphics));
4103
int status = SafeNativeMethods.Gdip.GdipTranslateClip(new
HandleRef
(this, this.NativeGraphics), dx, dy);
4114
int status = SafeNativeMethods.Gdip.GdipTranslateClip(new
HandleRef
(this, this.NativeGraphics), dx, dy);
4203
int status = SafeNativeMethods.Gdip.GdipGetClip(new
HandleRef
(this, this.NativeGraphics), new
HandleRef
(region, region.nativeRegion));
4223
int status = SafeNativeMethods.Gdip.GdipGetClipBounds(new
HandleRef
(this, this.NativeGraphics), ref rect);
4240
int status = SafeNativeMethods.Gdip.GdipIsClipEmpty(new
HandleRef
(this, this.NativeGraphics), out isEmpty);
4267
int status = SafeNativeMethods.Gdip.GdipGetVisibleClipBounds(new
HandleRef
(this, this.NativeGraphics), ref rect);
4287
int status = SafeNativeMethods.Gdip.GdipIsVisibleClipEmpty(new
HandleRef
(this, this.NativeGraphics), out isEmpty);
4311
int status = SafeNativeMethods.Gdip.GdipIsVisiblePointI(new
HandleRef
(this, this.NativeGraphics), point.X, point.Y, out isVisible);
4333
int status = SafeNativeMethods.Gdip.GdipIsVisiblePoint(new
HandleRef
(this, this.NativeGraphics), point.X, point.Y, out isVisible);
4355
int status = SafeNativeMethods.Gdip.GdipIsVisibleRectI(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
4378
int status = SafeNativeMethods.Gdip.GdipIsVisibleRect(new
HandleRef
(this, this.NativeGraphics), rect.X, rect.Y,
4433
int status = SafeNativeMethods.Gdip.GdipSaveGraphics(new
HandleRef
(this, this.NativeGraphics), out state);
4451
int status = SafeNativeMethods.Gdip.GdipRestoreGraphics(new
HandleRef
(this, this.NativeGraphics), gstate.nativeState);
4477
int status = SafeNativeMethods.Gdip.GdipBeginContainer(new
HandleRef
(this, this.NativeGraphics), ref dstf,
4500
int status = SafeNativeMethods.Gdip.GdipBeginContainer2(new
HandleRef
(this, this.NativeGraphics), out state);
4521
int status = SafeNativeMethods.Gdip.GdipEndContainer(new
HandleRef
(this, this.NativeGraphics), container.nativeGraphicsContainer);
4543
int status = SafeNativeMethods.Gdip.GdipBeginContainerI(new
HandleRef
(this, this.NativeGraphics), ref gpDest,
4565
int status = SafeNativeMethods.Gdip.GdipComment(new
HandleRef
(this, this.NativeGraphics), data.Length, data);
4597
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, halftonePalette));
commonui\System\Drawing\Icon.cs (19)
144
handle = SafeNativeMethods.CopyImage(new
HandleRef
(original, original.Handle), SafeNativeMethods.IMAGE_ICON, iconSize.Width, iconSize.Height, 0);
327
SafeNativeMethods.GetIconInfo(new
HandleRef
(this, Handle), info);
331
SafeNativeMethods.GetObject(new
HandleRef
(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp);
332
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, info.hbmColor));
336
SafeNativeMethods.GetObject(new
HandleRef
(null, info.hbmMask), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp);
341
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, info.hbmMask));
383
SafeNativeMethods.DestroyIcon(new
HandleRef
(this, handle));
475
SafeNativeMethods.IntersectClipRect(new
HandleRef
(this, dc), targetX, targetY, targetX+clipWidth, targetY+clipHeight);
476
SafeNativeMethods.DrawIconEx(new
HandleRef
(null, dc),
479
new
HandleRef
(this, handle),
629
bitDepth = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), SafeNativeMethods.BITSPIXEL);
630
bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), SafeNativeMethods.PLANES);
631
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, dc));
916
UnsafeNativeMethods.CopyMemory(new
HandleRef
(this, destPtr), new
HandleRef
(this, srcPtr), Math.Abs(targetData.Stride));
1001
SafeNativeMethods.GetIconInfo(new
HandleRef
(this, handle), info);
1005
SafeNativeMethods.GetObject(new
HandleRef
(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp);
1049
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, info.hbmColor));
1051
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, info.hbmMask));
commonui\System\Drawing\Image.cs (52)
201
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, image));
204
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, image));
273
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, image));
276
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, image));
299
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, image));
302
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, image));
310
status = SafeNativeMethods.Gdip.GdipGetImageType(new
HandleRef
(this, nativeImage), out type);
334
int status = SafeNativeMethods.Gdip.GdipCloneImage(new
HandleRef
(this, nativeImage), out cloneImage);
339
status = SafeNativeMethods.Gdip.GdipImageForceValidation(new
HandleRef
(null, cloneImage));
342
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(null, cloneImage));
373
SafeNativeMethods.Gdip.GdipDisposeImage(new
HandleRef
(this, nativeImage));
488
int status = SafeNativeMethods.Gdip.GdipGetImageType(new
HandleRef
(null, nativeImage), out type);
532
int status = SafeNativeMethods.Gdip.GdipGetEncoderParameterListSize(new
HandleRef
(this, nativeImage),
543
status = SafeNativeMethods.Gdip.GdipGetEncoderParameterList(new
HandleRef
(this, nativeImage),
628
status = SafeNativeMethods.Gdip.GdipSaveImageToFile(new
HandleRef
(this, nativeImage),
631
new
HandleRef
(encoderParams, encoderParamsMemory));
716
status = SafeNativeMethods.Gdip.GdipSaveImageToStream(new
HandleRef
(this, nativeImage),
719
new
HandleRef
(encoderParams, encoderParamsMemory));
748
int status = SafeNativeMethods.Gdip.GdipSaveAdd(new
HandleRef
(this, nativeImage), new
HandleRef
(encoderParams, encoder));
777
int status = SafeNativeMethods.Gdip.GdipSaveAddImage(new
HandleRef
(this, nativeImage), new
HandleRef
(image, image.nativeImage), new
HandleRef
(encoderParams, encoder));
794
int status = SafeNativeMethods.Gdip.GdipGetImageDimension(new
HandleRef
(this, nativeImage), out width, out height);
838
int status = SafeNativeMethods.Gdip.GdipGetImageWidth(new
HandleRef
(this, nativeImage), out width);
860
int status = SafeNativeMethods.Gdip.GdipGetImageHeight(new
HandleRef
(this, nativeImage), out height);
878
int status = SafeNativeMethods.Gdip.GdipGetImageHorizontalResolution(new
HandleRef
(this, nativeImage), out horzRes);
896
int status = SafeNativeMethods.Gdip.GdipGetImageVerticalResolution(new
HandleRef
(this, nativeImage), out vertRes);
914
int status = SafeNativeMethods.Gdip.GdipGetImageFlags(new
HandleRef
(this, nativeImage), out flags);
931
int status = SafeNativeMethods.Gdip.GdipGetImageRawFormat(new
HandleRef
(this, nativeImage), ref guid);
949
int status = SafeNativeMethods.Gdip.GdipGetImagePixelFormat(new
HandleRef
(this, nativeImage), out format);
967
int status = SafeNativeMethods.Gdip.GdipGetImageBounds(new
HandleRef
(this, nativeImage), ref gprectf, out pageUnit);
978
int status = SafeNativeMethods.Gdip.GdipGetImagePaletteSize(new
HandleRef
(this, nativeImage), out size);
995
status = SafeNativeMethods.Gdip.GdipGetImagePalette(new
HandleRef
(this, nativeImage), memory, size);
1014
int status = SafeNativeMethods.Gdip.GdipSetImagePalette(new
HandleRef
(this, nativeImage), memory);
1050
int status = SafeNativeMethods.Gdip.GdipGetImageThumbnail(new
HandleRef
(this, nativeImage), thumbWidth, thumbHeight, out thumbImage,
1073
int status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsCount(new
HandleRef
(this, nativeImage), out count);
1091
status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsList(new
HandleRef
(this, nativeImage), buffer, count);
1124
int status = SafeNativeMethods.Gdip.GdipImageGetFrameCount(new
HandleRef
(this, nativeImage), ref dimensionID, count);
1143
int status = SafeNativeMethods.Gdip.GdipImageSelectActiveFrame(new
HandleRef
(this, nativeImage), ref dimensionID, frameIndex);
1158
int status = SafeNativeMethods.Gdip.GdipImageRotateFlip(new
HandleRef
(this, nativeImage), unchecked((int) rotateFlipType));
1176
int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new
HandleRef
(this, nativeImage), out count);
1187
status = SafeNativeMethods.Gdip.GdipGetPropertyIdList(new
HandleRef
(this, nativeImage), count, propid);
1205
int status = SafeNativeMethods.Gdip.GdipGetPropertyItemSize(new
HandleRef
(this, nativeImage), propid, out size);
1218
status = SafeNativeMethods.Gdip.GdipGetPropertyItem(new
HandleRef
(this, nativeImage), propid, size, propdata);
1240
int status = SafeNativeMethods.Gdip.GdipRemovePropertyItem(new
HandleRef
(this, nativeImage), propid);
1256
int status = SafeNativeMethods.Gdip.GdipSetPropertyItem(new
HandleRef
(this, nativeImage), propItemInternal);
1273
int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new
HandleRef
(this, nativeImage), out count);
1278
status = SafeNativeMethods.Gdip.GdipGetPropertySize(new
HandleRef
(this, nativeImage), out size, ref count);
1288
status = SafeNativeMethods.Gdip.GdipGetAllPropertyItems(new
HandleRef
(this, nativeImage), size, count, propdata);
1340
int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHBITMAP(new
HandleRef
(null, hbitmap), new
HandleRef
(null, hpalette), out bitmap);
commonui\System\Drawing\NativeMethods.cs (1)
19
internal static HandleRef NullHandleRef = new
HandleRef
(null, IntPtr.Zero);
commonui\System\Drawing\Pen.cs (52)
120
int status = SafeNativeMethods.Gdip.GdipCreatePen2(new
HandleRef
(brush, brush.NativeBrush),
166
int status = SafeNativeMethods.Gdip.GdipClonePen(new
HandleRef
(this, this.NativePen), out clonePen);
213
SafeNativeMethods.Gdip.GdipDeletePen(new
HandleRef
(this, this.NativePen));
252
int status = SafeNativeMethods.Gdip.GdipGetPenWidth(new
HandleRef
(this, this.NativePen), width);
265
int status = SafeNativeMethods.Gdip.GdipSetPenWidth(new
HandleRef
(this, this.NativePen), value);
285
int status = SafeNativeMethods.Gdip.GdipSetPenLineCap197819(new
HandleRef
(this, this.NativePen),
303
int status = SafeNativeMethods.Gdip.GdipGetPenStartCap(new
HandleRef
(this, this.NativePen), out startCap);
331
int status = SafeNativeMethods.Gdip.GdipSetPenStartCap(new
HandleRef
(this, this.NativePen), unchecked((int)value));
349
int status = SafeNativeMethods.Gdip.GdipGetPenEndCap(new
HandleRef
(this, this.NativePen), out endCap);
378
int status = SafeNativeMethods.Gdip.GdipSetPenEndCap(new
HandleRef
(this, this.NativePen), unchecked((int)value));
394
int status = SafeNativeMethods.Gdip.GdipGetPenDashCap197819(new
HandleRef
(this, this.NativePen), out dashCap);
415
int status = SafeNativeMethods.Gdip.GdipSetPenDashCap197819(new
HandleRef
(this, this.NativePen), unchecked((int)value));
434
int status = SafeNativeMethods.Gdip.GdipGetPenLineJoin(new
HandleRef
(this, this.NativePen), out lineJoin);
452
int status = SafeNativeMethods.Gdip.GdipSetPenLineJoin(new
HandleRef
(this, this.NativePen), unchecked((int)value));
473
int status = SafeNativeMethods.Gdip.GdipGetPenCustomStartCap(new
HandleRef
(this, this.NativePen), out lineCap);
485
int status = SafeNativeMethods.Gdip.GdipSetPenCustomStartCap(new
HandleRef
(this, this.NativePen),
486
new
HandleRef
(value, (value == null) ? IntPtr.Zero : value.nativeCap));
507
int status = SafeNativeMethods.Gdip.GdipGetPenCustomEndCap(new
HandleRef
(this, this.NativePen), out lineCap);
519
int status = SafeNativeMethods.Gdip.GdipSetPenCustomEndCap(new
HandleRef
(this, this.NativePen),
520
new
HandleRef
(value, (value == null) ? IntPtr.Zero : value.nativeCap));
536
int status = SafeNativeMethods.Gdip.GdipGetPenMiterLimit(new
HandleRef
(this, this.NativePen), miterLimit);
548
int status = SafeNativeMethods.Gdip.GdipSetPenMiterLimit(new
HandleRef
(this, this.NativePen), value);
570
int status = SafeNativeMethods.Gdip.GdipGetPenMode(new
HandleRef
(this, this.NativePen), out penMode);
588
int status = SafeNativeMethods.Gdip.GdipSetPenMode(new
HandleRef
(this, this.NativePen), value);
610
int status = SafeNativeMethods.Gdip.GdipGetPenTransform(new
HandleRef
(this, this.NativePen), new
HandleRef
(matrix, matrix.nativeMatrix));
626
int status = SafeNativeMethods.Gdip.GdipSetPenTransform(new
HandleRef
(this, this.NativePen), new
HandleRef
(value, value.nativeMatrix));
640
int status = SafeNativeMethods.Gdip.GdipResetPenTransform(new
HandleRef
(this, this.NativePen));
667
int status = SafeNativeMethods.Gdip.GdipMultiplyPenTransform(new
HandleRef
(this, this.NativePen),
668
new
HandleRef
(matrix, matrix.nativeMatrix),
693
int status = SafeNativeMethods.Gdip.GdipTranslatePenTransform(new
HandleRef
(this, this.NativePen),
717
int status = SafeNativeMethods.Gdip.GdipScalePenTransform(new
HandleRef
(this, this.NativePen),
741
int status = SafeNativeMethods.Gdip.GdipRotatePenTransform(new
HandleRef
(this, this.NativePen),
756
int status = SafeNativeMethods.Gdip.GdipSetPenColor(new
HandleRef
(this, this.NativePen),
774
int status = SafeNativeMethods.Gdip.GdipGetPenFillType(new
HandleRef
(this, this.NativePen), out type);
793
int status = SafeNativeMethods.Gdip.GdipGetPenColor(new
HandleRef
(this, this.NativePen), out colorARGB);
867
int status = SafeNativeMethods.Gdip.GdipSetPenBrushFill(new
HandleRef
(this, this.NativePen),
868
new
HandleRef
(value, value.NativeBrush));
879
int status = SafeNativeMethods.Gdip.GdipGetPenBrushFill(new
HandleRef
(this, this.NativePen), out nativeBrush);
900
int status = SafeNativeMethods.Gdip.GdipGetPenDashStyle(new
HandleRef
(this, this.NativePen), out dashstyle);
919
int status = SafeNativeMethods.Gdip.GdipSetPenDashStyle(new
HandleRef
(this, this.NativePen), unchecked((int)value));
941
int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new
HandleRef
(this, this.NativePen), out retval);
962
int status = SafeNativeMethods.Gdip.GdipGetPenDashOffset(new
HandleRef
(this, this.NativePen), dashoffset);
973
int status = SafeNativeMethods.Gdip.GdipSetPenDashOffset(new
HandleRef
(this, this.NativePen), value);
995
int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new
HandleRef
(this, this.NativePen), out retval);
1006
status = SafeNativeMethods.Gdip.GdipGetPenDashArray(new
HandleRef
(this, this.NativePen), buf, count);
1041
int status = SafeNativeMethods.Gdip.GdipSetPenDashArray(new
HandleRef
(this, this.NativePen), new
HandleRef
(buf, buf), count);
1063
int status = SafeNativeMethods.Gdip.GdipGetPenCompoundCount(new
HandleRef
(this, this.NativePen), out count);
1070
status = SafeNativeMethods.Gdip.GdipGetPenCompoundArray(new
HandleRef
(this, this.NativePen), array, count);
1080
int status = SafeNativeMethods.Gdip.GdipSetPenCompoundArray(new
HandleRef
(this, this.NativePen), value, value.Length);
commonui\System\Drawing\Printing\DefaultPrintController.cs (13)
70
int result = SafeNativeMethods.StartDoc(new
HandleRef
(this.dc, dc.Hdc), info);
102
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(this, modeHandle));
104
IntPtr result = SafeNativeMethods.ResetDC(new
HandleRef
(this.dc, dc.Hdc), new
HandleRef
(null, modePointer));
108
SafeNativeMethods.GlobalUnlock(new
HandleRef
(this, modeHandle));
125
int dpiX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
126
int dpiY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
127
int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
128
int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
137
int result2 = SafeNativeMethods.StartPage(new
HandleRef
(this.dc, dc.Hdc));
160
int result = SafeNativeMethods.EndPage(new
HandleRef
(this.dc, dc.Hdc));
191
int result = (e.Cancel) ? SafeNativeMethods.AbortDoc(new
HandleRef
(dc, dc.Hdc)) : SafeNativeMethods.EndDoc(new
HandleRef
(dc, dc.Hdc));
commonui\System\Drawing\Printing\PageSettings.cs (23)
73
SafeNativeMethods.GlobalFree(new
HandleRef
(this, modeHandle));
113
int dpiX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
114
int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
143
int dpiY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
144
int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
211
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(this, modeHandle));
216
SafeNativeMethods.GlobalUnlock(new
HandleRef
(this, modeHandle));
217
SafeNativeMethods.GlobalFree(new
HandleRef
(this, modeHandle));
239
HandleRef hdc = new
HandleRef
(dc, dc.Hdc);
283
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(this, modeHandle));
288
SafeNativeMethods.GlobalUnlock(new
HandleRef
(this, modeHandle));
289
SafeNativeMethods.GlobalFree(new
HandleRef
(this, modeHandle));
338
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, hdevmode));
421
SafeNativeMethods.GlobalFree(new
HandleRef
(null, modePointer));
425
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hdevmode));
431
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(this, modeHandle));
436
SafeNativeMethods.GlobalUnlock(new
HandleRef
(this, modeHandle));
437
SafeNativeMethods.GlobalFree(new
HandleRef
(this, modeHandle));
473
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, modeHandle));
478
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, modeHandle));
481
SafeNativeMethods.GlobalFree(new
HandleRef
(null, modeHandle));
557
IntPtr pointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, hdevmode));
574
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hdevmode));
commonui\System\Drawing\Printing\PreviewPrintController.cs (4)
134
int dpiX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
135
int dpiY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
136
int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
137
int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrintController.cs (1)
60
SafeNativeMethods.GlobalFree(new
HandleRef
(this, handle));
commonui\System\Drawing\Printing\PrinterSettings.cs (40)
532
HandleRef hdc = new
HandleRef
(dc, dc.Hdc);
575
HandleRef hdc = new
HandleRef
(dc, dc.Hdc);
659
SafeNativeMethods.GlobalFree(new
HandleRef
(null, modeHandle));
667
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, hdevmode));
668
DeviceContext dc = DeviceContext.CreateDC(DriverName, PrinterNameInternal, (string) null, new
HandleRef
(null, modePointer));
669
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hdevmode));
696
SafeNativeMethods.GlobalFree(new
HandleRef
(null, modeHandle));
705
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, hdevmode));
706
DeviceContext dc = DeviceContext.CreateIC(DriverName, PrinterNameInternal, (string) null, new
HandleRef
(null, modePointer));
707
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hdevmode));
863
IntPtr names = SafeNativeMethods.GlobalLock(new
HandleRef
(data, handle));
868
SafeNativeMethods.GlobalUnlock(new
HandleRef
(data, handle));
872
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
873
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
886
IntPtr names = SafeNativeMethods.GlobalLock(new
HandleRef
(data, handle));
891
SafeNativeMethods.GlobalUnlock(new
HandleRef
(data, handle));
895
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
896
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
918
IntPtr names = SafeNativeMethods.GlobalLock(new
HandleRef
(data, handle));
924
SafeNativeMethods.GlobalUnlock(new
HandleRef
(data, handle));
928
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
929
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
942
IntPtr names = SafeNativeMethods.GlobalLock(new
HandleRef
(data, handle));
948
SafeNativeMethods.GlobalUnlock(new
HandleRef
(data, handle));
952
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
953
SafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
967
result = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), capability);
1011
IntPtr pointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, handle));
1055
SafeNativeMethods.GlobalFree(new
HandleRef
(null, handle));
1056
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
1061
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
1111
IntPtr namesPointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, handle));
1121
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
1147
IntPtr modePointer = SafeNativeMethods.GlobalLock(new
HandleRef
(this, modeHandle));
1167
SafeNativeMethods.GlobalUnlock(new
HandleRef
(this, modeHandle));
1172
SafeNativeMethods.GlobalFree(new
HandleRef
(this, modeHandle));
1318
IntPtr pointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, hdevmode));
1347
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hdevmode));
1362
IntPtr namesPointer = SafeNativeMethods.GlobalLock(new
HandleRef
(null, hdevnames));
1370
SafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hdevnames));
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (4)
55
int dpiX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
56
int dpiY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
57
int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
58
int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Region.cs (66)
114
int status = SafeNativeMethods.Gdip.GdipCreateRegionPath(new
HandleRef
(path, path.nativePath), out region);
160
int status = SafeNativeMethods.Gdip.GdipCreateRegionHrgn(new
HandleRef
(null, hrgn), out region);
187
int status = SafeNativeMethods.Gdip.GdipCloneRegion(new
HandleRef
(this, nativeRegion), out region);
219
SafeNativeMethods.Gdip.GdipDeleteRegion(new
HandleRef
(this, nativeRegion));
256
int status = SafeNativeMethods.Gdip.GdipSetInfinite(new
HandleRef
(this, nativeRegion));
268
int status = SafeNativeMethods.Gdip.GdipSetEmpty(new
HandleRef
(this, nativeRegion));
282
int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new
HandleRef
(this, nativeRegion), ref gprectf, CombineMode.Intersect);
298
int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new
HandleRef
(this, nativeRegion), ref gprect, CombineMode.Intersect);
315
int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new
HandleRef
(this, nativeRegion), new
HandleRef
(path, path.nativePath), CombineMode.Intersect);
332
int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(region, region.nativeRegion), CombineMode.Intersect);
349
SafeNativeMethods.IntDeleteObject(new
HandleRef
(this, regionHandle));
362
int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new
HandleRef
(this, nativeRegion), ref gprectf, CombineMode.Union);
376
int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new
HandleRef
(this, nativeRegion), ref gprect, CombineMode.Union);
391
int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new
HandleRef
(this, nativeRegion), new
HandleRef
(path, path.nativePath), CombineMode.Union);
407
int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(region, region.nativeRegion), CombineMode.Union);
421
int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new
HandleRef
(this, nativeRegion), ref gprectf, CombineMode.Xor);
435
int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new
HandleRef
(this, nativeRegion), ref gprect, CombineMode.Xor);
450
int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new
HandleRef
(this, nativeRegion), new
HandleRef
(path, path.nativePath), CombineMode.Xor);
465
int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(region, region.nativeRegion), CombineMode.Xor);
479
int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new
HandleRef
(this, nativeRegion), ref gprectf, CombineMode.Exclude);
493
int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new
HandleRef
(this, nativeRegion), ref gprect, CombineMode.Exclude);
508
int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new
HandleRef
(this, nativeRegion), new
HandleRef
(path, path.nativePath),
524
int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(region, region.nativeRegion),
539
int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new
HandleRef
(this, nativeRegion), ref gprectf, CombineMode.Complement);
553
int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new
HandleRef
(this, nativeRegion), ref gprect, CombineMode.Complement);
569
int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new
HandleRef
(this, nativeRegion), new
HandleRef
(path, path.nativePath), CombineMode.Complement);
586
int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(region, region.nativeRegion), CombineMode.Complement);
601
int status = SafeNativeMethods.Gdip.GdipTranslateRegion(new
HandleRef
(this, nativeRegion), dx, dy);
613
int status = SafeNativeMethods.Gdip.GdipTranslateRegionI(new
HandleRef
(this, nativeRegion), dx, dy);
628
int status = SafeNativeMethods.Gdip.GdipTransformRegion(new
HandleRef
(this, nativeRegion),
629
new
HandleRef
(matrix, matrix.nativeMatrix));
649
int status = SafeNativeMethods.Gdip.GdipGetRegionBounds(new
HandleRef
(this, nativeRegion), new
HandleRef
(g, g.NativeGraphics), ref gprectf);
672
int status = SafeNativeMethods.Gdip.GdipGetRegionHRgn(new
HandleRef
(this, nativeRegion), new
HandleRef
(g, g.NativeGraphics), out hrgn);
692
int status = SafeNativeMethods.Gdip.GdipIsEmptyRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(g, g.NativeGraphics), out isEmpty);
712
int status = SafeNativeMethods.Gdip.GdipIsInfiniteRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(g, g.NativeGraphics), out isInfinite);
736
int status = SafeNativeMethods.Gdip.GdipIsEqualRegion(new
HandleRef
(this, nativeRegion), new
HandleRef
(region, region.nativeRegion), new
HandleRef
(g, g.NativeGraphics), out isEqual);
753
int status = SafeNativeMethods.Gdip.GdipGetRegionDataSize(new
HandleRef
(this, nativeRegion), out regionSize);
763
status = SafeNativeMethods.Gdip.GdipGetRegionData(new
HandleRef
(this, nativeRegion), regionData, regionSize, out regionSize);
817
int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPoint(new
HandleRef
(this, nativeRegion), point.X, point.Y,
818
new
HandleRef
(g, (g==null) ? IntPtr.Zero : g.NativeGraphics),
869
int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRect(new
HandleRef
(this, nativeRegion), rect.X, rect.Y,
871
new
HandleRef
(g, (g==null) ? IntPtr.Zero : g.NativeGraphics),
912
int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPointI(new
HandleRef
(this, nativeRegion), point.X, point.Y,
913
new
HandleRef
(g, (g == null) ? IntPtr.Zero : g.NativeGraphics),
966
int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRectI(new
HandleRef
(this, nativeRegion), rect.X, rect.Y,
968
new
HandleRef
(g, (g == null) ? IntPtr.Zero : g.NativeGraphics),
993
int status = SafeNativeMethods.Gdip.GdipGetRegionScansCount(new
HandleRef
(this, nativeRegion),
995
new
HandleRef
(matrix, matrix.nativeMatrix));
1005
status = SafeNativeMethods.Gdip.GdipGetRegionScans(new
HandleRef
(this, nativeRegion),
1008
new
HandleRef
(matrix, matrix.nativeMatrix));
commonui\System\Drawing\SolidBrush.cs (3)
81
int status = SafeNativeMethods.Gdip.GdipCloneBrush(new
HandleRef
(this, this.NativeBrush), out cloneBrush);
116
int status = SafeNativeMethods.Gdip.GdipGetSolidFillColor(new
HandleRef
(this, this.NativeBrush), out colorARGB);
152
int status = SafeNativeMethods.Gdip.GdipSetSolidFillColor(new
HandleRef
(this, this.NativeBrush), value.ToArgb());
misc\DbgUtil.cs (2)
241
new
HandleRef
(null, IntPtr.Zero),
246
new
HandleRef
(null, IntPtr.Zero) );
misc\DpiHelper.cs (2)
111
deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), CAPS.LOGPIXELSX);
113
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
misc\GDI\DeviceContext.cs (27)
181
hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_PEN);
182
hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_BRUSH);
183
hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_BITMAP);
184
hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_FONT);
194
IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( this, hInitialPen));
202
IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( this, hInitialBrush));
210
IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( this, hInitialBmp));
218
IntUnsafeNativeMethods.DeleteObject(new
HandleRef
(this, handleToDelete));
257
this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new
HandleRef
( this, this.hDC) );
310
IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new
HandleRef
(null, hdc) );
386
IntUnsafeNativeMethods.DeleteHDC(new
HandleRef
(this, this.hDC));
398
IntUnsafeNativeMethods.DeleteDC(new
HandleRef
(this, this.hDC));
437
this.hDC = IntUnsafeNativeMethods.GetDC(new
HandleRef
(this, this.hWnd));
459
IntUnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, this.hWnd), new
HandleRef
(this, this.hDC));
479
return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new
HandleRef
( this, this.Hdc ) );
496
return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new
HandleRef
( this, this.Hdc ), unchecked((int) newMode));
516
IntUnsafeNativeMethods.RestoreDC(new
HandleRef
(this, this.hDC), -1);
567
HandleRef hdc = new
HandleRef
( this, this.Hdc);
605
HandleRef hdc = new
HandleRef
(this, this.Hdc);
606
HandleRef hRegion = new
HandleRef
(region, region.HRegion);
626
int result = IntUnsafeNativeMethods.GetClipRgn(new
HandleRef
( this, this.Hdc), new
HandleRef
(clip, clip.HRegion));
649
IntUnsafeNativeMethods.OffsetViewportOrgEx( new
HandleRef
( this, this.Hdc ), dx, dy, orgn );
misc\GDI\WindowsRegion.cs (5)
126
return IntUnsafeNativeMethods.CombineRgn(new
HandleRef
(this, this.HRegion), new
HandleRef
(region1, region1.HRegion), new
HandleRef
(region2, region2.HRegion), mode);
152
IntUnsafeNativeMethods.DeleteObject(new
HandleRef
(this, this.nativeHandle));
195
IntUnsafeNativeMethods.GetRgnBox(new
HandleRef
(this, this.nativeHandle), ref rect);
System.IdentityModel.Selectors (1)
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (1)
510
HandleRef data = new
HandleRef
(handle, stringsRootHandle.AddrOfPinnedObject());
System.ServiceModel.Internals (1)
System\Runtime\Diagnostics\EventLogger.cs (1)
307
HandleRef 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)
26
ImpersonateToken(new
HandleRef
(this, token));
43
_savedToken = new
HandleRef
(this, IntPtr.Zero);
52
_savedToken = new
HandleRef
(this, GetCurrentToken());
144
ImpersonateToken(new
HandleRef
(this, IntPtr.Zero));
150
ImpersonateToken(new
HandleRef
(this, HostingEnvironment.ApplicationIdentityToken));
185
ImpersonateToken(new
HandleRef
(this, token));
State\OutOfProcStateClientManager.cs (7)
292
socketHandle = new
HandleRef
(this, conn._socketHandle.Handle);
295
socketHandle = new
HandleRef
(this, INVALID_SOCKET);
346
conn._socketHandle = new
HandleRef
(this, results.socket);
510
UnsafeNativeMethods.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)
241
new
HandleRef
(null, IntPtr.Zero),
246
new
HandleRef
(null, IntPtr.Zero) );
misc\DpiHelper.cs (2)
111
deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), CAPS.LOGPIXELSX);
113
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
misc\GDI\DeviceContext.cs (27)
181
hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_PEN);
182
hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_BRUSH);
183
hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_BITMAP);
184
hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_FONT);
194
IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( this, hInitialPen));
202
IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( this, hInitialBrush));
210
IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( this, hInitialBmp));
218
IntUnsafeNativeMethods.DeleteObject(new
HandleRef
(this, handleToDelete));
257
this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new
HandleRef
( this, this.hDC) );
310
IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new
HandleRef
(null, hdc) );
386
IntUnsafeNativeMethods.DeleteHDC(new
HandleRef
(this, this.hDC));
398
IntUnsafeNativeMethods.DeleteDC(new
HandleRef
(this, this.hDC));
437
this.hDC = IntUnsafeNativeMethods.GetDC(new
HandleRef
(this, this.hWnd));
459
IntUnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, this.hWnd), new
HandleRef
(this, this.hDC));
479
return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new
HandleRef
( this, this.Hdc ) );
496
return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new
HandleRef
( this, this.Hdc ), unchecked((int) newMode));
516
IntUnsafeNativeMethods.RestoreDC(new
HandleRef
(this, this.hDC), -1);
567
HandleRef hdc = new
HandleRef
( this, this.Hdc);
605
HandleRef hdc = new
HandleRef
(this, this.Hdc);
606
HandleRef hRegion = new
HandleRef
(region, region.HRegion);
626
int result = IntUnsafeNativeMethods.GetClipRgn(new
HandleRef
( this, this.Hdc), new
HandleRef
(clip, clip.HRegion));
649
IntUnsafeNativeMethods.OffsetViewportOrgEx( new
HandleRef
( this, this.Hdc ), dx, dy, orgn );
misc\GDI\DeviceContext2.cs (24)
66
return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetBkColor( new
HandleRef
( this, this.Hdc )));
81
return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetBkColor( new
HandleRef
( this, this.Hdc ), ColorTranslator.ToWin32(newColor)));
91
return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.GetBkMode( new
HandleRef
( this, this.Hdc ) );
106
return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.SetBkMode(new
HandleRef
(this, this.Hdc), (int) newMode);
117
return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.GetROP2( new
HandleRef
( this, this.Hdc ) );
135
return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.SetROP2(new
HandleRef
(this, this.Hdc), (int) rasterOperation);
239
IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(this, hDC), IntNativeMethods.OBJ_FONT);
242
IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( null, hInitialFont));
313
IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( null, hInitialFont ));
323
return IntUnsafeNativeMethods.GetDeviceCaps( new
HandleRef
( this, this.Hdc ), (int) capabilityIndex );
333
return (DeviceContextMapMode) IntUnsafeNativeMethods.GetMapMode( new
HandleRef
( this, this.Hdc ) );
363
return (DeviceContextMapMode) IntUnsafeNativeMethods.SetMapMode( new
HandleRef
(this, this.Hdc), (int) newMode );
383
return IntUnsafeNativeMethods.SelectObject(new
HandleRef
(this, this.Hdc), new
HandleRef
( null, hObj));
393
return (DeviceContextTextAlignment) IntUnsafeNativeMethods.GetTextAlign( new
HandleRef
( this, this.Hdc ) );
408
return (DeviceContextTextAlignment) IntUnsafeNativeMethods.SetTextAlign(new
HandleRef
(this, this.Hdc), (int) newAligment );
419
return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetTextColor( new
HandleRef
( this, this.Hdc ) ));
434
return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetTextColor(new
HandleRef
( this, this.Hdc), ColorTranslator.ToWin32(newColor)));
445
IntUnsafeNativeMethods.GetViewportExtEx( new
HandleRef
( this, this.Hdc ), size );
462
IntUnsafeNativeMethods.SetViewportExtEx( new
HandleRef
( this, this.Hdc ), newExtent.Width, newExtent.Height, oldExtent );
475
IntUnsafeNativeMethods.GetViewportOrgEx( new
HandleRef
( this, this.Hdc ), point );
491
IntUnsafeNativeMethods.SetViewportOrgEx( new
HandleRef
( this, this.Hdc ), newOrigin.X, newOrigin.Y, oldOrigin );
misc\GDI\WindowsFont.cs (4)
93
IntUnsafeNativeMethods.GetObject(new
HandleRef
(this, this.hFont), this.logFont);
255
IntPtr hFont = IntUnsafeNativeMethods.GetCurrentObject(new
HandleRef
(null, hdc), IntNativeMethods.OBJ_FONT);
282
IntUnsafeNativeMethods.GetObject(new
HandleRef
(null, hFont), lf);
317
IntUnsafeNativeMethods.DeleteObject(new
HandleRef
(this, this.hFont));
misc\GDI\WindowsGraphics2.cs (15)
78
HandleRef hdc = new
HandleRef
( this.dc, this.dc.Hdc);
83
IntUnsafeNativeMethods.SelectObject(hdc, new
HandleRef
(pen, pen.HPen));
108
HandleRef hdc = new
HandleRef
( this.dc, this.dc.Hdc);
113
IntUnsafeNativeMethods.SelectObject(hdc, new
HandleRef
(pen, pen.HPen));
118
IntUnsafeNativeMethods.SelectObject(hdc, new
HandleRef
(brush, brush.HBrush));
211
HandleRef hdc = new
HandleRef
( this.dc, this.dc.Hdc);
298
HandleRef hdc = new
HandleRef
(null, this.dc.Hdc);
385
HandleRef hdc = new
HandleRef
(null, this.dc.Hdc);
487
HandleRef hdc = new
HandleRef
(null, this.dc.Hdc);
588
HandleRef hdc = new
HandleRef
(this.dc, this.dc.Hdc);
602
IntUnsafeNativeMethods.SelectObject(hdc, new
HandleRef
(null, IntUnsafeNativeMethods.GetStockObject(IntNativeMethods.HOLLOW_BRUSH)));
626
HandleRef hdc = new
HandleRef
(this.dc, this.dc.Hdc);
638
IntUnsafeNativeMethods.FillRect(hdc, ref rect, new
HandleRef
(brush, hBrush));
658
HandleRef hdc = new
HandleRef
(this.dc, this.dc.Hdc);
703
HandleRef hdc = new
HandleRef
( this.dc, this.dc.Hdc );
misc\GDI\WindowsRegion.cs (5)
126
return IntUnsafeNativeMethods.CombineRgn(new
HandleRef
(this, this.HRegion), new
HandleRef
(region1, region1.HRegion), new
HandleRef
(region2, region2.HRegion), mode);
152
IntUnsafeNativeMethods.DeleteObject(new
HandleRef
(this, this.nativeHandle));
195
IntUnsafeNativeMethods.GetRgnBox(new
HandleRef
(this, this.nativeHandle), ref rect);
winforms\Managed\System\WinForms\AccessibleObject.cs (2)
2393
new
HandleRef
(this, handle),
2402
new
HandleRef
(this, handle),
winforms\Managed\System\WinForms\Application.cs (41)
158
IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new
HandleRef
(null, hModule), "ImageList_WriteEx");
166
IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new
HandleRef
(null, hModule), "ImageList_WriteEx");
795
SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(null, handle), out processId);
796
if (processId == thisPID && SafeNativeMethods.IsWindowVisible(new
HandleRef
(null, handle))) {
799
SafeNativeMethods.RedrawWindow(new
HandleRef
(null, handle),
815
UnsafeNativeMethods.EnumChildWindows(new
HandleRef
(null, handle),
820
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, handle), NativeMethods.WM_THEMECHANGED, 0, 0);
2110
if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new
HandleRef
(null, msg.hwnd))) {
2396
UnsafeNativeMethods.DuplicateHandle(new
HandleRef
(null, SafeNativeMethods.GetCurrentProcess()), new
HandleRef
(null, SafeNativeMethods.GetCurrentThread()),
2397
new
HandleRef
(null, SafeNativeMethods.GetCurrentProcess()), ref address, 0, false,
2450
UnsafeNativeMethods.CoRegisterMessageFilter(new
HandleRef
(null, msgFilterPtr), ref dummy);
2818
UnsafeNativeMethods.CloseHandle(new
HandleRef
(this, handle));
2865
int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(parkingWindows[0], parkingWindows[0].Handle), out pid);
3008
UnsafeNativeMethods.CloseHandle(new
HandleRef
(this, handle));
3405
HandleRef hwndOwner = new
HandleRef
(null, IntPtr.Zero);
3428
hwndOwner = new
HandleRef
(null, UnsafeNativeMethods.GetWindowLong(new
HandleRef
(currentForm, currentForm.Handle), NativeMethods.GWL_HWNDPARENT));
3436
hwndOwner = new
HandleRef
(null, IntPtr.Zero);
3445
SafeNativeMethods.IsWindowEnabled(new
HandleRef
(currentForm, currentForm.Handle)) != modalEnabled) {
3446
SafeNativeMethods.EnableWindow(new
HandleRef
(currentForm, currentForm.Handle), modalEnabled);
3535
if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new
HandleRef
(null, msg.hwnd))) {
3697
IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new
HandleRef
(null, msg.hwnd), NativeMethods.GA_ROOT);
3702
if (hwndRoot != IntPtr.Zero && UnsafeNativeMethods.IsDialogMessage(new
HandleRef
(null, hwndRoot), ref msg))
3968
SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(null, UnsafeNativeMethods.GetActiveWindow()), out pid);
4149
int id = SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(this, HandleInternal), out lpdwProcessId);
4156
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, HandleInternal), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero);
4167
IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new
HandleRef
(this, Handle), NativeMethods.GW_CHILD);
4187
UnsafeNativeMethods.SetParent(handle, new
HandleRef
(this, Handle));
4211
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero);
4251
if (SafeNativeMethods.IsWindowVisible(new
HandleRef
(null, hWnd)) && SafeNativeMethods.IsWindowEnabled(new
HandleRef
(null, hWnd))) {
4275
if (UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWnd))) {
4301
if (UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWnd))) SafeNativeMethods.EnableWindow(new
HandleRef
(null, hWnd), state);
4313
if (activeHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new
HandleRef
(null, activeHwnd))) {
4314
UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(null, activeHwnd));
4317
if (focusedHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new
HandleRef
(null, focusedHwnd))) {
4318
UnsafeNativeMethods.SetFocus(new
HandleRef
(null, focusedHwnd));
4345
IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, MainForm.Handle), NativeMethods.GWL_HWNDPARENT);
4350
parentWindowContext = GetContextForHandle(new
HandleRef
(this, parentHandle));
winforms\Managed\System\WinForms\AxHost.cs (22)
1348
uiDeactivate = !UnsafeNativeMethods.IsChild(new
HandleRef
(this, GetHandleNoCreate()), new
HandleRef
(null, hwndFocus));
1455
logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSX);
1456
logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSY);
1458
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
1615
IntPtr currentWndproc = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_WNDPROC);
1626
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_WNDPROC, new
HandleRef
(this, currentWndproc));
2123
if (SafeNativeMethods.IsAccelerator(new
HandleRef
(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) {
3381
SafeNativeMethods.OleCreatePropertyFrame(new
HandleRef
(this, handle), 0, 0, name, 1, ref o, uuids.cElems, new
HandleRef
(null, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero);
3501
Application.ParkHandle(new
HandleRef
(ipo, hwnd));
3561
IntPtr wndProc = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_WNDPROC);
3591
wndprocAddr = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_WNDPROC);
5160
int hr = UnsafeNativeMethods.VarFormat(ref var, new
HandleRef
(null, pszFormat), firstD, firstW, 32 /* VAR_FORMAT_NOSUBSTITUTE */, ref pbstr);
5175
SafeNativeMethods.SysFreeString(new
HandleRef
(null, pbstr));
6694
IntPtr pointer = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, hglobal));
6701
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hglobal));
6706
iLockBytes = UnsafeNativeMethods.CreateILockBytesOnHGlobal(new
HandleRef
(null, hglobal), true);
6722
UnsafeNativeMethods.GlobalFree(new
HandleRef
(null, hglobal));
6796
IntPtr pointer = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, hglobal));
6807
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, hglobal));
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (2)
100
SafeNativeMethods.FillRect(new
HandleRef
(e, e.HDC), ref r, new
HandleRef
(this,
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (1)
263
SafeNativeMethods.DrawFrameControl(new
HandleRef
(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\CheckedListBox.cs (3)
551
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, Handle), ref rect, false);
880
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, Handle), null, true);
1672
UnsafeNativeMethods.ClientToScreen(new
HandleRef
(ParentCheckedListBox, ParentCheckedListBox.Handle), pt);
winforms\Managed\System\WinForms\ColumnHeader.cs (4)
397
IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new
HandleRef
(listview, listview.Handle), NativeMethods.LVM_GETHEADER, 0, 0);
399
int nativeColumnCount = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(listview, hwndHdr), NativeMethods.HDM_GETITEMCOUNT, 0, 0);
401
width = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(listview, listview.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, Index, 0);
475
UnsafeNativeMethods.SendMessage(new
HandleRef
(this.listview, this.listview.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, cols.Length, cols);
winforms\Managed\System\WinForms\ComboBox.cs (48)
1132
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, childEdit.Handle), NativeMethods.EM_REPLACESEL, NativeMethods.InvalidIntPtr, str);
1152
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.CB_GETEDITSEL, start, end);
1173
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.CB_GETEDITSEL, value, (int[])null);
1608
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref comboRectMid);
1613
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, childEdit.Handle), ref editRectMid);
1769
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, childEdit.Handle), NativeMethods.EM_SETMARGINS,
1838
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
1930
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.WM_CONTEXTMENU, m.WParam, m.LParam);
1983
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref rect);
2049
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, childEdit.Handle), null, false);
2052
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, childListBox.Handle), null, false);
2211
SafeNativeMethods.SetTextColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(ForeColor));
2212
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(BackColor));
2293
SafeNativeMethods.RedrawWindow(new
HandleRef
(this, Handle),
2359
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.CB_GETLBTEXT, index, sb);
2440
IntPtr hwnd = UnsafeNativeMethods.GetWindow(new
HandleRef
(this, Handle), NativeMethods.GW_CHILD);
2451
hwnd = UnsafeNativeMethods.GetWindow(new
HandleRef
(this, hwnd), NativeMethods.GW_HWNDNEXT);
2459
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, childEdit.Handle), NativeMethods.EM_SETMARGINS,
3165
SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, childEdit.Handle), mode);
3172
if (!stringSource.Bind(new
HandleRef
(this, childEdit.Handle), (int)AutoCompleteMode)) {
3189
SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, childEdit.Handle), mode);
3196
if (!stringSource.Bind(new
HandleRef
(this, childEdit.Handle), (int)AutoCompleteMode)) {
3212
SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, childEdit.Handle), mode);
3229
int ret = SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, childEdit.Handle), (int)AutoCompleteSource | mode);
3239
SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, childEdit.Handle), mode);
3376
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, dropDownHandle), NativeMethods.NullHandleRef, 0, 0, DropDownWidth, height,
3443
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, childEdit.Handle), NativeMethods.WM_SETTEXT, IntPtr.Zero, s);
3454
SafeNativeMethods.GetClientRect(new
HandleRef
(this, Handle), ref rect);
3621
SafeNativeMethods.SelectPalette(new
HandleRef
(this, dis.hDC), new
HandleRef
(null, oldPal), 0);
3689
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), NativeMethods.WM_MOUSELEAVE, 0, 0);
3724
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
3763
NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)SafeNativeMethods.GetUpdateRgn(new
HandleRef
(this, this.Handle), new HandleRef(this, wr.HRegion), true);
3775
dc = UnsafeNativeMethods.BeginPaint(new
HandleRef
(this, Handle), ref ps);
3799
UnsafeNativeMethods.EndPaint(new
HandleRef
(this, Handle), ref ps);
3940
new
HandleRef
(this, Handle),
3983
m.Result = UnsafeNativeMethods.LresultFromObject(ref IID_IAccessible, m.WParam, new
HandleRef
(this, punkAcc));
4804
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, _owningComboBox.GetListHandle()), null, false);
5137
UnsafeNativeMethods.UiaHostProviderFromHwnd(new
HandleRef
(this, _handle), out provider);
5355
UnsafeNativeMethods.UiaHostProviderFromHwnd(new
HandleRef
(this, _childListControlhandle), out provider);
5767
UnsafeNativeMethods.EnumChildWindows(new
HandleRef
(this, acHandle),
5782
return SafeNativeMethods.IsWindowVisible(new
HandleRef
(this, Handle));
5871
UnsafeNativeMethods.EnumThreadWindows(SafeNativeMethods.GetCurrentThreadId(), new NativeMethods.EnumThreadWindowsCallback(this.Callback), new
HandleRef
(null, IntPtr.Zero));
5875
HandleRef hRef = new
HandleRef
(null, hWnd);
6110
SafeNativeMethods.ValidateRect(new
HandleRef
(comboBox, comboBox.Handle), ref validRect);
6115
SafeNativeMethods.ValidateRect(new
HandleRef
(comboBox, comboBox.Handle), ref validRect);
6120
SafeNativeMethods.ValidateRect(new
HandleRef
(comboBox, comboBox.Handle), ref validRect);
6125
SafeNativeMethods.ValidateRect(new
HandleRef
(comboBox, comboBox.Handle), ref validRect);
winforms\Managed\System\WinForms\CommonDialog.cs (9)
155
UnsafeNativeMethods.SetFocus(new
HandleRef
(null, wparam));
158
UnsafeNativeMethods.PostMessage(new
HandleRef
(null, hWnd), CDM_SETDEFAULTFOCUS, 0, 0);
165
UnsafeNativeMethods.SetFocus(new
HandleRef
(this, defaultControlHwnd));
178
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(null, hWnd), ref r);
182
SafeNativeMethods.SetWindowPos(new
HandleRef
(null, hWnd), NativeMethods.NullHandleRef, x, y, 0, 0, NativeMethods.SWP_NOSIZE |
304
defOwnerWndProc = UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, hwndOwner), NativeMethods.GWL_WNDPROC, ownerProc);
319
IntPtr currentSubClass = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, hwndOwner), NativeMethods.GWL_WNDPROC);
321
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, hwndOwner), NativeMethods.GWL_WNDPROC, new
HandleRef
(this, defOwnerWndProc));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (3)
69
SafeNativeMethods.OleCreatePropertyFrame(new
HandleRef
(parent, handle), 0, 0, "PropertyPages", 1, ref o, 1, new Guid[]{guid}, Application.CurrentCulture.LCID, 0, IntPtr.Zero);
92
SafeNativeMethods.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)
207
SafeNativeMethods.SysFreeString(new
HandleRef
(null, bstr));
240
SafeNativeMethods.VariantClear(new
HandleRef
(null, curVariant));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
75
new
HandleRef
(null, parentHandle),
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
1243
SafeNativeMethods.VariantInit(new
HandleRef
(null, mem));
1322
SafeNativeMethods.VariantClear(new
HandleRef
(null, mem));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (3)
101
SafeNativeMethods.OleCreatePropertyFrame(new
HandleRef
(null, parentHandle),
105
new
HandleRef
(null, (IntPtr)(long)pAddrs),
107
new
HandleRef
(null, guidsAddr),
winforms\Managed\System\WinForms\ContainerControl.cs (7)
679
UnsafeNativeMethods.SetFocus(new
HandleRef
(activeControl, activeControl.Handle));
698
UnsafeNativeMethods.SetFocus(new
HandleRef
(cc, cc.Handle));
716
UnsafeNativeMethods.GetClientRect(new
HandleRef
(this, this.Handle), ref clientRectangle);
718
UnsafeNativeMethods.ClientToScreen(new
HandleRef
(this, this.Handle), topLeftPoint);
744
HandleRef hdc = new
HandleRef
(this, dc);
754
HandleRef hfont = new
HandleRef
(this, FontHandle);
755
HandleRef hfontOld = new
HandleRef
(this, SafeNativeMethods.SelectObject(hdc, hfont));
winforms\Managed\System\WinForms\ContextMenu.cs (2)
231
SafeNativeMethods.TrackPopupMenuEx(new
HandleRef
(this, Handle),
235
new
HandleRef
(control, control.Handle),
winforms\Managed\System\WinForms\Control.cs (205)
1405
bool visible = SafeNativeMethods.IsWindowVisible(new
HandleRef
(window, Handle));
1406
bool enabled = SafeNativeMethods.IsWindowEnabled(new
HandleRef
(window, Handle));
1480
UnsafeNativeMethods.SetCapture(new
HandleRef
(this, Handle));
1678
if (UnsafeNativeMethods.IsChild(new
HandleRef
(this, this.Handle), new
HandleRef
(this, focusHwnd))) {
2020
return SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(this, Handle), out pid);
2089
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
2929
IntPtr parentHandle = UnsafeNativeMethods.GetParent(new
HandleRef
(this, Handle));
2937
int len = UnsafeNativeMethods.GetClassName(new
HandleRef
(null, lastParentHandle), null, 0);
2941
UnsafeNativeMethods.GetClassName(new
HandleRef
(null, lastParentHandle), sb, sb.Capacity);
2949
parentHandle = UnsafeNativeMethods.GetParent(new
HandleRef
(null, parentHandle));
3000
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref temp);
3015
(next = UnsafeNativeMethods.GetWindow(new
HandleRef
(null, prev), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero;
3018
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(null, next), ref temp);
3021
if (SafeNativeMethods.IsWindowVisible(new
HandleRef
(null, next))) {
3087
hwnd = new
HandleRef
(this, Handle);
3096
hwnd = new
HandleRef
(marshalingControl, marshalingControl.Handle);
3592
if (UnsafeNativeMethods.SetWindowRgn(new
HandleRef
(this, Handle), new
HandleRef
(this, regionHandle), SafeNativeMethods.IsWindowVisible(new
HandleRef
(this, Handle))) != 0) {
3599
SafeNativeMethods.DeleteObject(new
HandleRef
(null, regionHandle));
4219
UnsafeNativeMethods.SendMessage(new
HandleRef
(TopMostParent, TopMostParent.Handle),
4262
UnsafeNativeMethods.SendMessage(new
HandleRef
(TopMostParent, TopMostParent.Handle),
4472
return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_EXSTYLE));
4475
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_EXSTYLE, new
HandleRef
(null, (IntPtr)value));
4485
return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE));
4488
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE, new
HandleRef
(null, (IntPtr)value));
4538
int textLen = SafeNativeMethods.GetWindowTextLength(new
HandleRef
(window, Handle));
4546
UnsafeNativeMethods.GetWindowText(new
HandleRef
(window, Handle), sb, sb.Capacity);
4554
UnsafeNativeMethods.SetWindowText(new
HandleRef
(window, Handle), value);
5293
UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new
HandleRef
(this, Handle), objectID, childID + 1);
5615
else if (IsHandleCreated && GetTopLevel() && SafeNativeMethods.IsWindowEnabled(new
HandleRef
(window, Handle))) {
5616
SafeNativeMethods.SetWindowPos(new
HandleRef
(window, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0,
5948
if (UnsafeNativeMethods.PeekMessage(ref msg, new
HandleRef
(this, Handle), threadCallbackMessage,
5978
if (0 != (NativeMethods.WS_EX_MDICHILD & (int)(long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(window, InternalHandle), NativeMethods.GWL_EXSTYLE))) {
6000
SafeNativeMethods.DeleteObject(new
HandleRef
(this, p));
6174
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)hDc,
6180
SafeNativeMethods.BitBlt(new
HandleRef
(destGraphics, desthDC), targetBounds.X, targetBounds.Y, width, height,
6181
new
HandleRef
(g, hDc), 0, 0, 0xcc0020);
6214
if (SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(marshaler, marshaler.Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) {
6370
UnsafeNativeMethods.SetFocus(new
HandleRef
(this, Handle));
6409
handle = UnsafeNativeMethods.GetAncestor(new
HandleRef
(null, handle), NativeMethods.GA_PARENT);
6485
IntPtr hwnd = UnsafeNativeMethods.ChildWindowFromPointEx(new
HandleRef
(null, Handle), pt.X, pt.Y, value);
6675
int id = UnsafeNativeMethods.GetMenuItemID(new
HandleRef
(null, hmenu), item);
6678
childMenu = UnsafeNativeMethods.GetSubMenu(new
HandleRef
(null, hmenu), item);
6679
int count = UnsafeNativeMethods.GetMenuItemCount(new
HandleRef
(null, childMenu));
6802
for (IntPtr hWndChild = UnsafeNativeMethods.GetWindow(new
HandleRef
(null, hWndParent), NativeMethods.GW_CHILD);
6804
hWndChild = UnsafeNativeMethods.GetWindow(new
HandleRef
(null, hWndChild), NativeMethods.GW_HWNDNEXT)) {
7047
Debug.Assert(hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWnd)));
7053
if (hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWnd))) {
7142
SafeNativeMethods.SetTextColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(ForeColor));
7143
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(BackColor));
7218
SafeNativeMethods.RedrawWindow(new
HandleRef
(this, Handle),
7219
null, new
HandleRef
(region, regionHandle),
7228
SafeNativeMethods.InvalidateRgn(new
HandleRef
(this, Handle),
7229
new
HandleRef
(region, regionHandle),
7235
SafeNativeMethods.DeleteObject(new
HandleRef
(region, regionHandle));
7269
SafeNativeMethods.RedrawWindow(new
HandleRef
(window, Handle),
7279
SafeNativeMethods.InvalidateRect(new
HandleRef
(window, Handle),
7314
SafeNativeMethods.RedrawWindow(new
HandleRef
(window, Handle),
7328
SafeNativeMethods.InvalidateRect(new
HandleRef
(window, Handle),
7805
if (SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(this, Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) {
7838
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero);
7971
SafeNativeMethods.DeleteObject(new
HandleRef
(this, p));
8170
SafeNativeMethods.EnableWindow(new
HandleRef
(this, Handle), Enabled);
8405
UnsafeNativeMethods.SetParent(new
HandleRef
(this, this.Handle), new
HandleRef
(parent, parent.Handle));
8435
Application.ParkHandle(new
HandleRef
(this, this.Handle), this.DpiAwarenessContext);
8732
deviceDpi = (int)UnsafeNativeMethods.GetDpiForWindow(new
HandleRef
(this, HandleInternal));
8752
if (UnsafeNativeMethods.SetWindowRgn(new
HandleRef
(this, Handle), new
HandleRef
(this, regionHandle), SafeNativeMethods.IsWindowVisible(new
HandleRef
(this, Handle))) != 0) {
8759
SafeNativeMethods.DeleteObject(new
HandleRef
(null, regionHandle));
8792
UnsafeNativeMethods.SetWindowText(new
HandleRef
(this, Handle), text);
8817
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero);
8833
if (UnsafeNativeMethods.GetScrollInfo(new
HandleRef
(this, Handle), NativeMethods.SB_HORZ,si) != false) {
8876
SafeNativeMethods.DeleteObject(new
HandleRef
(this, p));
9404
UnsafeNativeMethods.GetClientRect(new
HandleRef
(window, InternalHandle), ref rect);
10090
UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new
HandleRef
(this, Handle), point, 1);
10107
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(this, Handle), NativeMethods.NullHandleRef, point, 1);
10352
HandleRef hClippingRegion = new
HandleRef
(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x,viewportOrg.y, viewportOrg.x + this.Width, viewportOrg.y + this.Height));
10379
bool success = UnsafeNativeMethods.GetWindowRect(new
HandleRef
(null, this.Handle), ref windowRect);
10825
new
HandleRef
(topMostParent, topMostParent.Handle),
10826
UnsafeNativeMethods.GetParent(new
HandleRef
(null, topMostParent.Handle)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE,
10858
while (UnsafeNativeMethods.PeekMessage(ref msg, new
HandleRef
(this, hwnd),
10970
HandleRef parentHandle = new
HandleRef
(this, UnsafeNativeMethods.GetParent(new
HandleRef
(this, this.Handle)));
11036
UnsafeNativeMethods.SetParent(new
HandleRef
(this, this.Handle), parentHandle);
11062
UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new
HandleRef
(this, Handle), ref rect, 2);
11079
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(this, Handle), NativeMethods.NullHandleRef, ref rect, 2);
11121
UnsafeNativeMethods.UiaReturnRawElementProvider(new
HandleRef
(this, handle), new IntPtr(0), new IntPtr(0), null);
11246
int n = UnsafeNativeMethods.RegisterDragDrop(new
HandleRef
(this, Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this)));
11255
int n = UnsafeNativeMethods.RevokeDragDrop(new
HandleRef
(this, Handle));
11732
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, wparam, lparam);
11741
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, ref wparam, ref lparam);
11745
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, (IntPtr)wparam, lparam);
11750
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, wparam, lparam);
11755
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, wparam, (IntPtr)lparam);
11764
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, wparam, ref lparam);
11773
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, wparam, lparam);
11782
return UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), msg, wparam, lparam);
11793
SafeNativeMethods.SetWindowPos(new
HandleRef
(window, Handle), NativeMethods.HWND_BOTTOM, 0, 0, 0, 0,
11898
SafeNativeMethods.SetWindowPos(new
HandleRef
(window, Handle), NativeMethods.NullHandleRef, x, y, width, height, flags);
11971
IntPtr parentHandle = UnsafeNativeMethods.GetParent(new
HandleRef
(window, Handle));
11998
Application.ParkHandle(new
HandleRef
(window, Handle), this.DpiAwarenessContext);
12002
UnsafeNativeMethods.SetParent(new
HandleRef
(window, Handle), new
HandleRef
(null, value));
12006
Application.UnparkHandle(new
HandleRef
(window, Handle), window.DpiAwarenessContext);
12014
UnsafeNativeMethods.SetParent(new
HandleRef
(window, Handle), new
HandleRef
(null, IntPtr.Zero));
12015
Application.UnparkHandle(new
HandleRef
(window, Handle), window.DpiAwarenessContext);
12055
IntPtr result = SafeNativeMethods.SelectPalette(new
HandleRef
(null, dc), new
HandleRef
(null, halftonePalette), (force ? 0 : 1));
12058
SafeNativeMethods.RealizePalette(new
HandleRef
(null, dc));
12131
SafeNativeMethods.ShowWindow(new
HandleRef
(this, Handle), value ? ShowParams : NativeMethods.SW_HIDE);
12144
SafeNativeMethods.SetWindowPos(new
HandleRef
(window, Handle),
12183
if (!SafeNativeMethods.IsWindowVisible(new
HandleRef
(this,this.Handle))) {
12198
new
HandleRef
(window, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE |
12418
int styleFlags = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
12419
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE, new
HandleRef
(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag)));
12505
SafeNativeMethods.UpdateWindow(new
HandleRef
(window, InternalHandle));
12517
UnsafeNativeMethods.GetClientRect(new
HandleRef
(window, InternalHandle), ref rect);
12520
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(window, InternalHandle), ref rect);
12522
UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new
HandleRef
(null, UnsafeNativeMethods.GetParent(new
HandleRef
(window, InternalHandle))), ref rect, 2);
12644
while ((hWnd = UnsafeNativeMethods.GetWindow(new
HandleRef
(null, hWnd), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) {
12672
IntPtr parentHandle = UnsafeNativeMethods.GetParent(new
HandleRef
(this, Handle));
12705
if (UnsafeNativeMethods.GetWindow(new
HandleRef
(ctl.window, ctl.Handle), NativeMethods.GW_HWNDPREV) != prevHandle) {
12708
SafeNativeMethods.SetWindowPos(new
HandleRef
(ctl.window, ctl.Handle), new
HandleRef
(null, prevHandle), 0, 0, 0, 0,
12756
new
HandleRef
(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0,
12800
parentHandle = UnsafeNativeMethods.GetParent(new
HandleRef
(null, parentHandle));
12802
int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(null, lastParentHandle), NativeMethods.GWL_STYLE)));
12811
UnsafeNativeMethods.PostMessage(new
HandleRef
(null, lastParentHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
12965
UnsafeNativeMethods.GetClientRect(new
HandleRef
(this, Handle), ref rc);
13045
new
HandleRef
(this, Handle),
13110
m.Result = UnsafeNativeMethods.LresultFromObject(ref IID_IAccessible, m.WParam, new
HandleRef
(ctrlAccessibleObject, punkAcc));
13423
deviceDpi = (int)UnsafeNativeMethods.GetDpiForWindow(new
HandleRef
(this, HandleInternal));
13450
uint dpi = UnsafeNativeMethods.GetDpiForWindow(new
HandleRef
(this, HandleInternal));
13586
m.Result = UnsafeNativeMethods.SendMessage(new
HandleRef
(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam);
13590
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam);
13617
IntPtr p = UnsafeNativeMethods.GetDlgItem(new
HandleRef
(null, m.HWnd), ctrlId);
13669
dc = UnsafeNativeMethods.BeginPaint(new
HandleRef
(this, hWnd), ref ps);
13767
SafeNativeMethods.SelectPalette(new
HandleRef
(null, dc), new
HandleRef
(null, oldPal), 0);
13778
UnsafeNativeMethods.EndPaint(new
HandleRef
(this, hWnd), ref ps);
13795
IntPtr dc = UnsafeNativeMethods.GetDC(new
HandleRef
(this, Handle));
13801
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, Handle), new
HandleRef
(null, dc));
13873
hWnd = UnsafeNativeMethods.GetDlgItem(new
HandleRef
(this, Handle), NativeMethods.Util.HIWORD(m.WParam));
14075
if (parent != null && UnsafeNativeMethods.GetParent(new
HandleRef
(window, InternalHandle)) == parent.InternalHandle &&
14425
result = UnsafeNativeMethods.SendMessage(new
HandleRef
(null, hwndFocus),
14429
hwndFocus = UnsafeNativeMethods.GetParent(new
HandleRef
(null, hwndFocus));
16194
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, this.Handle), ref rectangle);
16510
logPixels.X = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), NativeMethods.LOGPIXELSX);
16511
logPixels.Y = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, dc), NativeMethods.LOGPIXELSY);
16512
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, dc));
16576
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(null, hwndMap), new
HandleRef
(control, control.Handle), pt, 1);
16584
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(target, target.Handle), new
HandleRef
(realTarget, realTarget.Handle), pt, 1);
16666
int hdcType = UnsafeNativeMethods.GetObjectType(new
HandleRef
(null, hdcDraw));
16693
SafeNativeMethods.LPtoDP(new
HandleRef
(null, hdcDraw), ref rc, 2);
16695
iMode = SafeNativeMethods.SetMapMode(new
HandleRef
(null, hdcDraw), NativeMethods.MM_ANISOTROPIC);
16696
SafeNativeMethods.SetWindowOrgEx(new
HandleRef
(null, hdcDraw), 0, 0, pW);
16697
SafeNativeMethods.SetWindowExtEx(new
HandleRef
(null, hdcDraw), control.Width, control.Height, sWindowExt);
16698
SafeNativeMethods.SetViewportOrgEx(new
HandleRef
(null, hdcDraw), rc.left, rc.top, pVp);
16699
SafeNativeMethods.SetViewportExtEx(new
HandleRef
(null, hdcDraw), rc.right - rc.left, rc.bottom - rc.top, sViewportExt);
16714
control.PrintToMetaFile(new
HandleRef
(null, hdcDraw), flags);
16721
SafeNativeMethods.SetWindowOrgEx(new
HandleRef
(null, hdcDraw), pW.x, pW.y, null);
16722
SafeNativeMethods.SetWindowExtEx(new
HandleRef
(null, hdcDraw), sWindowExt.cx, sWindowExt.cy, null);
16723
SafeNativeMethods.SetViewportOrgEx(new
HandleRef
(null, hdcDraw), pVp.x, pVp.y, null);
16724
SafeNativeMethods.SetViewportExtEx(new
HandleRef
(null, hdcDraw), sViewportExt.cx, sViewportExt.cy, null);
16725
SafeNativeMethods.SetMapMode(new
HandleRef
(null, hdcDraw), iMode);
16933
UnsafeNativeMethods.DestroyAcceleratorTable(new
HandleRef
(this, accelTable));
16937
accelTable = UnsafeNativeMethods.CreateAcceleratorTable(new
HandleRef
(null, accelBlob), accelCount);
17105
UnsafeNativeMethods.SetParent(new
HandleRef
(control, control.Handle), new
HandleRef
(null, hwndParent));
17451
SafeNativeMethods.CombineRgn(new
HandleRef
(null, newRegion), new
HandleRef
(null, region), new
HandleRef
(this, clipRegion), NativeMethods.RGN_DIFF);
17452
SafeNativeMethods.DeleteObject(new
HandleRef
(null, region));
17455
SafeNativeMethods.DeleteObject(new
HandleRef
(null, newRegion));
18194
UnsafeNativeMethods.DestroyAcceleratorTable(new
HandleRef
(this, accelTable));
18407
IntPtr hWndParent = UnsafeNativeMethods.GetParent(new
HandleRef
(control, control.Handle));
18412
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(null, hWndParent), new
HandleRef
(control, control.Handle), ref rcIntersect, 2);
18438
UnsafeNativeMethods.SetWindowRgn(new
HandleRef
(control, control.Handle), new
HandleRef
(this, finalClipRegion), SafeNativeMethods.IsWindowVisible(new
HandleRef
(control, control.Handle)));
18534
if (SafeNativeMethods.IsWindowUnicode(new
HandleRef
(null, lpmsg.hwnd))) {
19248
hBitmapDC = new
HandleRef
(this, UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef));
19252
hBitmap = new
HandleRef
(this, SafeNativeMethods.CreateBitmap(size.Width, size.Height, planes, bitsPixel, IntPtr.Zero));
19254
hOriginalBmp = new
HandleRef
(this, SafeNativeMethods.SelectObject(hBitmapDC, hBitmap));
19300
HandleRef hNullBitmap = new
HandleRef
(this, SafeNativeMethods.CreateBitmap(1, 1, 1, 1, IntPtr.Zero));
19304
HandleRef hBitmap = new
HandleRef
(this, SafeNativeMethods.SelectObject(hdcSrc, hNullBitmap));
19660
UnsafeNativeMethods.FreeLibrary(new
HandleRef
(null, oleAccAvailable));
19873
UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new
HandleRef
(this, Handle), NativeMethods.OBJID_CLIENT, 0);
19887
UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new
HandleRef
(this, Handle), NativeMethods.OBJID_CLIENT, childID + 1);
19901
UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new
HandleRef
(this, Handle), objectID, childID + 1);
19954
UnsafeNativeMethods.UiaHostProviderFromHwnd(new
HandleRef
(this, Handle), out provider);
20017
SafeNativeMethods.DeleteObject(new
HandleRef
(this, handle));
winforms\Managed\System\WinForms\Control.Ime.cs (26)
426
focusHandle = UnsafeNativeMethods.GetAncestor(new
HandleRef
(null, focusHandle), NativeMethods.GA_ROOT);
902
IntPtr oldContext = UnsafeNativeMethods.ImmAssociateContext( new
HandleRef
( null, handle ), NativeMethods.NullHandleRef );
921
IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new
HandleRef
( null, handle ) );
931
UnsafeNativeMethods.ImmAssociateContext( new
HandleRef
( null, handle ), new
HandleRef
( null, inputContext ) );
936
UnsafeNativeMethods.ImmAssociateContext( new
HandleRef
( null, handle ), new
HandleRef
( null, originalImeContext ) );
941
UnsafeNativeMethods.ImmReleaseContext( new
HandleRef
( null, handle ), new
HandleRef
( null, inputContext ) );
974
inputContext = UnsafeNativeMethods.ImmGetContext( new
HandleRef
( null, handle ) );
996
UnsafeNativeMethods.ImmGetConversionStatus( new
HandleRef
( null, inputContext ), ref conversion, ref sentence );
1023
UnsafeNativeMethods.ImmReleaseContext( new
HandleRef
( null, handle ), new
HandleRef
( null, inputContext ) );
1113
IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new
HandleRef
( null, handle ) );
1120
retval = UnsafeNativeMethods.ImmGetOpenStatus( new
HandleRef
( null, inputContext ) );
1122
UnsafeNativeMethods.ImmReleaseContext( new
HandleRef
( null, handle ), new
HandleRef
( null, inputContext ) );
1204
IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new
HandleRef
( null, handle ) );
1207
UnsafeNativeMethods.ImmGetConversionStatus( new
HandleRef
( null, inputContext ), ref conversion, ref sentence );
1213
bool retval = UnsafeNativeMethods.ImmSetConversionStatus( new
HandleRef
( null, inputContext ), conversion, sentence );
1215
UnsafeNativeMethods.ImmReleaseContext( new
HandleRef
( null, handle ), new
HandleRef
( null, inputContext ) );
1234
IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new
HandleRef
( null, handle ) );
1239
bool succeeded = UnsafeNativeMethods.ImmSetOpenStatus( new
HandleRef
( null, inputContext ), open );
1244
succeeded = UnsafeNativeMethods.ImmReleaseContext( new
HandleRef
( null, handle ), new
HandleRef
( null, inputContext ) );
winforms\Managed\System\WinForms\ControlPaint.cs (70)
163
IntPtr palette = SafeNativeMethods.CreateHalftonePalette(new
HandleRef
(null, hdcS));
164
UnsafeNativeMethods.GetObject(new
HandleRef
(null, palette), 2, ref entryCount);
166
SafeNativeMethods.GetPaletteEntries(new
HandleRef
(null, palette), 0, entryCount, entries);
175
SafeNativeMethods.DeleteObject(new
HandleRef
(null, palette));
205
hBitmap = SafeNativeMethods.CreateDIBSection(new
HandleRef
(null, hdcS), new
HandleRef
(null, bitmapInfo), NativeMethods.DIB_RGB_COLORS,
215
IntPtr previousBitmap = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, hBitmap));
220
SafeNativeMethods.DeleteObject( new
HandleRef
( null, previousBitmap ) );
230
SafeNativeMethods.DeleteObject( new
HandleRef
( null, hBitmap ) );
308
IntPtr source = UnsafeNativeMethods.CreateCompatibleDC(new
HandleRef
(null, hdcS));
309
IntPtr target = UnsafeNativeMethods.CreateCompatibleDC(new
HandleRef
(null, hdcS));
310
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hdcS));
311
IntPtr previousSourceBitmap = SafeNativeMethods.SelectObject(new
HandleRef
(null, source), new
HandleRef
(null, monochromeMask));
312
IntPtr previousTargetBitmap = SafeNativeMethods.SelectObject(new
HandleRef
(null, target), new
HandleRef
(null, colorMask));
321
SafeNativeMethods.SetBkColor(new
HandleRef
(null, target), 0x00ffffff); // white
322
SafeNativeMethods.SetTextColor(new
HandleRef
(null, target), 0); // black
323
SafeNativeMethods.BitBlt(new
HandleRef
(null, target), 0, 0, size.Width, size.Height, new
HandleRef
(null, source),
326
SafeNativeMethods.SelectObject(new
HandleRef
(null, source), new
HandleRef
(null, previousSourceBitmap));
327
SafeNativeMethods.SelectObject(new
HandleRef
(null, target), new
HandleRef
(null, previousTargetBitmap));
328
UnsafeNativeMethods.DeleteCompatibleDC(new
HandleRef
(null, source));
329
UnsafeNativeMethods.DeleteCompatibleDC(new
HandleRef
(null, target));
348
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hBitmap));
358
HandleRef targetHDC = new
HandleRef
( null, targetDC.GetHdc());
1284
SafeNativeMethods.DrawFrameControl(new
HandleRef
(null, dc), ref rcCheck,
1783
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE);
1797
int prevRop2 = SafeNativeMethods.SetROP2(new
HandleRef
(null, dc), rop2);
1798
IntPtr oldBrush = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH)));
1799
IntPtr oldPen = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, pen));
1800
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(graphicsColor));
1801
SafeNativeMethods.Rectangle(new
HandleRef
(null, dc), rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom);
1803
SafeNativeMethods.SetROP2(new
HandleRef
(null, dc), prevRop2);
1804
SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, oldBrush));
1805
SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, oldPen));
1809
SafeNativeMethods.DeleteObject(new
HandleRef
(null, pen));
1812
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, dc));
1826
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE);
1829
int prevRop2 = SafeNativeMethods.SetROP2(new
HandleRef
(null, dc), rop2);
1830
IntPtr oldBrush = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH)));
1831
IntPtr oldPen = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, pen));
1834
SafeNativeMethods.MoveToEx(new
HandleRef
(null, dc), start.X, start.Y, null);
1835
SafeNativeMethods.LineTo(new
HandleRef
(null, dc), end.X, end.Y);
1837
SafeNativeMethods.SetROP2(new
HandleRef
(null, dc), prevRop2);
1838
SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, oldBrush));
1839
SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, oldPen));
1840
SafeNativeMethods.DeleteObject(new
HandleRef
(null, pen));
1841
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, dc));
2007
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE);
2010
int prevRop2 = SafeNativeMethods.SetROP2(new
HandleRef
(null, dc), rop2);
2011
IntPtr oldBrush = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, brush));
2014
SafeNativeMethods.PatBlt(new
HandleRef
(null, dc), rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3);
2016
SafeNativeMethods.SetROP2(new
HandleRef
(null, dc), prevRop2);
2017
SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, oldBrush));
2018
SafeNativeMethods.DeleteObject(new
HandleRef
(null, brush));
2019
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, dc));
winforms\Managed\System\WinForms\Cursor.cs (19)
231
UnsafeNativeMethods.SetCursor(new
HandleRef
(value, handle));
278
SafeNativeMethods.GetIconInfo(new
HandleRef
(this, currentIcon.Handle), info);
287
SafeNativeMethods.ExternalDeleteObject(new
HandleRef
(null, info.hbmMask));
292
SafeNativeMethods.ExternalDeleteObject(new
HandleRef
(null, info.hbmColor));
365
return SafeNativeMethods.CopyImage(new
HandleRef
(this, Handle), NativeMethods.IMAGE_CURSOR, sz.Width, sz.Height, 0);
375
UnsafeNativeMethods.DestroyCursor(new
HandleRef
(this, handle));
467
SafeNativeMethods.DrawIcon(new
HandleRef
(graphics, dc), targetX, targetY, new
HandleRef
(this, handle));
483
SafeNativeMethods.DrawIcon(new
HandleRef
(graphics, dc), targetX, targetY, new
HandleRef
(this, handle));
498
SafeNativeMethods.IntersectClipRect(new
HandleRef
(this, Handle), targetX, targetY, targetX+clipWidth, targetY+clipHeight);
499
SafeNativeMethods.DrawIconEx(new
HandleRef
(graphics, dc), targetX - imageX, targetY - imageY,
500
new
HandleRef
(this, handle), drawWidth, drawHeight, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL);
593
SafeNativeMethods.GetIconInfo(new
HandleRef
(this, iconHandle), info);
597
UnsafeNativeMethods.GetObject(new
HandleRef
(null, info.hbmColor), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp);
598
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, info.hbmColor));
602
UnsafeNativeMethods.GetObject(new
HandleRef
(null, info.hbmMask), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp);
607
SafeNativeMethods.IntDeleteObject(new
HandleRef
(null, info.hbmMask));
640
handle = SafeNativeMethods.CopyImageAsCursor(new
HandleRef
(this, cursorHandle), NativeMethods.IMAGE_CURSOR,
winforms\Managed\System\WinForms\DataGrid.cs (12)
2299
SafeNativeMethods.ScrollWindow(new
HandleRef
(this, Handle),
5857
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
5859
IntPtr saveBrush = SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, halftone));
5860
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
5861
SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, saveBrush));
5862
SafeNativeMethods.DeleteObject(new
HandleRef
(null, halftone));
5863
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, parentHandle), new
HandleRef
(this, dc));
8629
SafeNativeMethods.ScrollWindow(new
HandleRef
(this, Handle), 0, deltaY, ref scrollArea, ref scrollArea);
8883
SafeNativeMethods.ScrollWindow(new
HandleRef
(this, Handle), 0, -parentRowsRect.Height, ref scrollRECT, ref scrollRECT);
winforms\Managed\System\WinForms\DataGridToolTip.cs (5)
49
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
50
SafeNativeMethods.SetWindowPos(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE);
51
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0);
73
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo);
82
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo);
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
1330
UnsafeNativeMethods.SetFocus(new
HandleRef
(null, IntPtr.Zero));
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1441
SafeNativeMethods.DrawFrameControl(new
HandleRef
(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (3)
840
UnsafeNativeMethods.SendMessage(new
HandleRef
(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, cachedDropDownWidth, 0);
847
int dropDownWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(comboBox, comboBox.Handle), NativeMethods.CB_GETDROPPEDWIDTH, 0, 0));
850
UnsafeNativeMethods.SendMessage(new
HandleRef
(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, this.DropDownWidth, 0);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (24)
5767
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
5769
IntPtr saveBrush = SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, halftone));
5771
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5772
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5773
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5774
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT);
5776
SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, saveBrush));
5777
SafeNativeMethods.DeleteObject(new
HandleRef
(null, halftone));
5778
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, parentHandle), new
HandleRef
(this, dc));
5788
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
5790
IntPtr saveBrush = SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, halftone));
5791
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
5792
SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, saveBrush));
5793
SafeNativeMethods.DeleteObject(new
HandleRef
(null, halftone));
5794
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, parentHandle), new
HandleRef
(this, dc));
26360
SafeNativeMethods.ScrollWindow(new
HandleRef
(this, this.Handle),
26471
SafeNativeMethods.ScrollWindow(new
HandleRef
(this, this.Handle), 0, deltaY, ref scrollArea, ref scrollArea);
29938
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\DataObject.cs (46)
150
IntPtr dcSrc = UnsafeNativeMethods.CreateCompatibleDC(new
HandleRef
(null, hDC));
151
IntPtr srcOld = SafeNativeMethods.SelectObject(new
HandleRef
(null, dcSrc), new
HandleRef
(bm, hBitmap));
155
IntPtr dcDest = UnsafeNativeMethods.CreateCompatibleDC(new
HandleRef
(null, hDC));
156
IntPtr hBitmapNew = SafeNativeMethods.CreateCompatibleBitmap(new
HandleRef
(null, hDC), bm.Size.Width, bm.Size.Height);
160
IntPtr destOld = SafeNativeMethods.SelectObject(new
HandleRef
(null, dcDest), new
HandleRef
(null, hBitmapNew));
161
SafeNativeMethods.BitBlt(new
HandleRef
(null, dcDest), 0, 0, bm.Size.Width, bm.Size.Height, new
HandleRef
(null, dcSrc), 0, 0, 0x00CC0020);
165
SafeNativeMethods.SelectObject(new
HandleRef
(null, dcSrc), new
HandleRef
(null, srcOld));
166
SafeNativeMethods.SelectObject(new
HandleRef
(null, dcDest), new
HandleRef
(null, destOld));
168
UnsafeNativeMethods.DeleteCompatibleDC(new
HandleRef
(null, dcSrc));
169
UnsafeNativeMethods.DeleteCompatibleDC(new
HandleRef
(null, dcDest));
170
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
172
SafeNativeMethods.DeleteObject(new
HandleRef
(bm, hBitmap));
772
UnsafeNativeMethods.GlobalFree(new
HandleRef
(medium, medium.unionmember));
951
UnsafeNativeMethods.GlobalFree(new
HandleRef
(null, handle));
958
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, handle));
969
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
1014
IntPtr newHandle = UnsafeNativeMethods.GlobalReAlloc(new
HandleRef
(null, handle),
1020
IntPtr basePtr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, newHandle));
1065
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, newHandle));
1082
newHandle = UnsafeNativeMethods.GlobalReAlloc(new
HandleRef
(null, handle),
1090
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, newHandle));
1108
newHandle = UnsafeNativeMethods.GlobalReAlloc(new
HandleRef
(null, handle),
1116
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, newHandle));
1125
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, newHandle));
1139
newHandle = UnsafeNativeMethods.GlobalReAlloc(new
HandleRef
(null, handle),
1147
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, newHandle));
1156
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, newHandle));
1428
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(innerData, hglobal));
1430
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(innerData, hglobal));
1521
UnsafeNativeMethods.GlobalFree(new
HandleRef
(null, hglobal));
1644
SafeNativeMethods.DeleteObject(new
HandleRef
(null, medium.unionmember));
1693
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, handle));
1698
int size = UnsafeNativeMethods.GlobalSize(new
HandleRef
(null, handle));
1730
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
1842
int count = UnsafeNativeMethods.DragQueryFile(new
HandleRef
(null, hdrop), unchecked((int)0xFFFFFFFF), null, 0);
1848
int charlen = UnsafeNativeMethods.DragQueryFileLongPath(new
HandleRef
(null, hdrop), i, sb);
1875
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, handle));
1885
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
1894
IntPtr ptr = UnsafeNativeMethods.GlobalLock(new
HandleRef
(null, handle));
1896
int size = UnsafeNativeMethods.GlobalSize(new
HandleRef
(null, handle));
1902
UnsafeNativeMethods.GlobalUnlock(new
HandleRef
(null, handle));
winforms\Managed\System\WinForms\DateTimePicker.cs (14)
418
int gdt = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_GETSYSTEMTIME, 0, sys);
431
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
436
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1036
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1149
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1154
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1380
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys);
1457
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.DTM_SETRANGE, flags, sa);
1574
UnsafeNativeMethods.EnumChildWindows(new
HandleRef
(this, Handle), cb, NativeMethods.NullHandleRef);
1576
SafeNativeMethods.InvalidateRect(new
HandleRef
(c, c.hwndFound), null, true);
1577
SafeNativeMethods.UpdateWindow(new
HandleRef
(c, c.hwndFound));
1638
int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_EXSTYLE)));
1641
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_EXSTYLE, new
HandleRef
(this, (IntPtr)style));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (31)
692
hbrushDither = SafeNativeMethods.CreatePatternBrush(new
HandleRef
(null, hbitmapTemp));
697
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hbitmapTemp));
712
hfontOld = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(Parent, ((Control)Parent).FontHandle));
717
SafeNativeMethods.SetBkMode(new
HandleRef
(null, dc), NativeMethods.TRANSPARENT);
720
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), backColor);
721
IntUnsafeNativeMethods.ExtTextOut(new
HandleRef
(null, dc), 0, 0, NativeMethods.ETO_CLIPPED | NativeMethods.ETO_OPAQUE, ref rc, null, 0, null);
725
IntUnsafeNativeMethods.GetTextExtentPoint32(new
HandleRef
(null, dc), itemText, size);
732
SafeNativeMethods.SetTextColor(new
HandleRef
(null, dc), textColor);
733
IntUnsafeNativeMethods.DrawText(new
HandleRef
(null, dc), itemText, ref rc2,
736
SafeNativeMethods.ImageList_Draw(new
HandleRef
(imagelist, imagelist.Handle), imageIndex, new
HandleRef
(null, dc),
745
savedColor = SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight));
750
IntUnsafeNativeMethods.ExtTextOut(new
HandleRef
(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null);
753
IntUnsafeNativeMethods.ExtTextOut(new
HandleRef
(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null);
756
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(SystemColors.ControlDark));
761
IntUnsafeNativeMethods.ExtTextOut(new
HandleRef
(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null);
764
IntUnsafeNativeMethods.ExtTextOut(new
HandleRef
(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null);
766
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), savedColor);
770
SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(null, hfontOld));
778
itemHeight = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_GETITEMHEIGHT, 0, 0);
780
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_SETITEMHEIGHT, itemHeight, 0);
828
SafeNativeMethods.DeleteObject(new
HandleRef
(this, hbrushDither));
834
IntPtr hbrushOld = SafeNativeMethods.SelectObject(new
HandleRef
(null, dc), new
HandleRef
(this, hbrushDither));
839
oldTextColor = SafeNativeMethods.SetTextColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight));
840
oldBackColor = SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), ColorTranslator.ToWin32(SystemColors.Control));
842
SafeNativeMethods.PatBlt(new
HandleRef
(null, dc), rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NativeMethods.PATCOPY);
843
SafeNativeMethods.SetTextColor(new
HandleRef
(null, dc), oldTextColor);
844
SafeNativeMethods.SetBkColor(new
HandleRef
(null, dc), oldBackColor);
winforms\Managed\System\WinForms\ErrorProvider.cs (17)
923
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo);
969
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
970
SafeNativeMethods.SetWindowPos(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE);
971
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0);
994
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle),
1066
IntPtr hdc = UnsafeNativeMethods.BeginPaint(new
HandleRef
(this, Handle), ref ps);
1074
SafeNativeMethods.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);
1082
UnsafeNativeMethods.EndPaint(new
HandleRef
(this, Handle), ref ps);
1135
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo);
1231
UnsafeNativeMethods.SendMessage(new
HandleRef
(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETTOOLINFO, 0, toolInfo);
1258
if (UnsafeNativeMethods.SetWindowRgn(new
HandleRef
(this, Handle), new
HandleRef
(windowRegion, windowRegionHandle), true) != 0) {
1274
SafeNativeMethods.DeleteObject(new
HandleRef
(null, windowRegionHandle));
1278
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), NativeMethods.HWND_TOP, windowBounds.X, windowBounds.Y,
1280
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, Handle), null, false);
1710
SafeNativeMethods.GetBitmapBits(new
HandleRef
(null, mask), bits.Length, bits);
1725
SafeNativeMethods.DeleteObject(new
HandleRef
(null, mask));
winforms\Managed\System\WinForms\FileDialog.cs (10)
210
int textLen = SafeNativeMethods.GetWindowTextLength(new
HandleRef
(this, dialogHWnd));
212
UnsafeNativeMethods.GetWindowText(new
HandleRef
(this, dialogHWnd), sb, sb.Capacity);
749
dialogHWnd = UnsafeNativeMethods.GetParent(new
HandleRef
(null, hWnd));
760
int sizeNeeded = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, dialogHWnd), 1124 /*CDM_GETSPEC*/, System.IntPtr.Zero, System.IntPtr.Zero);
801
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(null, hWnd), 0, new
HandleRef
(null, NativeMethods.InvalidIntPtr));
806
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(null, hWnd), 0, new
HandleRef
(null, NativeMethods.InvalidIntPtr));
814
UnsafeNativeMethods.EndDialog(new
HandleRef
(this, dialogHWnd), IntPtr.Zero);
925
UnsafeNativeMethods.SetFocus(new
HandleRef
(null, focusHandle));
winforms\Managed\System\WinForms\FolderBrowserDialog.cs (2)
341
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, hwnd), (int) NativeMethods.BFFM_SETSELECTION, 1, selectedPath);
353
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, hwnd), (int) NativeMethods.BFFM_ENABLEOK, 0, isFileSystemFolder ? 1 : 0);
winforms\Managed\System\WinForms\FontDialog.cs (9)
477
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, hWnd), NativeMethods.WM_CHOOSEFONT_GETLOGFONT, 0, lf);
479
int index = (int)UnsafeNativeMethods.SendDlgItemMessage(new
HandleRef
(null, hWnd), 0x473, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
481
UpdateColor((int)UnsafeNativeMethods.SendDlgItemMessage(new
HandleRef
(null, hWnd), 0x473,
501
IntPtr hWndCtl = UnsafeNativeMethods.GetDlgItem(new
HandleRef
(null, hWnd), NativeMethods.cmb4);
502
SafeNativeMethods.ShowWindow(new
HandleRef
(null, hWndCtl), NativeMethods.SW_HIDE);
503
hWndCtl = UnsafeNativeMethods.GetDlgItem(new
HandleRef
(null, hWnd), NativeMethods.stc4);
504
SafeNativeMethods.ShowWindow(new
HandleRef
(null, hWndCtl), NativeMethods.SW_HIDE);
573
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
708
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screenDC));
winforms\Managed\System\WinForms\Form.cs (85)
1778
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), NativeMethods.NullHandleRef,
2104
int exStyle = unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_EXSTYLE));
2107
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_EXSTYLE, new
HandleRef
(null, (IntPtr)cp.ExStyle));
2521
return new
HandleRef
(ownerWindow, ownerWindow.Handle);
2577
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), key, 0, 0, 0, 0,
2684
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.WM_SHOWWINDOW, value ? 1 : 0, 0);
2713
SafeNativeMethods.ShowWindow(new
HandleRef
(this, Handle), NativeMethods.SW_SHOW);
2789
SafeNativeMethods.ShowWindow(new
HandleRef
(this, hWnd), NativeMethods.SW_NORMAL);
2792
SafeNativeMethods.ShowWindow(new
HandleRef
(this, hWnd), NativeMethods.SW_MAXIMIZE);
2795
SafeNativeMethods.ShowWindow(new
HandleRef
(this, hWnd), NativeMethods.SW_MINIMIZE);
3091
UnsafeNativeMethods.SetForegroundWindow(new
HandleRef
(this, Handle));
3247
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_MINIMIZE,
3251
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_MINIMIZE,
3255
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_MAXIMIZE,
3259
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_MAXIMIZE,
3263
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_CLOSE,
3267
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_CLOSE,
3271
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_RESTORE,
3275
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_RESTORE,
3279
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_SIZE,
3283
UnsafeNativeMethods.EnableMenuItem(new
HandleRef
(this, hmenu), NativeMethods.SC_SIZE,
3342
IntPtr hmenu = UnsafeNativeMethods.GetSystemMenu(new
HandleRef
(this, Handle), false);
3433
SafeNativeMethods.GetClientRect(new
HandleRef
(this, h), ref rc);
3457
SafeNativeMethods.GetClientRect(new
HandleRef
(this, h), ref rc);
3696
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT, TaskbarOwner);
4452
ownerHandle = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT);
4458
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(null, ownerHandle), ref ownerRect);
4497
hWndOwner = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT);
5000
UnsafeNativeMethods.ClientToScreen(new
HandleRef
(this, Handle), ptToSnap);
5117
SafeNativeMethods.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);
5514
UnsafeNativeMethods.GetWindowPlacement(new
HandleRef
(this, Handle), ref wp);
5533
new
HandleRef
(this, this.Handle));
5544
etwcb.SetOwners(new
HandleRef
(this, this.Handle));
5552
UnsafeNativeMethods.SetWindowPlacement(new
HandleRef
(this, Handle), ref wp);
5767
UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(this, Handle));
5770
UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(MdiParentInternal, MdiParentInternal.Handle));
6091
else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE)
6107
if (UnsafeNativeMethods.GetWindowLong(new
HandleRef
(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) {
6113
hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT);
6114
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT, new
HandleRef
(owner, hWndOwner));
6156
else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE)
6171
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, hWndCapture), NativeMethods.WM_CANCELMODE, IntPtr.Zero, IntPtr.Zero);
6208
if (UnsafeNativeMethods.GetWindowLong(new
HandleRef
(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) {
6214
hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT);
6215
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT, new
HandleRef
(owner, hWndOwner));
6232
if (!UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWndActive))) hWndActive = hWndOwner;
6233
if (UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWndActive)) && SafeNativeMethods.IsWindowVisible(new
HandleRef
(null, hWndActive))) {
6234
UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(null, hWndActive));
6236
else if (UnsafeNativeMethods.IsWindow(new
HandleRef
(null, hWndOwner)) && SafeNativeMethods.IsWindowVisible(new
HandleRef
(null, hWndOwner))){
6237
UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(null, hWndOwner));
6434
ownerHwnd = new
HandleRef
(owner, owner.Handle);
6442
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHwnd);
6458
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new
HandleRef
(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
6462
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new
HandleRef
(this, Handle), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY);
6465
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new
HandleRef
(this, Handle), ColorTranslator.ToWin32(transparencyKey),
6520
UnsafeNativeMethods.SetMenu(new
HandleRef
(this, Handle), new
HandleRef
(menu, menu.Handle));
6523
UnsafeNativeMethods.SetMenu(new
HandleRef
(this, Handle), NativeMethods.NullHandleRef);
6547
UnsafeNativeMethods.SendMessage(new
HandleRef
(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero);
6553
UnsafeNativeMethods.SendMessage(new
HandleRef
(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero);
6559
IntPtr hMenu = UnsafeNativeMethods.GetMenu(new
HandleRef
(this, this.Handle));
6565
UnsafeNativeMethods.SetMenu(new
HandleRef
(this, this.Handle), NativeMethods.NullHandleRef);
6582
SafeNativeMethods.DrawMenuBar(new
HandleRef
(this, Handle));
6700
IntPtr hMenu = UnsafeNativeMethods.GetMenu(new
HandleRef
(this, this.Handle));
6830
SafeNativeMethods.RedrawWindow(new
HandleRef
(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
6848
UnsafeNativeMethods.GetWindowPlacement(new
HandleRef
(this, Handle), ref wp);
7260
UnsafeNativeMethods.PostMessage(new
HandleRef
(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam);
7363
UnsafeNativeMethods.ScreenToClient(new
HandleRef
(this, this.Handle), pt );
7754
HandleRef hRef = new
HandleRef
(null, hWnd);
7879
SafeNativeMethods.SetWindowPos(new
HandleRef
(window, window.Handle), NativeMethods.HWND_TOPMOST,
7884
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, owner.Width);
7886
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_SETTITLE, NativeMethods.TTI_WARNING, SR.GetString(SR.SecurityToolTipCaption));
7888
if (0 == (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO())) {
7892
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_ACTIVATE, 1, 0);
7918
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight));
7930
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetTOOLINFO());
7931
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO());
7932
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO());
7938
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight));
7939
UnsafeNativeMethods.SendMessage(new
HandleRef
(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, GetTOOLINFO());
winforms\Managed\System\WinForms\GroupBox.cs (1)
771
SafeNativeMethods.GetClientRect(new
HandleRef
(this, Handle), ref rect);
winforms\Managed\System\WinForms\Help.cs (4)
224
handle = new
HandleRef
(parent, parent.Handle);
227
handle = new
HandleRef
(null, UnsafeNativeMethods.GetActiveWindow());
315
handle = new
HandleRef
(parent, parent.Handle);
318
handle = new
HandleRef
(null, UnsafeNativeMethods.GetActiveWindow());
winforms\Managed\System\WinForms\HtmlDocument.cs (1)
832
SafeNativeMethods.VariantClear(new
HandleRef
(null, (IntPtr)(a + VariantSize * i)));
winforms\Managed\System\WinForms\ImageList.cs (28)
312
this.nativeImageList = new NativeImageList(SafeNativeMethods.ImageList_Duplicate(new
HandleRef
(himl, himl.Handle)));
314
if(SafeNativeMethods.ImageList_GetIconSize(new
HandleRef
(this, this.nativeImageList.Handle), out x, out y)) {
319
if(SafeNativeMethods.ImageList_GetImageInfo(new
HandleRef
(this, this.nativeImageList.Handle), 0, imageInfo)) {
321
UnsafeNativeMethods.GetObject(new
HandleRef
(null, imageInfo.hbmImage), Marshal.SizeOf(bmp), bmp);
483
int index = SafeNativeMethods.ImageList_ReplaceIcon(new
HandleRef
(this, Handle), -1, new
HandleRef
(icon, icon.Handle));
499
int index = SafeNativeMethods.ImageList_Add(new
HandleRef
(this, Handle), new
HandleRef
(null, hBitmap), new
HandleRef
(null, hMask));
500
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hBitmap));
501
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hMask));
551
SafeNativeMethods.ImageList_SetBkColor(new
HandleRef
(this, Handle), NativeMethods.CLR_NONE);
630
SafeNativeMethods.ImageList_DrawEx(new
HandleRef
(this, Handle), index, new
HandleRef
(g, dc), x, y,
654
UnsafeNativeMethods.CopyMemory(new
HandleRef
(this, destPtr), new
HandleRef
(this, srcPtr), Math.Abs(targetData.Stride));
708
if(SafeNativeMethods.ImageList_GetImageInfo(new
HandleRef
(this, this.Handle), index, imageInfo)) {
751
SafeNativeMethods.ImageList_DrawEx(new
HandleRef
(this, Handle), index, new
HandleRef
(graphics, dc), 0, 0,
949
SafeNativeMethods.ImageList_Destroy(new
HandleRef
(null, himl));
1073
return SafeNativeMethods.ImageList_GetImageCount(new
HandleRef
(owner, owner.Handle));
1171
bool ok = SafeNativeMethods.ImageList_Replace(new
HandleRef
(owner, owner.Handle), index, new
HandleRef
(null, hBitmap), new
HandleRef
(null, hMask));
1172
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hBitmap));
1173
SafeNativeMethods.DeleteObject(new
HandleRef
(null, hMask));
1424
SafeNativeMethods.ImageList_Remove(new
HandleRef
(owner, owner.Handle), -1);
1580
bool ok = SafeNativeMethods.ImageList_Remove(new
HandleRef
(owner, owner.Handle), index);
winforms\Managed\System\WinForms\ImageListStreamer.cs (2)
241
int hResult = SafeNativeMethods.ImageList_WriteEx(new
HandleRef
(this, imagelistHandle), NativeMethods.ILP_DOWNLEVEL, new UnsafeNativeMethods.ComStreamFromDataStream(stream));
248
return SafeNativeMethods.ImageList_Write(new
HandleRef
(this, imagelistHandle), new UnsafeNativeMethods.ComStreamFromDataStream(stream));
winforms\Managed\System\WinForms\InputLanguage.cs (1)
77
IntPtr handleOld = SafeNativeMethods.ActivateKeyboardLayout(new
HandleRef
(value, value.handle), 0);
winforms\Managed\System\WinForms\LinkLabel.cs (1)
406
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
winforms\Managed\System\WinForms\ListBox.cs (7)
1565
UnsafeNativeMethods.GetClientRect(new
HandleRef
(this, Handle), ref r);
1616
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LB_GETTEXT, index, sb);
1708
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LB_GETSELITEMS, count, result);
1782
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets);
2269
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets);
2349
SafeNativeMethods.SelectPalette(new
HandleRef
(null, dc), new
HandleRef
(null, oldPal), 0);
winforms\Managed\System\WinForms\ListView.cs (65)
446
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage);
688
int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
1642
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_GETTILEVIEWINFO, 0, tileViewInfo);
1663
bool retval = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SETTILEVIEWINFO, 0, tileViewInfo);
2242
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_ARRANGE, (int) value, 0);
2518
SafeNativeMethods.SelectObject(new
HandleRef
(nmcd->nmcd, nmcd->nmcd.hdc), new
HandleRef
(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle));
2842
SafeNativeMethods.SelectObject(new
HandleRef
(nmcd->nmcd, nmcd->nmcd.hdc), new
HandleRef
(null, odCacheFontHandle));
2852
SafeNativeMethods.SelectObject(new
HandleRef
(nmcd->nmcd, nmcd->nmcd.hdc), new
HandleRef
(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle));
3063
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_ENSUREVISIBLE, index, 0);
3184
int index = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle),
3286
displayIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_FINDITEM, lastIndex - 1, ref info);
3290
displayIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_FINDITEM, -1 /* beginning */, ref info);
3339
int displayIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi);
3366
int index = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi);
3379
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_GETITEMPOSITION, index, pt);
3553
iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi));
3555
iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_HITTEST, 0, lvhi));
3586
IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0);
3588
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, hwndHdr), null, true);
3692
return (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_INSERTCOLUMN, index, lvColumn);
3743
int retval = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this,this.Handle),NativeMethods.LVM_INSERTGROUP,index,lvgroup);
3940
insertIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_INSERTITEM, 0, ref lvItem);
4281
int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
4283
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE, new
HandleRef
(null, (IntPtr)style));
4288
int callbackMask = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_GETCALLBACKMASK, 0, 0));
4290
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SETCALLBACKMASK, callbackMask, 0);
4567
IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new
HandleRef
(this, this.Handle), NativeMethods.GW_CHILD);
4587
UnsafeNativeMethods.GetClientRect(new
HandleRef
(this, this.Handle), prc);
4594
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, hdrHWND), NativeMethods.HDM_LAYOUT, 0, ref hd);
4600
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, hdrHWND),
4601
new
HandleRef
(this, wpos.hwndInsertAfter),
4697
int retval = (int) UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle),
4761
int retval = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero);
4771
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SCROLL, 0, scrollY);
4826
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage);
4895
int retval = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SETCOLUMN, ch.Index, lvColumn);
4981
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, orderedColumns.Length, orderedColumns);
5045
IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_SETTOOLTIPS, new
HandleRef
(toolTip, toolTip.Handle), 0);
5046
UnsafeNativeMethods.DestroyWindow(new
HandleRef
(null, oldHandle));
5058
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem);
5071
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem);
5086
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SETITEMPOSITION32, index, pt);
5100
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SETITEMSTATE, index, ref lvItem);
5120
int colWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, 0, 0));
5142
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SETITEMTEXT, itemIndex, ref lvItem);
5180
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback);
5313
int retval = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle),
5352
bool retval = UnsafeNativeMethods.SendMessage(new
HandleRef
(this,Handle),NativeMethods.LVM_SETTILEVIEWINFO,0,tileViewInfo);
5369
int displayIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi);
5399
int displayIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi);
5478
Color foreColor = ColorTranslator.FromWin32(SafeNativeMethods.GetTextColor(new
HandleRef
(this, nmcd->hdc)));
5479
Color backColor = ColorTranslator.FromWin32(SafeNativeMethods.GetBkColor(new
HandleRef
(this, nmcd->hdc)));
5774
IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0);
5775
IntPtr hFont = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, hwndHdr), NativeMethods.WM_GETFONT, 0, 0);
5791
return (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi);
6150
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
8984
UnsafeNativeMethods.SendMessage(new
HandleRef
(owner, owner.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem);
9003
int nextSelected = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED);
9013
nextSelected = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED);
9025
UnsafeNativeMethods.SendMessage(new
HandleRef
(owner, owner.Handle), NativeMethods.LVM_DELETEALLITEMS, 0, 0);
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (2)
127
UnsafeNativeMethods.SendMessage(new
HandleRef
(listView, listView.Handle), NativeMethods.LVM_INSERTMARKHITTEST, point, lvInsertMark);
137
UnsafeNativeMethods.SendMessage(new
HandleRef
(listView, listView.Handle), NativeMethods.LVM_SETINSERTMARK, 0, lvInsertMark);
winforms\Managed\System\WinForms\ListViewItem.cs (3)
962
UnsafeNativeMethods.SendMessage(new
HandleRef
(lv, lv.Handle), NativeMethods.LVM_EDITLABEL, Index, 0);
1165
UnsafeNativeMethods.SendMessage(new
HandleRef
(listView, listView.Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem);
1193
UnsafeNativeMethods.SendMessage(new
HandleRef
(listView, listView.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem);
winforms\Managed\System\WinForms\MaskedTextBox.cs (4)
1201
HandleRef handle = new
HandleRef
(this, this.Handle);
1208
UnsafeNativeMethods.ImmNotifyIME(new
HandleRef
(null, inputContext), NativeMethods.NI_COMPOSITIONSTR, action, 0);
1212
UnsafeNativeMethods.ImmReleaseContext(handle, new
HandleRef
(null, inputContext));
2007
SafeNativeMethods.RedrawWindow(new
HandleRef
(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MDIClient.cs (9)
260
UnsafeNativeMethods.GetWindowPlacement(new
HandleRef
(child, child.Handle), ref wp);
271
UnsafeNativeMethods.SetWindowPlacement(new
HandleRef
(child, child.Handle), ref wp);
306
if (SafeNativeMethods.CombineRgn(new
HandleRef
(null, rgn1), new
HandleRef
(null, rgn1), new
HandleRef
(null, rgn2), NativeMethods.RGN_DIFF) == 0)
309
if (UnsafeNativeMethods.SetWindowRgn(new
HandleRef
(this, Handle), new
HandleRef
(null, rgn1), true) == 0) {
319
SafeNativeMethods.DeleteObject(new
HandleRef
(null, rgn2));
325
SafeNativeMethods.DeleteObject(new
HandleRef
(null, rgn1));
winforms\Managed\System\WinForms\MDIControlStrip.cs (4)
36
IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new
HandleRef
(this, Control.GetSafeHandle(target)), /*bRevert=*/false);
131
IntPtr hIcon = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Control.GetSafeHandle(target)), NativeMethods.WM_GETICON, NativeMethods.ICON_SMALL, 0);
167
IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new
HandleRef
(this, Control.GetSafeHandle(target)), /*bRevert=*/false);
185
system.DropDown = ToolStripDropDownMenu.FromHMenu(UnsafeNativeMethods.GetSystemMenu(new
HandleRef
(this, Control.GetSafeHandle(target)), /*bRevert=*/false), target);
winforms\Managed\System\WinForms\Menu.cs (4)
217
UnsafeNativeMethods.DestroyMenu(new
HandleRef
(this, handle));
282
while (UnsafeNativeMethods.GetMenuItemCount(new
HandleRef
(this, handle)) > 0) {
283
UnsafeNativeMethods.RemoveMenu(new
HandleRef
(this, handle), 0, NativeMethods.MF_BYPOSITION);
313
UnsafeNativeMethods.DestroyMenu(new
HandleRef
(this, handle));
winforms\Managed\System\WinForms\MenuItem.cs (13)
267
UnsafeNativeMethods.SetMenuDefaultItem(new
HandleRef
(menu, menu.handle), MenuID, false);
270
UnsafeNativeMethods.SetMenuDefaultItem(new
HandleRef
(menu, menu.handle), -1, false);
453
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(menu, menu.handle), MenuID, false, info);
473
int count = UnsafeNativeMethods.GetMenuItemCount(new
HandleRef
(menu, menu.Handle));
480
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(menu, menu.handle), i, true, info);
857
UnsafeNativeMethods.InsertMenuItem(new
HandleRef
(menu, menu.handle), -1, true, info);
1433
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(menu, menu.handle), MenuID, false, info);
1439
UnsafeNativeMethods.SetMenuItemInfo(new
HandleRef
(menu, menu.handle), MenuID, false, info);
1461
UnsafeNativeMethods.SetMenuItemInfo(new
HandleRef
(menu, menu.handle), MenuID, false, info);
1478
SafeNativeMethods.DrawMenuBar(new
HandleRef
(f, f.Handle));
1506
SafeNativeMethods.SelectPalette(new
HandleRef
(null, dis.hDC), new
HandleRef
(null, oldPal), 0);
1534
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, screendc));
winforms\Managed\System\WinForms\MessageBox.cs (2)
484
result = Win32ToDialogResult(SafeNativeMethods.MessageBox(new
HandleRef
(owner, handle), text, caption, style));
495
UnsafeNativeMethods.SendMessage(new
HandleRef
(owner, handle), NativeMethods.WM_SETFOCUS, 0, 0);
winforms\Managed\System\WinForms\MonthCalendar.cs (7)
1059
int res = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_GETTODAY, 0, st);
1525
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_GETMONTHRANGE, flag, sa);
1575
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_HITTEST, 0, mchi);
1637
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_SETTODAY, 0, st);
2027
if ((int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_SETRANGE, flag, sa) == 0)
2163
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_SETSELRANGE , 0, sa);
2263
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.MCM_SETTODAY, 0, st);
winforms\Managed\System\WinForms\NativeMethods.cs (7)
62
public static HandleRef NullHandleRef = new
HandleRef
(null, IntPtr.Zero);
667
public static HandleRef HWND_TOP = new
HandleRef
(null, (IntPtr)0);
669
public static HandleRef HWND_BOTTOM = new
HandleRef
(null, (IntPtr)1);
671
public static HandleRef HWND_TOPMOST = new
HandleRef
(null, new IntPtr(-1));
673
public static HandleRef HWND_NOTOPMOST = new
HandleRef
(null, new IntPtr(-2));
675
public static HandleRef HWND_MESSAGE = new
HandleRef
(null, new IntPtr(-3));
2732
hicon = SafeNativeMethods.CopyImage(new
HandleRef
(icon, icon.Handle), NativeMethods.IMAGE_ICON, icon.Size.Width, icon.Size.Height, 0);
winforms\Managed\System\WinForms\NativeWindow.cs (32)
174
if (UnsafeNativeMethods.IsWindow(new
HandleRef
(null, handle))) {
176
int id = SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(null, handle), out lpdwProcessId);
182
SafeNativeMethods.GetExitCodeThread(new
HandleRef
(null, threadHandle), out exitCode);
185
if (UnsafeNativeMethods.SendMessageTimeout(new
HandleRef
(null, handle),
204
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, h), NativeMethods.WM_CLOSE, 0, 0);
455
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(wrapper, handle), NativeMethods.GWL_ID, new
HandleRef
(wrapper, (IntPtr)globalID));
607
userDefWindowProc = UnsafeNativeMethods.GetProcAddress(new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc);
613
defWindowProc = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_WNDPROC);
628
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_WNDPROC, windowProc);
629
windowProcPtr = 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 &&
633
unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_ID))) == 0) {
634
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_ID, new
HandleRef
(this, handle));
764
cp.Caption, cp.Style, cp.X, cp.Y, cp.Width, cp.Height, new
HandleRef
(cp, cp.Parent), NativeMethods.NullHandleRef,
765
new
HandleRef
(null, modHandle), cp.Param);
855
if (!UnsafeNativeMethods.DestroyWindow(new
HandleRef
(this, handle))) {
858
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, handle), NativeMethods.WM_CLOSE, 0, 0);
1085
HandleRef href = new
HandleRef
(b, b.handle);
1086
UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new
HandleRef
(null, userDefWindowProc));
1361
HandleRef href = new
HandleRef
(this, handle);
1365
IntPtr currentWinPrc = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, handle), NativeMethods.GWL_WNDPROC);
1377
UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new
HandleRef
(this, defWindowProc));
1391
UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new
HandleRef
(this, userDefWindowProc));
1417
UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new
HandleRef
(this, userDefWindowProc));
1492
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(null, hWnd), NativeMethods.GWL_WNDPROC, new
HandleRef
(this, defWindowProc));
1575
userDefWindowProc = UnsafeNativeMethods.GetProcAddress(new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc);
1635
bool ok = UnsafeNativeMethods.GetClassInfo(new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle(null)), windowClassName, wcls);
1645
if (UnsafeNativeMethods.UnregisterClass(windowClassName, new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle(null)))) {
1679
if (registered && UnsafeNativeMethods.UnregisterClass(windowClassName, new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle(null)))) {
winforms\Managed\System\WinForms\NotifyIcon.cs (6)
485
UnsafeNativeMethods.PostMessage(new
HandleRef
(window, window.Handle), NativeMethods.WM_CLOSE, 0, 0);
729
UnsafeNativeMethods.SetForegroundWindow(new
HandleRef
(window, window.Handle));
734
SafeNativeMethods.TrackPopupMenuEx(new
HandleRef
(contextMenu, contextMenu.Handle),
738
new
HandleRef
(window, window.Handle),
742
UnsafeNativeMethods.PostMessage(new
HandleRef
(window, window.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero);
1006
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), NativeMethods.WM_CLOSE, 0, 0);
winforms\Managed\System\WinForms\PaintEvent.cs (2)
170
SafeNativeMethods.SelectPalette(new
HandleRef
(this, dc), new
HandleRef
(this, oldPal), 0);
winforms\Managed\System\WinForms\Printing\PageSetupDialog.cs (2)
428
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
429
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
winforms\Managed\System\WinForms\Printing\PrintDialog.cs (5)
450
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
451
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
551
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevMode));
553
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.hDevNames));
555
UnsafeNativeMethods.GlobalFree(new
HandleRef
(data, data.pageRanges));
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (8)
369
if (SafeNativeMethods.GetScrollInfo(new
HandleRef
(this, m.HWnd), direction, si))
427
screendpi = new Point(UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(tempGraphics, dc), NativeMethods.LOGPIXELSX),
428
UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(tempGraphics, dc), NativeMethods.LOGPIXELSY));
750
SafeNativeMethods.ScrollWindow(new
HandleRef
(this, Handle),
756
UnsafeNativeMethods.SetScrollPos(new
HandleRef
(this, Handle), NativeMethods.SB_HORZ, position.X, true);
757
UnsafeNativeMethods.SetScrollPos(new
HandleRef
(this, Handle), NativeMethods.SB_VERT, position.Y, true);
769
UnsafeNativeMethods.SetScrollInfo(new
HandleRef
(this, Handle), NativeMethods.SB_VERT, info, true);
775
UnsafeNativeMethods.SetScrollInfo(new
HandleRef
(this, Handle), NativeMethods.SB_HORZ, info, true);
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
462
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor));
788
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
789
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor));
893
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor));
894
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\PropertyGrid.cs (4)
3840
IntPtr hWndParent = UnsafeNativeMethods.GetParent(new
HandleRef
(this, Handle));
3842
UnsafeNativeMethods.SetFocus(new
HandleRef
(null, hWndParent));
4665
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(child, child.Handle), new
HandleRef
(this, Handle), temp, 1);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (9)
2208
oldTextColor = SafeNativeMethods.SetTextColor(new
HandleRef
(g, hdc), SafeNativeMethods.RGBToCOLORREF(textColor.ToArgb()));
2209
oldBkColor = SafeNativeMethods.SetBkColor(new
HandleRef
(g, hdc), SafeNativeMethods.RGBToCOLORREF(bkColor.ToArgb()));
2210
hfont = SafeNativeMethods.SelectObject(new
HandleRef
(g, hdc), new
HandleRef
(null, hfont));
2231
IntUnsafeNativeMethods.DrawText(new
HandleRef
(g, hdc), strValue, ref lpRect, format);
2234
SafeNativeMethods.SetTextColor(new
HandleRef
(g, hdc), oldTextColor);
2235
SafeNativeMethods.SetBkColor(new
HandleRef
(g, hdc), oldBkColor);
2236
hfont = SafeNativeMethods.SelectObject(new
HandleRef
(g, hdc), new
HandleRef
(null, hfont));
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (6)
89
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]));
160
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO((Control)sender));
204
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), NativeMethods.HWND_TOPMOST,
209
if (0 == (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(c))) {
216
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
230
if (0 == (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]))) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (36)
420
int exStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(edit, edit.Handle), NativeMethods.GWL_EXSTYLE)));
791
UnsafeNativeMethods.ClientToScreen(new
HandleRef
(this, Handle), pt);
998
gotfocus = IntPtr.Zero != UnsafeNativeMethods.SetFocus(new
HandleRef
(this, Handle));
1663
SafeNativeMethods.SetWindowPos(new
HandleRef
(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags);
1691
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new
HandleRef
(this, Handle));
1706
SafeNativeMethods.ShowWindow(new
HandleRef
(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA);
1735
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new
HandleRef
(this, Handle));
1737
SafeNativeMethods.ShowWindow(new
HandleRef
(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA);
2765
hwnd != IntPtr.Zero; hwnd = UnsafeNativeMethods.GetParent(new
HandleRef
(null, hwnd))) {
3280
if (UnsafeNativeMethods.IsChild(new
HandleRef
(null, foregroundWindow), new
HandleRef
(null, this.Handle))) {
3659
SafeNativeMethods.ExternalDeleteObject(new
HandleRef
(this, baseHfont));
3663
SafeNativeMethods.ExternalDeleteObject(new
HandleRef
(this, boldHfont));
3870
IntPtr hdc = UnsafeNativeMethods.GetDC(new
HandleRef
(DropDownListBox, DropDownListBox.Handle));
3876
hFont = SafeNativeMethods.SelectObject(new
HandleRef
(DropDownListBox, hdc), new
HandleRef
(Font, hFont));
3886
IntUnsafeNativeMethods.GetTextExtentPoint32(new
HandleRef
(DropDownListBox, hdc), s, textSize);
3890
SafeNativeMethods.GetTextMetrics(new
HandleRef
(DropDownListBox, hdc), ref tm);
3895
hFont = SafeNativeMethods.SelectObject(new
HandleRef
(DropDownListBox, hdc), new
HandleRef
(Font, hFont));
3898
SafeNativeMethods.DeleteObject(new
HandleRef
(Font, hFont));
3899
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(DropDownListBox, DropDownListBox.Handle), new
HandleRef
(DropDownListBox, hdc));
4945
UnsafeNativeMethods.SetFocus(new
HandleRef
(null, priorFocus));
5346
UnsafeNativeMethods.PostMessage(new
HandleRef
(Edit, Edit.Handle), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0);
5351
UnsafeNativeMethods.PostMessage(new
HandleRef
(Edit, Edit.Handle), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam);
5683
hWnd = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(null, hWnd), NativeMethods.GWL_HWNDPARENT);
6104
(int) UnsafeNativeMethods.GetDpiForWindow(new
HandleRef
(this, HandleInternal));
6650
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero);
7149
SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(control, control.Handle), out thisProcessID);
7192
return UnsafeNativeMethods.CallNextHookEx(new
HandleRef
(this, mouseHookHandle), nCode, wparam, lparam);
7205
UnsafeNativeMethods.UnhookWindowsHookEx(new
HandleRef
(this, mouseHookHandle));
7239
SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(null, hWndAtPoint), out pid);
7740
UnsafeNativeMethods.ScreenToClient(new
HandleRef
(Owner, Owner.Handle), pt);
winforms\Managed\System\WinForms\RichTextBox.cs (53)
377
StringBuilder pathBuilder = UnsafeNativeMethods.GetModuleFileNameLongPath(new
HandleRef
(null, moduleHandle));
526
if (SafeNativeMethods.GetWindowTextLength(new
HandleRef
(this, Handle)) > 0) {
597
opt = (RichTextBoxLanguageOptions)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETLANGOPTIONS, 0, 0);
610
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETLANGOPTIONS, 0, (int) value);
718
IntPtr hDC = UnsafeNativeMethods.CreateIC("DISPLAY", null, null, new
HandleRef
(null, IntPtr.Zero));
724
UnsafeNativeMethods.DeleteDC(new
HandleRef
(null, hDC));
832
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
879
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
903
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
933
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
981
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf);
1016
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf);
1067
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf2);
1114
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1130
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1155
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1171
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1284
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1302
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1324
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1346
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf);
1354
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf);
1518
return unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETTEXTLENGTHEX, gtl, 0 /*ignored*/));
2027
position = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_FINDTEXT, findOptions, ft);
2065
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, chrg);
2113
int textLen = SafeNativeMethods.GetWindowTextLength(new
HandleRef
(this, Handle));
2170
len = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg);
2247
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf);
2253
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf2);
2324
int index = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, wpt);
2378
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.EM_POSFROMCHAR, pt, index);
2604
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETOPTIONS, (IntPtr)RichTextBoxConstants.ECOOP_OR,
2720
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_PASTESPECIAL, clipFormat.Id, rps);
2873
return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf);
2879
return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, charRange, cf);
2912
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfA);
2926
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfW);
2953
logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSX);
2954
logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSY);
2956
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
3017
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, cr);
3068
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es64);
3074
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es);
3165
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es64);
3171
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es);
3282
UnsafeNativeMethods.SendCallbackMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback);
3291
UnsafeNativeMethods.DragAcceptFiles(new
HandleRef
(this, Handle), false);
3383
int len = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg);
3446
if (UnsafeNativeMethods.DragQueryFileLongPath(new
HandleRef
(endropfiles, endropfiles.hDrop), 0, path) != 0)
3622
int textLength = SafeNativeMethods.GetWindowTextLength(new
HandleRef
(this, Handle));
3627
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), NativeMethods.EM_SETSEL, selEnd - 1, selEnd);
3692
UnsafeNativeMethods.SetCursor(new
HandleRef
(Cursors.Hand, Cursors.Hand.Handle));
3831
int hr = UnsafeNativeMethods.ReadClassStg(new
HandleRef
(null, lpstg), ref realClsid);
winforms\Managed\System\WinForms\Screen.cs (6)
91
SafeNativeMethods.GetMonitorInfo(new
HandleRef
(null, monitor), info);
104
this.bitDepth = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, screenDC), NativeMethods.BITSPIXEL);
105
this.bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, screenDC), NativeMethods.PLANES);
108
UnsafeNativeMethods.DeleteDC(new
HandleRef
(null, screenDC));
248
SafeNativeMethods.GetMonitorInfo(new
HandleRef
(null, hmonitor), info);
364
return new Screen(SafeNativeMethods.MonitorFromWindow(new
HandleRef
(null, hwnd), MONITOR_DEFAULTTONEAREST));
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
878
SafeNativeMethods.ScrollWindowEx(new
HandleRef
(this, Handle), xDelta, yDelta,
991
SafeNativeMethods.GetScrollInfo(new
HandleRef
(this, Handle), fnBar, si);
winforms\Managed\System\WinForms\ScrollBar.cs (2)
810
UnsafeNativeMethods.SetScrollInfo(new
HandleRef
(this, Handle), NativeMethods.SB_CTL, si, true);
895
SafeNativeMethods.GetScrollInfo(new
HandleRef
(this, Handle), NativeMethods.SB_CTL, si);
winforms\Managed\System\WinForms\ScrollProperties.cs (3)
321
UnsafeNativeMethods.SetScrollInfo(new
HandleRef
(parent, parent.Handle), Orientation, si, true);
333
UnsafeNativeMethods.EnableScrollBar(new
HandleRef
(parent, parent.Handle), Orientation, NativeMethods.ESB_ENABLE_BOTH);
336
UnsafeNativeMethods.EnableScrollBar(new
HandleRef
(parent, parent.Handle), Orientation, NativeMethods.ESB_DISABLE_BOTH);
winforms\Managed\System\WinForms\SendKeys.cs (5)
240
new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle(null)),
257
new
HandleRef
(null, UnsafeNativeMethods.GetModuleHandle(null)),
264
UnsafeNativeMethods.UnhookWindowsHookEx(new
HandleRef
(null, hookHandle));
979
UnsafeNativeMethods.UnhookWindowsHookEx(new
HandleRef
(null, hhook));
1101
UnsafeNativeMethods.CallNextHookEx(new
HandleRef
(null, SendKeys.hhook), code, wparam, lparam);
winforms\Managed\System\WinForms\SplitContainer.cs (10)
589
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
1636
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
1638
IntPtr saveBrush = SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, halftone));
1639
SafeNativeMethods.PatBlt(new
HandleRef
(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
1640
SafeNativeMethods.SelectObject(new
HandleRef
(this, dc), new
HandleRef
(null, saveBrush));
1641
SafeNativeMethods.DeleteObject(new
HandleRef
(null, halftone));
1642
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, parentHandle), new
HandleRef
(null, dc));
winforms\Managed\System\WinForms\Splitter.cs (9)
773
IntPtr dc = UnsafeNativeMethods.GetDCEx(new
HandleRef
(ParentInternal, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
775
IntPtr saveBrush = SafeNativeMethods.SelectObject(new
HandleRef
(ParentInternal, dc), new
HandleRef
(null, halftone));
776
SafeNativeMethods.PatBlt(new
HandleRef
(ParentInternal, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT);
777
SafeNativeMethods.SelectObject(new
HandleRef
(ParentInternal, dc), new
HandleRef
(null, saveBrush));
778
SafeNativeMethods.DeleteObject(new
HandleRef
(null, halftone));
779
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(ParentInternal, parentHandle), new
HandleRef
(null, dc));
winforms\Managed\System\WinForms\StatusBar.cs (8)
602
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.SB_SETPARTS, 1, offsets);
616
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.SB_SETPARTS, length, offsets2);
1783
ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(p.MainToolTip, p.MainToolTip.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool));
1786
ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool));
1795
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(tool));
1800
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTOOLINFO, 0, GetTOOLINFO(tool));
1815
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), NativeMethods.HWND_TOPMOST,
1823
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\StatusBarPanel.cs (2)
643
int result = (int) UnsafeNativeMethods.SendMessage(new
HandleRef
(parent, parent.Handle), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText);
657
result = (int) UnsafeNativeMethods.SendMessage(new
HandleRef
(parent, parent.Handle), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (1)
581
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(this, this.Handle), rootHwnd, gripLocation, 1);
winforms\Managed\System\WinForms\SystemInformation.cs (2)
137
int lines = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(null, hWndMouseWheel), message, 0, 0);
1135
if (UnsafeNativeMethods.GetUserObjectInformation(new
HandleRef
(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) {
winforms\Managed\System\WinForms\TabControl.cs (12)
1066
int index = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TCM_INSERTITEM, tabPageCount + 1, tcitem);
1067
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), tabBaseReLayoutMessage, IntPtr.Zero, IntPtr.Zero);
1309
retIndex = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TCM_INSERTITEM, index, tcitem);
1362
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, tooltipHwnd),
1738
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TCM_SETTOOLTIPS, new
HandleRef
(toolTip, toolTip.Handle), 0);
1751
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TCM_SETITEM, index, tcitem);
1754
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero);
2061
SafeNativeMethods.SelectPalette(new
HandleRef
(null, dis.hDC), new
HandleRef
(null, oldPal), 0);
2136
while (UnsafeNativeMethods.PeekMessage(ref msg, new
HandleRef
(this, hwnd),
2205
UnsafeNativeMethods.SendMessage(new
HandleRef
(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\TextBox.cs (4)
608
SafeNativeMethods.RedrawWindow(new
HandleRef
(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
786
if (!stringSource.Bind(new
HandleRef
(this, Handle), (int)AutoCompleteMode))
813
int ret = SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, Handle) , (int)AutoCompleteSource | mode);
835
SafeNativeMethods.SHAutoComplete(new
HandleRef
(this, Handle) , mode);
winforms\Managed\System\WinForms\TextBoxBase.cs (6)
1013
UnsafeNativeMethods.SendMessage( new
HandleRef
( this, Handle ), NativeMethods.EM_GETSEL, ref start, ref end );
1258
return SafeNativeMethods.GetWindowTextLength(new
HandleRef
(this, Handle));
1318
UnsafeNativeMethods.SetWindowText(new
HandleRef
(this, Handle), value);
1756
int index = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, longPoint);
1795
int i = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.EM_POSFROMCHAR, index, 0);
1836
if (UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), RichTextBoxConstants.EM_GETOLEINTERFACE, 0, out editOle) != 0) {
winforms\Managed\System\WinForms\Timer.cs (5)
347
int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new
HandleRef
(this, hWnd), out pid);
367
_timerID = (int) SafeNativeMethods.SetTimer(new
HandleRef
(this, Handle), TimerID++, interval, IntPtr.Zero);
392
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, hWnd), NativeMethods.WM_CLOSE, 0, 0);
399
if (_stoppingTimer || hWnd == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(new
HandleRef
(this, hWnd))) {
409
SafeNativeMethods.KillTimer(new
HandleRef
(this, hWnd), _timerID);
winforms\Managed\System\WinForms\ToolBar.cs (11)
1149
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TB_SETBUTTONINFO, x, ref tbbi);
1200
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TB_INSERTBUTTON, index, ref tbbutton);
1237
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TB_SETBUTTONINFO, index, ref tbbi);
1494
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TB_SETTOOLTIPS, new
HandleRef
(toolTip, toolTip.Handle), 0);
1556
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(nmTB.hdr, nmTB.hdr.hwndFrom), NativeMethods.NullHandleRef, ref rc, 2);
1564
new
HandleRef
(menu, menu.Handle),
1569
new
HandleRef
(this, Handle), tpm);
1707
int nRet = UnsafeNativeMethods.GetWindowPlacement(new
HandleRef
(null, note.hwndFrom), ref wndPlacement);
1733
UnsafeNativeMethods.ClientToScreen(new
HandleRef
(this, this.Handle), leftTop);
1753
SafeNativeMethods.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)
335
UnsafeNativeMethods.SendMessage(new
HandleRef
(parent, parent.Handle), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc);
559
int buttonID = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(Parent, Parent.Handle), NativeMethods.TB_GETBUTTONINFO, commandId, ref button);
winforms\Managed\System\WinForms\ToolStrip.cs (12)
2843
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)imageHdc,
2848
SafeNativeMethods.BitBlt(new
HandleRef
(this, desthDC), bounds.X, bounds.Y, bounds.Width, bounds.Height,
2849
new
HandleRef
(g, imageHdc), 0, 0, NativeMethods.SRCCOPY);
4530
HandleRef thisHandle = new
HandleRef
(this, this.Handle);
4531
HandleRef otherHandle = new
HandleRef
(null, otherHwnd);
4720
IntPtr hwndClicked = UnsafeNativeMethods.ChildWindowFromPointEx(new
HandleRef
(null, Handle), pt.X, pt.Y,(int)(GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled | GetChildAtPointSkip.Transparent));
5165
if (!UnsafeNativeMethods.IsChild(new
HandleRef
(this, ownerToolStrip.Handle), new
HandleRef
(this,m.HWnd))) {
5167
if (rootHwnd.Handle == m.HWnd || UnsafeNativeMethods.IsChild(rootHwnd, new
HandleRef
(this,m.HWnd))) {
5232
cachedItemHDC = new
HandleRef
(this, compatibleHDC);
5236
cachedItemBitmap = new
HandleRef
(this, SafeNativeMethods.CreateCompatibleBitmap(toolStripHDC, bitmapSize.Width, bitmapSize.Height));
5242
SafeNativeMethods.ExternalDeleteObject(new
HandleRef
(null, oldBitmap));
winforms\Managed\System\WinForms\ToolStripDropDown.cs (7)
1103
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), topMostFlag, 0, 0, 0, 0,
1672
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd);
1679
HandleRef ownerHandle = new
HandleRef
(ownerWindow, ownerWindow.Handle);
1680
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHandle);
1841
else if (IsHandleCreated && SafeNativeMethods.IsWindowEnabled(new
HandleRef
(this, Handle))) {
1842
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0,
2022
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new
HandleRef
(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (1)
280
HandleRef menuHandle = new
HandleRef
(null, hmenu);
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (2)
260
int n = UnsafeNativeMethods.RegisterDragDrop(new
HandleRef
(owner, owner.Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this)));
276
int n = UnsafeNativeMethods.RevokeDragDrop(new
HandleRef
(owner, owner.Handle));
winforms\Managed\System\WinForms\ToolStripManager.cs (15)
854
ActiveHwndInternal = new
HandleRef
(this, hwndActive);
979
ActiveHwndInternal = new
HandleRef
(this, topLevel.Handle);
1050
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(activeToolStrip, hwndMouseMessageIsFrom), new
HandleRef
(activeToolStrip, activeToolStrip.Handle), pt, 1);
1126
ActiveHwndInternal = new
HandleRef
(this, hwndActive);
1246
HandleRef hwndActiveToolStrip = new
HandleRef
(activeToolStrip, activeToolStrip.Handle);
1247
HandleRef hwndCurrentActiveWindow = new
HandleRef
(null, UnsafeNativeMethods.GetActiveWindow());
1286
if (!IsChildOrSameWindow(hwndActiveToolStrip, new
HandleRef
(null, m.HWnd))) {
1292
&& (IsChildOrSameWindow(new
HandleRef
(toplevelToolStrip, toplevelToolStrip.Handle),
1293
new
HandleRef
(null, m.HWnd)))) {
1301
else if (!IsChildOrSameWindow(ActiveHwnd, new
HandleRef
(null, m.HWnd))) {
1414
new
HandleRef
(null, IntPtr.Zero),
1440
return UnsafeNativeMethods.CallNextHookEx(new
HandleRef
(this, messageHookHandle), nCode, wparam, lparam);
1446
UnsafeNativeMethods.UnhookWindowsHookEx(new
HandleRef
(this, messageHookHandle));
1709
IntPtr hMenu = UnsafeNativeMethods.GetMenu(new
HandleRef
(toplevelControl, toplevelControl.Handle));
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (6)
712
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info);
732
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info);
743
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info);
776
UnsafeNativeMethods.GetMenuItemInfo(new
HandleRef
(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info);
877
UnsafeNativeMethods.PostMessage( new
HandleRef
(this, targetWindowHandle), NativeMethods.WM_SYSCOMMAND,nativeMenuCommandID, 0);
883
UnsafeNativeMethods.PostMessage( new
HandleRef
(this, targetWindowHandle), NativeMethods.WM_COMMAND, nativeMenuCommandID, 0);
winforms\Managed\System\WinForms\ToolStripPanel.cs (2)
858
while (UnsafeNativeMethods.PeekMessage(ref msg, new
HandleRef
(this, IntPtr.Zero),
861
SafeNativeMethods.UpdateWindow(new
HandleRef
(null, msg.hwnd));
winforms\Managed\System\WinForms\ToolStripTextBox.cs (8)
648
UnsafeNativeMethods.GetClientRect(new
HandleRef
(this, this.Handle), ref rect);
727
hTotalRegion = new
HandleRef
(this, SafeNativeMethods.CreateRectRgn(0, 0, this.Width, this.Height));
728
hClientRegion = new
HandleRef
(this, SafeNativeMethods.CreateRectRgn(absoluteClientRectangle.left, absoluteClientRectangle.top, absoluteClientRectangle.right, absoluteClientRectangle.bottom));
729
hNonClientRegion = new
HandleRef
(this, SafeNativeMethods.CreateRectRgn(0,0,0,0));
735
SafeNativeMethods.RedrawWindow(new
HandleRef
(this, Handle),
852
HandleRef hdc = new
HandleRef
(this, UnsafeNativeMethods.GetWindowDC(new
HandleRef
(this,m.HWnd)));
887
UnsafeNativeMethods.ReleaseDC(new
HandleRef
(this, this.Handle),hdc);
winforms\Managed\System\WinForms\ToolTip.cs (57)
144
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_ACTIVATE, (value==true)? 1: 0, 0);
225
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(backColor), 0);
290
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(foreColor), 0);
357
IntPtr rootHwnd =UnsafeNativeMethods.GetAncestor(new
HandleRef
(window, window.Handle), NativeMethods.GA_ROOT);
538
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title);
542
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_UPDATE, 0, 0);
577
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, toolTipTitle);
581
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_UPDATE, 0, 0);
898
int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
900
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE, new
HandleRef
(null, (IntPtr)style));
906
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
926
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_ACTIVATE, (active == true) ? 1 : 0, 0);
929
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(BackColor), 0);
932
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(ForeColor), 0);
937
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title);
971
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_ADDTOOL, 0, tool);
1066
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(ctl));
1116
return (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETDELAYTIME, type, 0);
1210
bool isWindowMirrored = ((unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, hWnd), NativeMethods.GWL_STYLE)) & NativeMethods.WS_EX_LAYOUTRTL) == NativeMethods.WS_EX_LAYOUTRTL);
1284
IntPtr found = UnsafeNativeMethods.ChildWindowFromPointEx(new
HandleRef
(null, baseHwnd), pt.X, pt.Y, NativeMethods.CWP_SKIPINVISIBLE);
1401
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETDELAYTIME, type, time);
1478
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETTOOLINFO,
1557
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(associatedControl, associatedControl.Handle), ref r);
1660
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(window, Control.GetSafeHandle(window)), ref r);
1687
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(window, Control.GetSafeHandle(window)), ref r);
1712
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(window, Control.GetSafeHandle(window)), ref r);
1737
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(window, Control.GetSafeHandle(window)), ref r);
1783
IntPtr bubbleSizeInt = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_GETBUBBLESIZE, 0, this.GetMinToolInfoForTool(tool.GetOwnerWindow()));
1931
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(pointX, pointY));
1960
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetWinTOOLINFO(hWnd));
1961
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_DELTOOL, 0, GetWinTOOLINFO(hWnd));
2018
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETTOOLINFO, 0, ti);
2040
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_SETTOOLINFO, 0, ti);
2041
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, ti);
2075
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo);
2076
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, toolInfo);
2173
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, this.Handle),
2186
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
2189
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti);
2233
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti);
2247
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(win, Control.GetSafeHandle(win)), ref r);
2285
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
2289
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti);
2319
UnsafeNativeMethods.GetWindowRect(new
HandleRef
(this, Handle), ref r);
2325
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_ADJUSTRECT, 1, ref r);
2339
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, maxwidth);
2344
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, this.Handle),
2353
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, this.Handle),
2372
SafeNativeMethods.ShowWindow(new
HandleRef
(this, Handle), NativeMethods.SW_HIDE);
2400
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti);
2494
int ret = (int)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti);
2516
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width);
2599
IntPtr dc = UnsafeNativeMethods.BeginPaint(new
HandleRef
(this,Handle),ref ps);
2610
int ret = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti));
2620
font = Font.FromHfont(UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.WM_GETFONT, 0, 0));
2640
UnsafeNativeMethods.EndPaint(new
HandleRef
(this,Handle),ref ps);
winforms\Managed\System\WinForms\TreeNode.cs (22)
284
if ((int)UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) == 0) {
307
if ((int)UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 0, ref rc) == 0) {
345
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
637
bool visible = ((int)UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) != 0);
712
IntPtr next = UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle),
840
IntPtr prev = UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle),
920
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_GETITEM, 0, ref item);
1208
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, 0, handle);
1382
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_COLLAPSE, Handle);
1493
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, cancel?1:0, 0);
1554
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_ENSUREVISIBLE, 0, Handle);
1570
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_EXPAND, Handle);
1711
IntPtr editHandle = UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_GETEDITCONTROL, 0, 0);
1716
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, 0 /* fCancel==FALSE */, 0);
1719
handle = UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_INSERTITEM, 0, ref tvis);
1728
UnsafeNativeMethods.PostMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle);
1731
SafeNativeMethods.InvalidateRect(new
HandleRef
(tv, tv.Handle), null, false);
1739
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.WM_SETREDRAW, 1, 0);
1806
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_DELETEITEM, 0, handle);
1832
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
1944
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
1964
UnsafeNativeMethods.SendMessage(new
HandleRef
(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
winforms\Managed\System\WinForms\TreeView.cs (38)
358
int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
1750
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero);
1764
UnsafeNativeMethods.SendMessage(new
HandleRef
(toolTip, toolTip.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
1765
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, this.Handle), NativeMethods.TVM_SETTOOLTIPS, new
HandleRef
(toolTip, toolTip.Handle), 0);
1787
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi);
1837
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi);
1992
int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
1994
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE, new
HandleRef
(null, (IntPtr)style));
1998
int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE)));
2000
UnsafeNativeMethods.SetWindowLong(new
HandleRef
(this, Handle), NativeMethods.GWL_STYLE, new
HandleRef
(null, (IntPtr)style));
2045
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags);
2051
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags);
2098
SafeNativeMethods.ImageList_Destroy_Native(new
HandleRef
(this, handleOld));
2109
SafeNativeMethods.ImageList_Destroy_Native(new
HandleRef
(this, handle));
2167
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip);
2580
if (unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc)) != 0)
2581
SafeNativeMethods.InvalidateRect(new
HandleRef
(this, Handle), ref rc, true);
2732
if (UnsafeNativeMethods.GetScrollInfo(new
HandleRef
(this, Handle), NativeMethods.SB_HORZ,si) != false) {
2793
SafeNativeMethods.SelectObject(new
HandleRef
(nmcd.nmcd, nmcd.nmcd.hdc), new
HandleRef
(renderinfo, renderinfo.FontHandle));
2908
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip);
2920
UnsafeNativeMethods.SendMessage(new
HandleRef
(this, tooltipHandle), NativeMethods.TTM_ADJUSTRECT, 1, ref bounds);
2921
SafeNativeMethods.SetWindowPos(new
HandleRef
(this, tooltipHandle),
2943
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip);
3022
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip);
3095
UnsafeNativeMethods.SetForegroundWindow(new
HandleRef
(this, this.Handle));
3099
SafeNativeMethods.TrackPopupMenuEx(new
HandleRef
(contextMenu, contextMenu.Handle),
3103
new
HandleRef
(this, this.Handle),
3107
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, this.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero);
3113
UnsafeNativeMethods.PostMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, treeNode.Handle);
3194
UnsafeNativeMethods.SendMessage(new
HandleRef
(null, this.Handle), NativeMethods.TVM_GETITEM, 0, ref item1);
3210
UnsafeNativeMethods.SendMessage(new
HandleRef
(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
3259
hNodeMouseDown = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip);
3287
IntPtr hnode = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi);
3357
hNodeMouseDown = UnsafeNativeMethods.SendMessage(new
HandleRef
(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhit);
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (1)
728
UnsafeNativeMethods.SendMessage(new
HandleRef
(toolTipFromUrl, toolTipFromUrl.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, 600);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (5)
1668
int regionDataSize = GetRegionData(new
HandleRef
(null, hRgn), 0, IntPtr.Zero);
1672
int ret = GetRegionData(new
HandleRef
(null, hRgn), regionDataSize, pBytes);
8277
CloseHandle(new
HandleRef
(this, hProcess));
8283
CloseHandle(new
HandleRef
(this, hThread));
8980
if (GetProcAddress(new
HandleRef
(null, kernel32), "AddDllDirectory") != IntPtr.Zero) {
winforms\Managed\System\WinForms\UpDownBase.cs (3)
1165
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(child, child.Handle), new
HandleRef
(this, Handle), point, 1);
1225
UnsafeNativeMethods.SetFocus(new
HandleRef
(TextBox, TextBox.Handle));
winforms\Managed\System\WinForms\UserControl.cs (2)
296
if (hwnd == hwndFocus || SafeNativeMethods.IsChild(new
HandleRef
(this, hwnd), new
HandleRef
(null, hwndFocus)))
winforms\Managed\System\WinForms\VisualStyles\VisualStyleInformation.cs (2)
239
return (SafeNativeMethods.GetThemeSysBool(new
HandleRef
(null, visualStyleRenderer.Handle), VisualStyleSystemProperty.SupportsFlatMenus));
262
SafeNativeMethods.GetThemeSysInt(new
HandleRef
(null, visualStyleRenderer.Handle), VisualStyleSystemProperty.MinimumColorDepth, ref mcDepth);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (37)
129
returnVal = SafeNativeMethods.IsThemePartDefined(new
HandleRef
(null, hTheme), part, 0);
137
returnVal = SafeNativeMethods.IsThemePartDefined(new
HandleRef
(null, tHandle.NativeHandle), part, 0);
290
using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new
HandleRef
(null, hWnd))) {
291
lastHResult = SafeNativeMethods.DrawThemeBackground(new
HandleRef
(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), null);
295
lastHResult = SafeNativeMethods.DrawThemeBackground(new
HandleRef
(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), null);
324
using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new
HandleRef
(null, hWnd))) {
325
lastHResult = SafeNativeMethods.DrawThemeBackground(new
HandleRef
(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle));
329
lastHResult = SafeNativeMethods.DrawThemeBackground(new
HandleRef
(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle));
361
lastHResult = SafeNativeMethods.DrawThemeEdge( new
HandleRef
( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), (int) style, (int) edges | (int) effects | EdgeAdjust, rect );
452
lastHResult = SafeNativeMethods.DrawThemeParentBackground( new
HandleRef
( this, childControl.Handle ), hdc, new NativeMethods.COMRECT( bounds ) );
497
lastHResult = SafeNativeMethods.DrawThemeText( new
HandleRef
( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, disableFlag, new NativeMethods.COMRECT( bounds ) );
520
lastHResult = SafeNativeMethods.GetThemeBackgroundContentRect( new
HandleRef
( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), rect );
544
lastHResult = SafeNativeMethods.GetThemeBackgroundExtent( new
HandleRef
( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( contentBounds ), rect );
572
lastHResult = SafeNativeMethods.GetThemeBackgroundRegion( new
HandleRef
( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), ref hRegion );
585
SafeNativeMethods.ExternalDeleteObject(new
HandleRef
(null, hRegion));
602
lastHResult = SafeNativeMethods.GetThemeBool(new
HandleRef
(this, Handle), part, state, (int)prop, ref val);
620
lastHResult = SafeNativeMethods.GetThemeColor(new
HandleRef
(this, Handle), part, state, (int)prop, ref color);
638
lastHResult = SafeNativeMethods.GetThemeEnumValue(new
HandleRef
(this, Handle), part, state, (int)prop, ref val);
656
lastHResult = SafeNativeMethods.GetThemeFilename(new
HandleRef
(this, Handle), part, state, (int)prop, filename, filename.Capacity);
684
lastHResult = SafeNativeMethods.GetThemeFont( new
HandleRef
( this, Handle ), hdc, part, state, (int) prop, logfont );
727
lastHResult = SafeNativeMethods.GetThemeInt(new
HandleRef
(this, Handle), part, state, (int)prop, ref val);
756
using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new
HandleRef
(null, hWnd))) {
757
lastHResult = SafeNativeMethods.GetThemePartSize(new
HandleRef
(this, hTheme.NativeHandle), hdc, part, state, null, type, size);
761
lastHResult = SafeNativeMethods.GetThemePartSize( new
HandleRef
(this, Handle), hdc, part, state, null, type, size);
789
lastHResult = SafeNativeMethods.GetThemePartSize( new
HandleRef
( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), type, size );
809
lastHResult = SafeNativeMethods.GetThemePosition(new
HandleRef
(this, Handle), part, state, (int)prop, point);
834
lastHResult = SafeNativeMethods.GetThemeMargins( new
HandleRef
( this, Handle ), hdc, part, state, (int) prop, ref margins );
855
lastHResult = SafeNativeMethods.GetThemeString(new
HandleRef
(this, Handle), part, state, (int)prop, aString, aString.Capacity);
878
lastHResult = SafeNativeMethods.GetThemeTextExtent( new
HandleRef
( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, null, rect );
903
lastHResult = SafeNativeMethods.GetThemeTextExtent( new
HandleRef
( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, new NativeMethods.COMRECT( bounds ), rect );
924
lastHResult = SafeNativeMethods.GetThemeTextMetrics( new
HandleRef
( this, Handle ), hdc, part, state, ref tm );
948
lastHResult = SafeNativeMethods.HitTestThemeBackground( new
HandleRef
( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), NativeMethods.NullHandleRef, point, ref htCode );
991
lastHResult = SafeNativeMethods.HitTestThemeBackground( new
HandleRef
( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), new
HandleRef
( this, hRgn ), point, ref htCode );
1004
return (SafeNativeMethods.IsThemeBackgroundPartiallyTransparent(new
HandleRef
(this, Handle), part, state));
1129
return Create(className, throwExceptionOnFail, new
HandleRef
(null, IntPtr.Zero));
1171
SafeNativeMethods.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)
401
if (SafeNativeMethods.IsAccelerator(new
HandleRef
(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) {
493
Application.ParkHandle(new
HandleRef
(this.AXInPlaceObject, hwndInPlaceObject));
837
UnsafeNativeMethods.SetParent(new
HandleRef
(null, hwnd), new
HandleRef
(this, this.Handle));
1227
cc = Control.FromHandle(UnsafeNativeMethods.GetParent(new
HandleRef
(this, Handle))) as ContainerControl;
winforms\Managed\System\WinForms\WebBrowserHelper.cs (4)
119
logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSX);
120
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
137
logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new
HandleRef
(null, hDC), NativeMethods.LOGPIXELSY);
138
UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new
HandleRef
(null, hDC));
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (1)
262
return UnsafeNativeMethods.GetParent(new
HandleRef
(Host, Host.Handle));
winforms\Managed\System\WinForms\WinFormsUtils.cs (8)
288
IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new
HandleRef
(hwnd, hwnd.Handle), NativeMethods.GA_ROOT);
289
return new
HandleRef
(hwnd.Wrapper, rootHwnd);
294
return GetRootHWnd(new
HandleRef
(control, control.Handle));
331
UnsafeNativeMethods.MapWindowPoints(new
HandleRef
(fromControl, fromControl.Handle), new
HandleRef
(toControl, toControl.Handle), pt, 1);
630
HandleRef hClippingRegion = new
HandleRef
(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x + bounds.Left, viewportOrg.y + bounds.Top, viewportOrg.x + bounds.Right, viewportOrg.y + bounds.Bottom));
636
hOriginalClippingRegion = new
HandleRef
(this, SafeNativeMethods.CreateRectRgn(0, 0, 0, 0));
672
hOriginalClippingRegion = new
HandleRef
(null, IntPtr.Zero);
System.Workflow.ComponentModel (8)
AuthoringOM\Design\DesignerHelpers.cs (5)
917
this.hdc = new
HandleRef
(this, this.graphics.GetHdc());
933
this.oldPen = new
HandleRef
(this, handle);
939
this.oldPenEx = new
HandleRef
(this, handle);
945
this.oldBrush = new
HandleRef
(this, handle);
1118
this.hpen = new
HandleRef
(this, penPtr);
Shared\NativeMethods.cs (3)
355
if (GetProcAddress(new
HandleRef
(null, kernel32), "AddDllDirectory") != IntPtr.Zero)
381
IntPtr pfnProc = NativeMethods.GetProcAddress(new
HandleRef
(isAvailable, hmod), procName);
388
NativeMethods.FreeLibrary(new
HandleRef
(isAvailable, hmod));
WindowsBase (43)
Base\System\Windows\SplashScreen.cs (9)
205
HandleRef nullHandle = new
HandleRef
(null, IntPtr.Zero);
218
nullHandle, nullHandle, new
HandleRef
(null, _hInstance), IntPtr.Zero);
222
IntPtr memDC = UnsafeNativeMethods.CreateCompatibleDC(new
HandleRef
(null, hScreenDC));
223
IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new
HandleRef
(null, memDC), hBitmap.MakeHandleRef(null).Handle);
237
UnsafeNativeMethods.SelectObject(new
HandleRef
(null, memDC), hOldBitmap);
238
UnsafeNativeMethods.ReleaseDC(new HandleRef(), new
HandleRef
(null, memDC));
239
UnsafeNativeMethods.ReleaseDC(new HandleRef(), new
HandleRef
(null, hScreenDC));
304
IntPtr prevHwnd = UnsafeNativeMethods.SetActiveWindow(new
HandleRef
(null, _hwnd));
360
HandleRef hwnd = new
HandleRef
(null, _hwnd);
Base\System\Windows\Threading\Dispatcher.cs (9)
2379
new
HandleRef
(this, hwnd),
2513
SafeNativeMethods.KillTimer(new
HandleRef
(this, hwnd), TIMERID_BACKGROUND);
2644
SafeNativeMethods.KillTimer(new
HandleRef
(this, _window.Value.Handle), TIMERID_BACKGROUND);
2649
UnsafeNativeMethods.PeekMessage(ref msg, new
HandleRef
(this, _window.Value.Handle), _msgProcessQueue, _msgProcessQueue, NativeMethods.PM_REMOVE);
2695
SafeNativeMethods.KillTimer(new
HandleRef
(this, _window.Value.Handle), TIMERID_BACKGROUND);
2702
bool succeeded = UnsafeNativeMethods.TryPostMessage(new
HandleRef
(this, _window.Value.Handle), _msgProcessQueue, IntPtr.Zero, IntPtr.Zero);
2731
succeeded = SafeNativeMethods.TrySetTimer(new
HandleRef
(this, _window.Value.Handle), TIMERID_BACKGROUND, DELTA_BACKGROUND);
2982
new
HandleRef
(this, _window.Value.Handle),
3003
new
HandleRef
(this, _window.Value.Handle),
Shared\MS\Win32\HwndSubclass.cs (5)
63
IntPtr address = UnsafeNativeMethods.GetProcAddress(new
HandleRef
(null,hModuleUser32), "DefWindowProcW");
469
IntPtr oldWndProc = UnsafeNativeMethods.GetWindowLongPtr(new
HandleRef
(this,hwnd), NativeMethods.GWL_WNDPROC);
539
_hwndHandleRef = new
HandleRef
(null,_hwndAttached);
592
NativeMethods.WndProc currentWndProc = UnsafeNativeMethods.GetWindowLongWndProc(new
HandleRef
(this,_hwndAttached));
626
_hwndHandleRef = new
HandleRef
(null,IntPtr.Zero);
Shared\MS\Win32\HwndWrapper.cs (4)
159
new
HandleRef
(null,parent),
160
new
HandleRef
(null,IntPtr.Zero),
161
new
HandleRef
(null,IntPtr.Zero),
419
UnsafeNativeMethods.DestroyWindow(new
HandleRef
(null, handle.Value));
Shared\MS\Win32\ManagedWndProcTracker.cs (5)
108
int windowStyle = UnsafeNativeMethods.GetWindowLong(new
HandleRef
(null,hwnd), NativeMethods.GWL_STYLE);
174
result = UnsafeNativeMethods.SetWindowLong(new
HandleRef
(null,hwnd), NativeMethods.GWL_WNDPROC, defWindowProc);
191
UnsafeNativeMethods.PostMessage(new
HandleRef
(null,hwnd), WindowMessage.WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
202
if (SafeNativeMethods.IsWindowUnicode(new
HandleRef
(null,hwnd)))
236
return UnsafeNativeMethods.GetProcAddress(new
HandleRef
(null, hModule), export);
Shared\MS\Win32\NativeMethodsCLR.cs (5)
105
public static HandleRef NullHandleRef = new
HandleRef
(null, IntPtr.Zero);
901
public static HandleRef HWND_TOP = new
HandleRef
(null, (IntPtr)0);
902
public static HandleRef HWND_BOTTOM = new
HandleRef
(null, (IntPtr)1);
903
public static HandleRef HWND_TOPMOST = new
HandleRef
(null, new IntPtr(-1));
904
public static HandleRef HWND_NOTOPMOST = new
HandleRef
(null, new IntPtr(-2));
Shared\MS\Win32\NativeMethodsOther.cs (3)
317
return new
HandleRef
(obj, handle);
1343
return new
HandleRef
(wrapper,h);
1423
return new
HandleRef
(wrapper, h);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (3)
582
return CloseHandleNoThrow(new
HandleRef
(null, handle));
622
return UnsafeNativeMethods.UnmapViewOfFileNoThrow(new
HandleRef
(null, handle));
1608
return new
HandleRef
(lpfn, result);