600 references to SafeNativeMethods
System.Windows.Forms (600)
winforms\Managed\System\WinForms\Application.cs (36)
764
VisualStyleState vState = (VisualStyleState)
SafeNativeMethods
.GetThemeAppProperties();
776
SafeNativeMethods
.SetThemeAppProperties((int)value);
780
SafeNativeMethods
.EnumThreadWindowsCallback callback = new
SafeNativeMethods
.EnumThreadWindowsCallback(Application.SendThemeChanged);
781
SafeNativeMethods
.EnumWindows(callback, IntPtr.Zero);
794
int thisPID =
SafeNativeMethods
.GetCurrentProcessId();
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),
1244
int id =
SafeNativeMethods
.GetWindowThreadProcessId(handle, out pid);
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,
2402
id =
SafeNativeMethods
.GetCurrentThreadId();
2783
bool ourThread =
SafeNativeMethods
.GetCurrentThreadId() == id;
2865
int hwndThread =
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(parkingWindows[0], parkingWindows[0].Handle), out pid);
2866
int currentThread =
SafeNativeMethods
.GetCurrentThreadId();
3063
if (context == null && id ==
SafeNativeMethods
.GetCurrentThreadId()) {
3105
if (culture == null || culture.LCID !=
SafeNativeMethods
.GetThreadLocale())
3106
culture = new CultureInfo(
SafeNativeMethods
.GetThreadLocale());
3430
if (
SafeNativeMethods
.IsWindowEnabled(hwndOwner)) {
3431
SafeNativeMethods
.EnableWindow(hwndOwner, false);
3445
SafeNativeMethods
.IsWindowEnabled(new HandleRef(currentForm, currentForm.Handle)) != modalEnabled) {
3446
SafeNativeMethods
.EnableWindow(new HandleRef(currentForm, currentForm.Handle), modalEnabled);
3488
SafeNativeMethods
.EnableWindow(hwndOwner, true);
3535
if (msg.hwnd != IntPtr.Zero &&
SafeNativeMethods
.IsWindowUnicode(new HandleRef(null, msg.hwnd))) {
3750
if (culture != null && culture.LCID !=
SafeNativeMethods
.GetThreadLocale()) {
3751
SafeNativeMethods
.SetThreadLocale(culture.LCID);
3968
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()), out pid);
3969
if (pid ==
SafeNativeMethods
.GetCurrentProcessId()) {
4149
int id =
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(this, HandleInternal), out lpdwProcessId);
4240
UnsafeNativeMethods.EnumThreadWindows(
SafeNativeMethods
.GetCurrentThreadId(),
4251
if (
SafeNativeMethods
.IsWindowVisible(new HandleRef(null, hWnd)) &&
SafeNativeMethods
.IsWindowEnabled(new HandleRef(null, hWnd))) {
4301
if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd)))
SafeNativeMethods
.EnableWindow(new HandleRef(null, hWnd), state);
winforms\Managed\System\WinForms\AxHost.cs (10)
123
private readonly int REGMSG_MSG =
SafeNativeMethods
.RegisterWindowMessage(Application.WindowMessagesVersion + "_subclassCheck");
131
private static Guid ifontDisp_Guid = typeof(
SafeNativeMethods
.IFontDisp).GUID;
2118
msg.time =
SafeNativeMethods
.GetTickCount();
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);
4972
SafeNativeMethods
.IFontDisp rval =
SafeNativeMethods
.OleCreateIFontDispIndirect(GetFONTDESCFromFont(font), ref ifontDisp_Guid);
4993
SafeNativeMethods
.IFontDisp oleFont = (
SafeNativeMethods
.IFontDisp)font;
5175
SafeNativeMethods
.SysFreeString(new HandleRef(null, pbstr));
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (2)
100
SafeNativeMethods
.FillRect(new HandleRef(e, e.HDC), ref r, new HandleRef(this,
101
isHighContrastHighlighted ?
SafeNativeMethods
.GetSysColorBrush(ColorTranslator.ToOle(color) & 0xFF) : Control.BackColorBrush));
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (1)
263
SafeNativeMethods
.DrawFrameControl(new HandleRef(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\CheckedListBox.cs (4)
108
LBC_GETCHECKSTATE =
SafeNativeMethods
.RegisterWindowMessage("LBC_GETCHECKSTATE");
109
LBC_SETCHECKSTATE =
SafeNativeMethods
.RegisterWindowMessage("LBC_SETCHECKSTATE");
551
SafeNativeMethods
.InvalidateRect(new HandleRef(this, Handle), ref rect, false);
880
SafeNativeMethods
.InvalidateRect(new HandleRef(this, Handle), null, true);
winforms\Managed\System\WinForms\ColorDialog.cs (1)
297
if (!
SafeNativeMethods
.ChooseColor(cc)) return false;
winforms\Managed\System\WinForms\ComboBox.cs (21)
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),
3165
SafeNativeMethods
.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode);
3189
SafeNativeMethods
.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode);
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,
3454
SafeNativeMethods
.GetClientRect(new HandleRef(this, Handle), ref rect);
3621
SafeNativeMethods
.SelectPalette(new HandleRef(this, dis.hDC), new HandleRef(null, oldPal), 0);
3763
NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)
SafeNativeMethods
.GetUpdateRgn(new HandleRef(this, this.Handle), new HandleRef(this, wr.HRegion), true);
4804
SafeNativeMethods
.InvalidateRect(new HandleRef(this, _owningComboBox.GetListHandle()), null, false);
5782
return
SafeNativeMethods
.IsWindowVisible(new HandleRef(this, Handle));
5871
UnsafeNativeMethods.EnumThreadWindows(
SafeNativeMethods
.GetCurrentThreadId(), new NativeMethods.EnumThreadWindowsCallback(this.Callback), new HandleRef(null, IntPtr.Zero));
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 (2)
182
SafeNativeMethods
.SetWindowPos(new HandleRef(null, hWnd), NativeMethods.NullHandleRef, x, y, 0, 0, NativeMethods.SWP_NOSIZE |
294
helpMsg =
SafeNativeMethods
.RegisterWindowMessage("commdlg_help");
winforms\Managed\System\WinForms\ComponentManagerBroker.cs (3)
113
int pid =
SafeNativeMethods
.GetCurrentProcessId();
267
_creationThread =
SafeNativeMethods
.GetCurrentThreadId();
474
if (_refCount == 1 &&
SafeNativeMethods
.GetCurrentThreadId() == _creationThread) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2AboutBoxPropertyDescriptor.cs (1)
168
SafeNativeMethods
.GetThreadLCID(),
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (2)
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\COM2PropertyDescriptor.cs (6)
158
oleConverters[typeof(
SafeNativeMethods
.IFontDisp).GUID] = typeof(Com2FontConverter);
880
SafeNativeMethods
.GetThreadLCID(),
1243
SafeNativeMethods
.VariantInit(new HandleRef(null, mem));
1251
SafeNativeMethods
.GetThreadLCID(),
1295
int result =
SafeNativeMethods
.FormatMessage(NativeMethods.FORMAT_MESSAGE_FROM_SYSTEM |
1322
SafeNativeMethods
.VariantClear(new HandleRef(null, mem));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (2)
101
SafeNativeMethods
.OleCreatePropertyFrame(new HandleRef(null, parentHandle),
108
SafeNativeMethods
.GetThreadLCID(),
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (2)
98
pTypeInfo = iDispatch.GetTypeInfo(0,
SafeNativeMethods
.GetThreadLCID());
185
int hr = obj.GetIDsOfNames(ref g, names, 1,
SafeNativeMethods
.GetThreadLCID(), pDispid);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (2)
167
int hr = iDispatch.GetIDsOfNames(ref g, names, 1,
SafeNativeMethods
.GetThreadLCID(), dispid);
208
SafeNativeMethods
.GetThreadLCID(),
winforms\Managed\System\WinForms\ContainerControl.cs (3)
755
HandleRef hfontOld = new HandleRef(this,
SafeNativeMethods
.SelectObject(hdc, hfont));
759
SafeNativeMethods
.GetTextMetrics(hdc, ref tm);
775
SafeNativeMethods
.SelectObject(hdc, hfontOld);
winforms\Managed\System\WinForms\ContextMenu.cs (1)
231
SafeNativeMethods
.TrackPopupMenuEx(new HandleRef(this, Handle),
winforms\Managed\System\WinForms\Control.cs (89)
164
WM_GETCONTROLNAME =
SafeNativeMethods
.RegisterWindowMessage("WM_GETCONTROLNAME");
165
WM_GETCONTROLTYPE =
SafeNativeMethods
.RegisterWindowMessage("WM_GETCONTROLTYPE");
1056
backBrush =
SafeNativeMethods
.GetSysColorBrush(ColorTranslator.ToOle(color) & 0xFF);
1060
backBrush =
SafeNativeMethods
.CreateSolidBrush(ColorTranslator.ToWin32(color));
1405
bool visible =
SafeNativeMethods
.IsWindowVisible(new HandleRef(window, Handle));
1406
bool enabled =
SafeNativeMethods
.IsWindowEnabled(new HandleRef(window, Handle));
1483
SafeNativeMethods
.ReleaseCapture();
2020
return
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid);
2023
return
SafeNativeMethods
.GetCurrentThreadId();
3021
if (
SafeNativeMethods
.IsWindowVisible(new HandleRef(null, next))) {
3100
int hwndThread =
SafeNativeMethods
.GetWindowThreadProcessId(hwnd, out pid);
3101
int currentThread =
SafeNativeMethods
.GetCurrentThreadId();
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));
4538
int textLen =
SafeNativeMethods
.GetWindowTextLength(new HandleRef(window, Handle));
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,
6000
SafeNativeMethods
.DeleteObject(new HandleRef(this, p));
6125
SafeNativeMethods
.DoDragDrop(dataObject, dropSource, (int)allowedEffects, finalEffect);
6180
SafeNativeMethods
.BitBlt(new HandleRef(destGraphics, desthDC), targetBounds.X, targetBounds.Y, width, height,
6214
if (
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(marshaler, marshaler.Handle), out pid) ==
SafeNativeMethods
.GetCurrentThreadId()) {
7110
SafeNativeMethods
.TrackMouseEvent(trackMouseEvent);
7142
SafeNativeMethods
.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor));
7143
SafeNativeMethods
.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor));
7178
int message =
SafeNativeMethods
.RegisterWindowMessage(NativeMethods.MSH_MOUSEWHEEL);
7218
SafeNativeMethods
.RedrawWindow(new HandleRef(this, Handle),
7228
SafeNativeMethods
.InvalidateRgn(new HandleRef(this, Handle),
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),
7759
SafeNativeMethods
.AdjustWindowRectExForDpi(ref rect, style, bMenu, exStyle, (uint)deviceDpi);
7761
SafeNativeMethods
.AdjustWindowRectEx(ref rect, style, bMenu, exStyle);
7805
if (
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid) ==
SafeNativeMethods
.GetCurrentThreadId()) {
7828
threadCallbackMessage =
SafeNativeMethods
.RegisterWindowMessage(Application.WindowMessagesVersion + "_ThreadCallbackMessage");
7971
SafeNativeMethods
.DeleteObject(new HandleRef(this, p));
8170
SafeNativeMethods
.EnableWindow(new HandleRef(this, Handle), Enabled);
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));
8876
SafeNativeMethods
.DeleteObject(new HandleRef(this, p));
10349
bool success =
SafeNativeMethods
.GetViewportOrgEx(hDC, viewportOrg);
10352
HandleRef hClippingRegion = new HandleRef(null,
SafeNativeMethods
.CreateRectRgn(viewportOrg.x,viewportOrg.y, viewportOrg.x + this.Width, viewportOrg.y + this.Height));
10357
NativeMethods.RegionFlags selectResult = (NativeMethods.RegionFlags)
SafeNativeMethods
.SelectClipRgn(hDC, hClippingRegion);
10365
success =
SafeNativeMethods
.DeleteObject(hClippingRegion);
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);
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))) {
12197
SafeNativeMethods
.SetWindowPos(
12505
SafeNativeMethods
.UpdateWindow(new HandleRef(window, InternalHandle));
12708
SafeNativeMethods
.SetWindowPos(new HandleRef(ctl.window, ctl.Handle), new HandleRef(null, prevHandle), 0, 0, 0, 0,
12755
SafeNativeMethods
.SetWindowPos(
13767
SafeNativeMethods
.SelectPalette(new HandleRef(null, dc), new HandleRef(null, oldPal), 0);
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);
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);
17449
IntPtr newRegion =
SafeNativeMethods
.CreateRectRgn(0, 0, 0, 0);
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));
18418
clipRegion =
SafeNativeMethods
.CreateRectRgn(rcIntersect.left, rcIntersect.top,
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))) {
19252
hBitmap = new HandleRef(this,
SafeNativeMethods
.CreateBitmap(size.Width, size.Height, planes, bitsPixel, IntPtr.Zero));
19254
hOriginalBmp = new HandleRef(this,
SafeNativeMethods
.SelectObject(hBitmapDC, hBitmap));
19271
SafeNativeMethods
.SelectObject(hBitmapDC, hOriginalBmp);
19272
success =
SafeNativeMethods
.DeleteObject(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));
19309
SafeNativeMethods
.SelectObject(hdcSrc, hBitmap);
19336
SafeNativeMethods
.GetSystemPaletteEntries(hdcSrc, 0, (int)iColors, aj);
19362
int diRet =
SafeNativeMethods
.GetDIBits(hdcSrc, hBitmap, 0, bmp.bmHeight, lpBits,
19385
int iRet =
SafeNativeMethods
.StretchDIBits(hdcDest,
19393
SafeNativeMethods
.DeleteObject(hNullBitmap);
20017
SafeNativeMethods
.DeleteObject(new HandleRef(this, handle));
winforms\Managed\System\WinForms\ControlPaint.cs (50)
163
IntPtr palette =
SafeNativeMethods
.CreateHalftonePalette(new HandleRef(null, hdcS));
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 ) );
287
IntPtr mask =
SafeNativeMethods
.CreateBitmap(size.Width, size.Height, 1, /* 1bpp */ 1, bits);
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));
340
IntPtr hBitmap =
SafeNativeMethods
.CreateBitmap(8, 8, 1, 1, grayPattern);
346
IntPtr brush =
SafeNativeMethods
.CreateBrushIndirect(lb);
348
SafeNativeMethods
.DeleteObject(new HandleRef(null, hBitmap));
362
bool result =
SafeNativeMethods
.BitBlt(targetHDC, destinationLocation.X, destinationLocation.Y, destWidth, destHeight,
973
SafeNativeMethods
.DrawEdge(new HandleRef(wg, wg.DeviceContext.Hdc), ref rc, edge, flags);
1284
SafeNativeMethods
.DrawFrameControl(new HandleRef(null, dc), ref rcCheck,
1367
SafeNativeMethods
.DrawFrameControl(new HandleRef(wg, wg.DeviceContext.Hdc), ref rcFrame, kind, (int) state);
1788
pen =
SafeNativeMethods
.CreatePen(NativeMethods.PS_DOT, 1, ColorTranslator.ToWin32(backColor));
1793
pen =
SafeNativeMethods
.CreatePen(NativeMethods.PS_SOLID, 2, ColorTranslator.ToWin32(backColor));
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));
1827
IntPtr pen =
SafeNativeMethods
.CreatePen(NativeMethods.PS_SOLID, 1, ColorTranslator.ToWin32(backColor));
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));
2008
IntPtr brush =
SafeNativeMethods
.CreateSolidBrush(ColorTranslator.ToWin32(backColor));
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));
winforms\Managed\System\WinForms\Cursor.cs (15)
185
SafeNativeMethods
.GetClipCursor(ref r);
221
IntPtr curHandle =
SafeNativeMethods
.GetCursor();
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);
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,
580
handle =
SafeNativeMethods
.LoadCursor(NativeMethods.NullHandleRef, nResourceId);
593
SafeNativeMethods
.GetIconInfo(new HandleRef(this, iconHandle), info);
598
SafeNativeMethods
.IntDeleteObject(new HandleRef(null, info.hbmColor));
607
SafeNativeMethods
.IntDeleteObject(new HandleRef(null, info.hbmMask));
640
handle =
SafeNativeMethods
.CopyImageAsCursor(new HandleRef(this, cursorHandle), NativeMethods.IMAGE_CURSOR,
winforms\Managed\System\WinForms\DataFormats.cs (2)
221
int formatId =
SafeNativeMethods
.RegisterClipboardFormat(format);
265
if (0 ==
SafeNativeMethods
.GetClipboardFormatName(id, s, s.Capacity)) {
winforms\Managed\System\WinForms\DataGrid.cs (7)
2299
SafeNativeMethods
.ScrollWindow(new HandleRef(this, Handle),
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));
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 (2)
41
SafeNativeMethods
.InitCommonControlsEx(icc);
50
SafeNativeMethods
.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE);
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1441
SafeNativeMethods
.DrawFrameControl(new HandleRef(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\DataGridViewMethods.cs (13)
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));
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));
26360
SafeNativeMethods
.ScrollWindow(new HandleRef(this, this.Handle),
26471
SafeNativeMethods
.ScrollWindow(new HandleRef(this, this.Handle), 0, deltaY, ref scrollArea, ref scrollArea);
winforms\Managed\System\WinForms\DataObject.cs (8)
151
IntPtr srcOld =
SafeNativeMethods
.SelectObject(new HandleRef(null, dcSrc), new HandleRef(bm, hBitmap));
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));
172
SafeNativeMethods
.DeleteObject(new HandleRef(bm, hBitmap));
1644
SafeNativeMethods
.DeleteObject(new HandleRef(null, medium.unionmember));
winforms\Managed\System\WinForms\DateTimePicker.cs (3)
1131
SafeNativeMethods
.InitCommonControlsEx(icc);
1576
SafeNativeMethods
.InvalidateRect(new HandleRef(c, c.hwndFound), null, true);
1577
SafeNativeMethods
.UpdateWindow(new HandleRef(c, c.hwndFound));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (19)
687
IntPtr hbitmapTemp =
SafeNativeMethods
.CreateBitmap(8, 8, 1, 1, patternBits);
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);
732
SafeNativeMethods
.SetTextColor(new HandleRef(null, dc), textColor);
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));
756
SafeNativeMethods
.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlDark));
766
SafeNativeMethods
.SetBkColor(new HandleRef(null, dc), savedColor);
770
SafeNativeMethods
.SelectObject(new HandleRef(null, dc), new HandleRef(null, hfontOld));
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 (9)
961
SafeNativeMethods
.InitCommonControlsEx(icc);
970
SafeNativeMethods
.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE);
994
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle),
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);
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 (1)
210
int textLen =
SafeNativeMethods
.GetWindowTextLength(new HandleRef(this, dialogHWnd));
winforms\Managed\System\WinForms\FontDialog.cs (3)
502
SafeNativeMethods
.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE);
504
SafeNativeMethods
.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE);
610
if (!
SafeNativeMethods
.ChooseFont(cf)) return false;
winforms\Managed\System\WinForms\Form.cs (19)
1778
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef,
2577
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle), key, 0, 0, 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);
3433
SafeNativeMethods
.GetClientRect(new HandleRef(this, h), ref rc);
3457
SafeNativeMethods
.GetClientRect(new HandleRef(this, h), ref rc);
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);
5525
SafeNativeMethods
.EnumThreadWindowsCallback callback = null;
5530
callback = new
SafeNativeMethods
.EnumThreadWindowsCallback(etwcb.Callback);
5531
UnsafeNativeMethods.EnumThreadWindows(
SafeNativeMethods
.GetCurrentThreadId(),
6172
SafeNativeMethods
.ReleaseCapture();
6233
if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndActive)) &&
SafeNativeMethods
.IsWindowVisible(new HandleRef(null, hWndActive))) {
6236
else if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndOwner)) &&
SafeNativeMethods
.IsWindowVisible(new HandleRef(null, hWndOwner))){
6582
SafeNativeMethods
.DrawMenuBar(new HandleRef(this, Handle));
6830
SafeNativeMethods
.RedrawWindow(new HandleRef(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
7813
SafeNativeMethods
.InitCommonControlsEx(icc);
7879
SafeNativeMethods
.SetWindowPos(new HandleRef(window, window.Handle), NativeMethods.HWND_TOPMOST,
winforms\Managed\System\WinForms\GroupBox.cs (1)
771
SafeNativeMethods
.GetClientRect(new HandleRef(this, Handle), ref rect);
winforms\Managed\System\WinForms\Help.cs (8)
237
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, htmlCommand, stringHtmlParam);
240
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, htmlCommand, (int)htmlParam);
243
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, htmlCommand, (NativeMethods.HH_FTS_QUERY)htmlParam);
249
SafeNativeMethods
.HtmlHelp(NativeMethods.NullHandleRef, pathAndFileName, HH_DISPLAY_TOPIC, (string)null);
250
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, htmlCommand, (NativeMethods.HH_AKLINK)htmlParam);
254
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, htmlCommand, (string)param);
258
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, MapCommandToHTMLCommand(command, null, out htmlParam), 0);
261
SafeNativeMethods
.HtmlHelp(handle, pathAndFileName, HH_DISPLAY_TEXT_POPUP, (NativeMethods.HH_POPUP)param);
winforms\Managed\System\WinForms\HtmlDocument.cs (3)
561
SafeNativeMethods
.GetThreadLCID(), dispids);
576
hr = scriptObject.Invoke(dispids[0], ref g,
SafeNativeMethods
.GetThreadLCID(),
832
SafeNativeMethods
.VariantClear(new HandleRef(null, (IntPtr)(a + VariantSize * i)));
winforms\Managed\System\WinForms\HtmlElement.cs (2)
610
SafeNativeMethods
.GetThreadLCID(), dispids);
626
hr = scriptObject.Invoke(dispids[0], ref g,
SafeNativeMethods
.GetThreadLCID(),
winforms\Managed\System\WinForms\ImageList.cs (20)
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)) {
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));
543
SafeNativeMethods
.InitCommonControls();
544
nativeImageList = new NativeImageList(
SafeNativeMethods
.ImageList_Create(imageSize.Width, imageSize.Height, flags, INITIAL_CAPACITY, GROWBY));
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,
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 (4)
70
SafeNativeMethods
.InitCommonControls();
72
SafeNativeMethods
.ImageList_Read(new UnsafeNativeMethods.ComStreamFromDataStream(ms)));
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 (4)
67
return new InputLanguage(
SafeNativeMethods
.GetKeyboardLayout(0));
77
IntPtr handleOld =
SafeNativeMethods
.ActivateKeyboardLayout(new HandleRef(value, value.handle), 0);
118
int size =
SafeNativeMethods
.GetKeyboardLayoutList(0, null);
121
SafeNativeMethods
.GetKeyboardLayoutList(size, handles);
winforms\Managed\System\WinForms\ListBox.cs (1)
2349
SafeNativeMethods
.SelectPalette(new HandleRef(null, dc), new HandleRef(null, oldPal), 0);
winforms\Managed\System\WinForms\ListView.cs (8)
2458
SafeNativeMethods
.InitCommonControlsEx(icc);
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));
3588
SafeNativeMethods
.InvalidateRect(new HandleRef(this, hwndHdr), null, true);
4600
SafeNativeMethods
.SetWindowPos(new HandleRef(this, hdrHWND),
5478
Color foreColor = ColorTranslator.FromWin32(
SafeNativeMethods
.GetTextColor(new HandleRef(this, nmcd->hdc)));
5479
Color backColor = ColorTranslator.FromWin32(
SafeNativeMethods
.GetBkColor(new HandleRef(this, nmcd->hdc)));
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (3)
78
color =
SafeNativeMethods
.ColorFromCOLORREF((int)listView.SendMessage(NativeMethods.LVM_GETINSERTMARKCOLOR, 0, 0));
87
listView.SendMessage(NativeMethods.LVM_SETINSERTMARKCOLOR, 0,
SafeNativeMethods
.ColorToCOLORREF(color));
140
listView.SendMessage(NativeMethods.LVM_SETINSERTMARKCOLOR, 0,
SafeNativeMethods
.ColorToCOLORREF(color));
winforms\Managed\System\WinForms\MaskedTextBox.cs (1)
2007
SafeNativeMethods
.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MDIClient.cs (5)
298
rgn1 =
SafeNativeMethods
.CreateRectRgn(0, 0, bounds.Width, bounds.Height);
300
rgn2 =
SafeNativeMethods
.CreateRectRgn(-rect.left, -rect.top,
306
if (
SafeNativeMethods
.CombineRgn(new HandleRef(null, rgn1), new HandleRef(null, rgn1), new HandleRef(null, rgn2), NativeMethods.RGN_DIFF) == 0)
319
SafeNativeMethods
.DeleteObject(new HandleRef(null, rgn2));
325
SafeNativeMethods
.DeleteObject(new HandleRef(null, rgn1));
winforms\Managed\System\WinForms\MenuItem.cs (2)
1478
SafeNativeMethods
.DrawMenuBar(new HandleRef(f, f.Handle));
1506
SafeNativeMethods
.SelectPalette(new HandleRef(null, dis.hDC), new HandleRef(null, oldPal), 0);
winforms\Managed\System\WinForms\MessageBox.cs (1)
484
result = Win32ToDialogResult(
SafeNativeMethods
.MessageBox(new HandleRef(owner, handle), text, caption, style));
winforms\Managed\System\WinForms\MonthCalendar.cs (1)
1370
SafeNativeMethods
.InitCommonControlsEx(icc);
winforms\Managed\System\WinForms\NativeMethods.cs (3)
2195
wmMouseEnterMessage =
SafeNativeMethods
.RegisterWindowMessage("WinFormsMouseEnter");
2205
wmUnSubclass =
SafeNativeMethods
.RegisterWindowMessage("WinFormsUnSubclass");
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 (2)
176
int id =
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(null, handle), out lpdwProcessId);
182
SafeNativeMethods
.GetExitCodeThread(new HandleRef(null, threadHandle), out exitCode);
winforms\Managed\System\WinForms\NotifyIcon.cs (2)
47
private static int WM_TASKBARCREATED =
SafeNativeMethods
.RegisterWindowMessage("TaskbarCreated");
734
SafeNativeMethods
.TrackPopupMenuEx(new HandleRef(contextMenu, contextMenu.Handle),
winforms\Managed\System\WinForms\NumericUpDown.cs (1)
550
SafeNativeMethods
.MessageBeep(0);
winforms\Managed\System\WinForms\OpenFileDialog.cs (1)
204
int errorCode =
SafeNativeMethods
.CommDlgExtendedError();
winforms\Managed\System\WinForms\OSFeature.cs (1)
78
SafeNativeMethods
.IsAppThemed();
winforms\Managed\System\WinForms\PaintEvent.cs (1)
170
SafeNativeMethods
.SelectPalette(new HandleRef(this, dc), new HandleRef(this, oldPal), 0);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (2)
369
if (
SafeNativeMethods
.GetScrollInfo(new HandleRef(this, m.HWnd), direction, si))
750
SafeNativeMethods
.ScrollWindow(new HandleRef(this, Handle),
winforms\Managed\System\WinForms\ProgressBar.cs (1)
745
SafeNativeMethods
.InitCommonControlsEx(icc);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (8)
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));
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 (2)
110
SafeNativeMethods
.InitCommonControlsEx(icc);
204
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST,
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (12)
1663
SafeNativeMethods
.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags);
1706
SafeNativeMethods
.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA);
1737
SafeNativeMethods
.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA);
3659
SafeNativeMethods
.ExternalDeleteObject(new HandleRef(this, baseHfont));
3663
SafeNativeMethods
.ExternalDeleteObject(new HandleRef(this, boldHfont));
3876
hFont =
SafeNativeMethods
.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont));
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));
7149
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(control, control.Handle), out thisProcessID);
7159
SafeNativeMethods
.GetCurrentThreadId());
7239
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(null, hWndAtPoint), out pid);
winforms\Managed\System\WinForms\RichTextBox.cs (4)
526
if (
SafeNativeMethods
.GetWindowTextLength(new HandleRef(this, Handle)) > 0) {
2113
int textLen =
SafeNativeMethods
.GetWindowTextLength(new HandleRef(this, Handle));
3533
SafeNativeMethods
.MessageBeep(0);
3622
int textLength =
SafeNativeMethods
.GetWindowTextLength(new HandleRef(this, Handle));
winforms\Managed\System\WinForms\SafeNativeMethods.cs (3)
171
public static extern
SafeNativeMethods
.IFontDisp OleCreateIFontDispIndirect(NativeMethods.FONTDESC fd, ref Guid iid);
368
int retVal =
SafeNativeMethods
.GetTextMetricsA(hDC, ref lptmA);
396
return
SafeNativeMethods
.GetTextMetricsW(hDC, ref lptm);
winforms\Managed\System\WinForms\SaveFileDialog.cs (1)
208
int errorCode =
SafeNativeMethods
.CommDlgExtendedError();
winforms\Managed\System\WinForms\Screen.cs (6)
91
SafeNativeMethods
.GetMonitorInfo(new HandleRef(null, monitor), info);
124
SafeNativeMethods
.EnumDisplayMonitors(NativeMethods.NullHandleRef, null, proc, IntPtr.Zero);
248
SafeNativeMethods
.GetMonitorInfo(new HandleRef(null, hmonitor), info);
310
return new Screen(
SafeNativeMethods
.MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST));
329
return new Screen(
SafeNativeMethods
.MonitorFromRect(ref rc, MONITOR_DEFAULTTONEAREST));
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 (1)
895
SafeNativeMethods
.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si);
winforms\Managed\System\WinForms\SendKeys.cs (2)
188
int oemVal =
SafeNativeMethods
.OemKeyScan((short)(0xFF & (int)character));
1095
eventmsg.time =
SafeNativeMethods
.GetTickCount();
winforms\Managed\System\WinForms\SplitContainer.cs (4)
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));
winforms\Managed\System\WinForms\Splitter.cs (4)
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));
winforms\Managed\System\WinForms\StatusBar.cs (3)
639
SafeNativeMethods
.InitCommonControlsEx(icc);
1681
SafeNativeMethods
.InitCommonControlsEx(icc);
1815
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST,
winforms\Managed\System\WinForms\StringSorter.cs (3)
119
this.lcid = culture == null?
SafeNativeMethods
.GetThreadLocale(): culture.LCID;
141
return Compare(
SafeNativeMethods
.GetThreadLocale(), s1, s2, 0);
150
return Compare(
SafeNativeMethods
.GetThreadLocale(), s1, s2, options);
winforms\Managed\System\WinForms\SystemInformation.cs (6)
134
int message =
SafeNativeMethods
.RegisterWindowMessage(NativeMethods.MSH_SCROLL_LINES);
634
return
SafeNativeMethods
.GetDoubleClickTime();
1683
return unchecked((int)
SafeNativeMethods
.GetCaretBlinkTime());
1797
SafeNativeMethods
.EnumDisplaySettings(null, -1 /*ENUM_CURRENT_SETTINGS*/, ref dm);
1970
IntPtr hDsk =
SafeNativeMethods
.OpenInputDesktop(0, false, NativeMethods.DESKTOP_SWITCHDESKTOP);
1978
SafeNativeMethods
.CloseDesktop(hDsk);
winforms\Managed\System\WinForms\TabControl.cs (4)
102
private readonly int tabBaseReLayoutMessage =
SafeNativeMethods
.RegisterWindowMessage(Application.WindowMessagesVersion + "_TabBaseReLayout");
1108
SafeNativeMethods
.InitCommonControlsEx(icc);
1362
SafeNativeMethods
.SetWindowPos(new HandleRef(this, tooltipHwnd),
2061
SafeNativeMethods
.SelectPalette(new HandleRef(null, dis.hDC), new HandleRef(null, oldPal), 0);
winforms\Managed\System\WinForms\TextBox.cs (3)
608
SafeNativeMethods
.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
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 (1)
1258
return
SafeNativeMethods
.GetWindowTextLength(new HandleRef(this, Handle));
winforms\Managed\System\WinForms\Timer.cs (4)
347
int hwndThread =
SafeNativeMethods
.GetWindowThreadProcessId(new HandleRef(this, hWnd), out pid);
348
int currentThread =
SafeNativeMethods
.GetCurrentThreadId();
367
_timerID = (int)
SafeNativeMethods
.SetTimer(new HandleRef(this, Handle), TimerID++, interval, IntPtr.Zero);
409
SafeNativeMethods
.KillTimer(new HandleRef(this, hWnd), _timerID);
winforms\Managed\System\WinForms\ToolBar.cs (3)
1055
SafeNativeMethods
.InitCommonControlsEx(icc);
1563
SafeNativeMethods
.TrackPopupMenuEx(
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\ToolStrip.cs (7)
2848
SafeNativeMethods
.BitBlt(new HandleRef(this, desthDC), bounds.X, bounds.Y, bounds.Width, bounds.Height,
3728
SafeNativeMethods
.BitBlt(itemHDC, 0, 0, item.Size.Width, item.Size.Height, toolStripHDC, item.Bounds.X, item.Bounds.Y, NativeMethods.SRCCOPY);
3736
SafeNativeMethods
.BitBlt(toolStripHDC, item.Bounds.X, item.Bounds.Y, item.Size.Width, item.Size.Height, itemHDC, 0, 0, NativeMethods.SRCCOPY);
5236
cachedItemBitmap = new HandleRef(this,
SafeNativeMethods
.CreateCompatibleBitmap(toolStripHDC, bitmapSize.Width, bitmapSize.Height));
5237
IntPtr oldBitmap =
SafeNativeMethods
.SelectObject(cachedItemHDC,cachedItemBitmap);
5242
SafeNativeMethods
.ExternalDeleteObject(new HandleRef(null, oldBitmap));
5260
SafeNativeMethods
.DeleteObject(cachedItemBitmap);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (4)
1103
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle), topMostFlag, 0, 0, 0, 0,
1841
else if (IsHandleCreated &&
SafeNativeMethods
.IsWindowEnabled(new HandleRef(this, Handle))) {
1842
SafeNativeMethods
.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0,
2234
SafeNativeMethods
.RedrawWindow(activeHwndHandleRef, null, NativeMethods.NullHandleRef, NativeMethods.RDW_FRAME | NativeMethods.RDW_INVALIDATE);
winforms\Managed\System\WinForms\ToolStripItem.cs (1)
2601
SafeNativeMethods
.DoDragDrop(dataObject, dropSource, (int)allowedEffects, finalEffect);
winforms\Managed\System\WinForms\ToolStripManager.cs (3)
927
SafeNativeMethods
.ShowCaret(NativeMethods.NullHandleRef);
1174
SafeNativeMethods
.HideCaret(NativeMethods.NullHandleRef);
1415
SafeNativeMethods
.GetCurrentThreadId());
winforms\Managed\System\WinForms\ToolStripPanel.cs (1)
861
SafeNativeMethods
.UpdateWindow(new HandleRef(null, msg.hwnd));
winforms\Managed\System\WinForms\ToolStripTextBox.cs (8)
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));
731
SafeNativeMethods
.CombineRgn(hNonClientRegion, hTotalRegion, hClientRegion, NativeMethods.RGN_XOR);
735
SafeNativeMethods
.RedrawWindow(new HandleRef(this, Handle),
745
SafeNativeMethods
.DeleteObject(hNonClientRegion);
751
SafeNativeMethods
.DeleteObject(hClientRegion);
756
SafeNativeMethods
.DeleteObject(hTotalRegion);
winforms\Managed\System\WinForms\ToolTip.cs (5)
884
SafeNativeMethods
.InitCommonControlsEx(icc);
2173
SafeNativeMethods
.SetWindowPos(new HandleRef(this, this.Handle),
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);
winforms\Managed\System\WinForms\TrackBar.cs (1)
861
SafeNativeMethods
.InitCommonControlsEx(icc);
winforms\Managed\System\WinForms\TreeNode.cs (1)
1731
SafeNativeMethods
.InvalidateRect(new HandleRef(tv, tv.Handle), null, false);
winforms\Managed\System\WinForms\TreeView.cs (10)
1660
SafeNativeMethods
.InitCommonControlsEx(icc);
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));
2581
SafeNativeMethods
.InvalidateRect(new HandleRef(this, Handle), ref rc, true);
2793
SafeNativeMethods
.SelectObject(new HandleRef(nmcd.nmcd, nmcd.nmcd.hdc), new HandleRef(renderinfo, renderinfo.FontHandle));
2921
SafeNativeMethods
.SetWindowPos(new HandleRef(this, tooltipHandle),
3048
SendMessage(NativeMethods.WM_CONTEXTMENU, Handle,
SafeNativeMethods
.GetMessagePos());
3099
SafeNativeMethods
.TrackPopupMenuEx(new HandleRef(contextMenu, contextMenu.Handle),
winforms\Managed\System\WinForms\UserControl.cs (1)
296
if (hwnd == hwndFocus ||
SafeNativeMethods
.IsChild(new HandleRef(this, hwnd), new HandleRef(null, hwndFocus)))
winforms\Managed\System\WinForms\VisualStyles\VisualStyleInformation.cs (13)
63
return (
SafeNativeMethods
.IsAppThemed());
71
SafeNativeMethods
.GetCurrentThemeName(filename, filename.Capacity, null, 0, null, 0);
87
SafeNativeMethods
.GetCurrentThemeName(null, 0, colorScheme, colorScheme.Capacity, null, 0);
103
SafeNativeMethods
.GetCurrentThemeName(null, 0, null, 0, size, size.Capacity);
119
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.DisplayName, name, name.Capacity);
135
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.Company, company, company.Capacity);
151
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.Author, author, author.Capacity);
167
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.Copyright, copyright, copyright.Capacity);
185
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.Url, url, url.Capacity);
201
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.Version, version, version.Capacity);
217
SafeNativeMethods
.GetThemeDocumentationProperty(ThemeFilename, VisualStyleDocProperty.Description, description, description.Capacity);
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 (33)
129
returnVal =
SafeNativeMethods
.IsThemePartDefined(new HandleRef(null, hTheme), part, 0);
137
returnVal =
SafeNativeMethods
.IsThemePartDefined(new HandleRef(null, tHandle.NativeHandle), part, 0);
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);
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);
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));
1138
hTheme =
SafeNativeMethods
.OpenThemeData(hWndRef, className);
1171
SafeNativeMethods
.CloseThemeData(new HandleRef(null, _hTheme));
winforms\Managed\System\WinForms\WebBrowser.cs (1)
1203
&&
SafeNativeMethods
.IsChild(new HandleRef(this, this.Handle), new HandleRef(null, hwndFocus));
winforms\Managed\System\WinForms\WebBrowserBase.cs (2)
396
msg.time =
SafeNativeMethods
.GetTickCount();
401
if (
SafeNativeMethods
.IsAccelerator(new HandleRef(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) {
winforms\Managed\System\WinForms\WebBrowserHelper.cs (1)
96
internal static readonly int REGMSG_MSG =
SafeNativeMethods
.RegisterWindowMessage(Application.WindowMessagesVersion + "_subclassCheck");
winforms\Managed\System\WinForms\WinFormsUtils.cs (12)
55
int lastXY =
SafeNativeMethods
.GetMessagePos();
626
success =
SafeNativeMethods
.GetViewportOrgEx(hDC, viewportOrg);
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));
640
int result =
SafeNativeMethods
.GetClipRgn(hDC, hOriginalClippingRegion);
645
success =
SafeNativeMethods
.SetViewportOrgEx(hDC, viewportOrg.x + bounds.Left, viewportOrg.y + bounds.Top, lastViewPort);
652
originalRegionType = (NativeMethods.RegionFlags)
SafeNativeMethods
.GetRgnBox(hOriginalClippingRegion, ref originalClipRect);
661
NativeMethods.RegionFlags combineResult = (NativeMethods.RegionFlags)
SafeNativeMethods
.CombineRgn(hClippingRegion, hClippingRegion, hOriginalClippingRegion, NativeMethods.RGN_AND);
671
SafeNativeMethods
.DeleteObject(hOriginalClippingRegion);
677
NativeMethods.RegionFlags selectResult = (NativeMethods.RegionFlags)
SafeNativeMethods
.SelectClipRgn(hDC, hClippingRegion);
697
success =
SafeNativeMethods
.DeleteObject(hClippingRegion);
701
success =
SafeNativeMethods
.DeleteObject(hOriginalClippingRegion);