86 references to NativeMethods
PresentationFramework (86)
System\Windows\Appearance\WindowBackdropManager.cs (3)
84
var dwmResult =
NativeMethods
.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
93
var dwmResult =
NativeMethods
.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
134
var dwmApiResult =
NativeMethods
.DwmExtendFrameIntoClientArea(hwnd, ref margins);
System\Windows\Shell\WindowChromeWorker.cs (46)
246
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
357
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, uMsg, wParam, lParam);
375
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1));
506
handled =
NativeMethods
.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet);
602
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
609
NativeMethods
.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
618
var wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
634
RECT windowPosition =
NativeMethods
.GetWindowRect(_hwnd);
659
IntPtr hmenu =
NativeMethods
.GetSystemMenu(_hwnd, false);
662
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
671
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
672
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
673
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
674
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
675
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled);
678
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
679
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
680
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
681
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled);
682
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
685
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled);
686
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfEnabled);
687
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled);
688
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
689
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
709
bool frameState =
NativeMethods
.DwmIsCompositionEnabled();
725
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
731
NativeMethods
.SetWindowRgn(_hwnd, IntPtr.Zero,
NativeMethods
.IsWindowVisible(_hwnd));
740
WINDOWPLACEMENT wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
759
IntPtr hMon =
NativeMethods
.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST);
761
MONITORINFO mi =
NativeMethods
.GetMonitorInfo(hMon);
770
hrgn =
NativeMethods
.CreateRectRgnIndirect(rcMax);
771
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
848
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
865
return
NativeMethods
.CreateRectRgn(
873
return
NativeMethods
.CreateRoundRectRgn(
889
CombineRgnResult result =
NativeMethods
.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR);
940
if (!
NativeMethods
.DwmIsCompositionEnabled())
995
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1069
RECT rcWindow =
NativeMethods
.GetWindowRect(_hwnd);
1140
if (
NativeMethods
.DwmIsCompositionEnabled())
1144
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1151
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (8)
48
hInstance =
NativeMethods
.GetModuleHandle(null),
49
hbrBackground =
NativeMethods
.GetStockObject(StockObject.NULL_BRUSH),
54
NativeMethods
.RegisterClassEx(ref wc);
62
Handle =
NativeMethods
.CreateWindowEx(
157
return
NativeMethods
.DefWindowProc(hwnd, msg, wParam, lParam);
169
ret =
NativeMethods
.DefWindowProc(hwnd, msg, wParam, lParam);
184
NativeMethods
.UnregisterClass(className,
NativeMethods
.GetModuleHandle(null));
System\Windows\Standard\NativeMethods.cs (4)
1363
return
NativeMethods
.FindClose(handle);
1517
return
NativeMethods
.DeleteObject(handle);
1527
Status s =
NativeMethods
.GdiplusShutdown(this.handle);
1538
Status s =
NativeMethods
.GdiplusStartup(out unsafeHandle, new StartupInput(), out output);
System\Windows\Standard\Utilities.cs (5)
180
s_bitDepth =
NativeMethods
.GetDeviceCaps(dc, DeviceCap.BITSPIXEL) *
NativeMethods
.GetDeviceCaps(dc, DeviceCap.PLANES);
193
NativeMethods
.DeleteObject(p);
201
if (
NativeMethods
.IsWindow(p))
203
NativeMethods
.DestroyWindow(p);
System\Windows\SystemCommands.cs (6)
31
if (hwnd == IntPtr.Zero || !
NativeMethods
.IsWindow(hwnd))
36
NativeMethods
.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
80
if (hwnd == IntPtr.Zero || !
NativeMethods
.IsWindow(hwnd))
85
IntPtr hmenu =
NativeMethods
.GetSystemMenu(hwnd, false);
87
uint cmd =
NativeMethods
.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero);
90
NativeMethods
.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (12)
5499
_isGlassEnabled = Standard.
NativeMethods
.DwmIsCompositionEnabled();
5522
if (!Standard.
NativeMethods
.IsThemeActive())
5532
Standard.
NativeMethods
.GetCurrentThemeName(out name, out color, out size);
5557
if (!Standard.
NativeMethods
.IsThemeActive())
5567
Standard.
NativeMethods
.GetCurrentThemeName(out name, out color, out size);
5612
if (Standard.
NativeMethods
.DwmIsCompositionEnabled())
5652
Standard.
NativeMethods
.DwmGetColorizationColor(out color, out isOpaque);
5700
Size frameSize = new Size(Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CXSIZEFRAME),
5701
Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYSIZEFRAME));
5725
Size frameSize = new Size(Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CXSIZEFRAME),
5726
Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYSIZEFRAME));
5728
int captionHeight = Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYCAPTION);
System\Windows\Window.cs (2)
24
using SNM = Standard.
NativeMethods
;
2603
bool succeeded =
SNM
.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode);