34 references to NativeMethods
System.Windows.Controls.Ribbon (34)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (6)
361
return HandleCollector.Add(hDc,
NativeMethods
.CommonHandles.HDC);
368
HandleCollector.Remove((IntPtr)hDC,
NativeMethods
.CommonHandles.HDC);
398
internal static
NativeMethods
.RECT FromRect(Rect rect)
400
NativeMethods
.RECT rc = new
NativeMethods
.RECT();
419
internal static Rect ToRect(
NativeMethods
.RECT rc)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonWindowSmallIconConverter.cs (6)
268
var hdcDesktop = new HandleRef(null,
NativeMethods
.GetDC(new HandleRef()));
271
int sysBitDepth =
NativeMethods
.GetDeviceCaps(hdcDesktop, (int)
NativeMethods
.DeviceCap.BITSPIXEL);
272
sysBitDepth *=
NativeMethods
.GetDeviceCaps(hdcDesktop, (int)
NativeMethods
.DeviceCap.PLANES);
285
NativeMethods
.ReleaseDC(new HandleRef(), hdcDesktop);
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (8)
1602
NativeMethods
.RECT popupPlacementTargetRect = new
NativeMethods
.RECT();
1607
IntPtr monitorPtr =
NativeMethods
.MonitorFromRect(ref popupPlacementTargetRect,
NativeMethods
.MONITOR_DEFAULTTONEAREST);
1610
NativeMethods
.MONITORINFOEX monitorInfo = new
NativeMethods
.MONITORINFOEX();
1612
NativeMethods
.GetMonitorInfo(new HandleRef(null, monitorPtr), monitorInfo);
1613
NativeMethods
.RECT rect = monitorInfo.rcMonitor;
Microsoft\Windows\Controls\Ribbon\RibbonDropDownHelper.cs (11)
165
NativeMethods
.RECT rect = new
NativeMethods
.RECT() { top = 0, bottom = 0, left = 0, right = 0 };
166
NativeMethods
.RECT nativeBounds =
NativeMethods
.FromRect(targetBoundingBox);
168
IntPtr monitor =
NativeMethods
.MonitorFromRect(ref nativeBounds,
NativeMethods
.MONITOR_DEFAULTTONEAREST);
171
NativeMethods
.MONITORINFOEX monitorInfo = new
NativeMethods
.MONITORINFOEX();
173
monitorInfo.cbSize = Marshal.SizeOf(typeof(
NativeMethods
.MONITORINFOEX));
174
NativeMethods
.GetMonitorInfo(new HandleRef(null, monitor), monitorInfo);
188
return
NativeMethods
.ToRect(rect);
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (2)
1029
capturedHwnd =
NativeMethods
.GetCapture();
2537
NativeMethods
.MessageBeep(0);
Microsoft\Windows\Controls\TextSearchInternal.cs (1)
736
return TimeSpan.FromMilliseconds(
NativeMethods
.GetDoubleClickTime() * 2);