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)
256
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
367
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, uMsg, wParam, lParam);
385
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1));
516
handled =
NativeMethods
.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet);
612
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
619
NativeMethods
.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
628
var wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
644
RECT windowPosition =
NativeMethods
.GetWindowRect(_hwnd);
669
IntPtr hmenu =
NativeMethods
.GetSystemMenu(_hwnd, false);
672
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
681
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
682
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
683
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
684
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
685
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled);
688
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
689
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
690
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
691
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled);
692
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
695
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled);
696
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfEnabled);
697
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled);
698
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
699
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
719
bool frameState =
NativeMethods
.DwmIsCompositionEnabled();
735
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
741
NativeMethods
.SetWindowRgn(_hwnd, IntPtr.Zero,
NativeMethods
.IsWindowVisible(_hwnd));
750
WINDOWPLACEMENT wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
769
IntPtr hMon =
NativeMethods
.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST);
771
MONITORINFO mi =
NativeMethods
.GetMonitorInfo(hMon);
780
hrgn =
NativeMethods
.CreateRectRgnIndirect(rcMax);
781
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
858
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
875
return
NativeMethods
.CreateRectRgn(
883
return
NativeMethods
.CreateRoundRectRgn(
899
CombineRgnResult result =
NativeMethods
.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR);
950
if (!
NativeMethods
.DwmIsCompositionEnabled())
1005
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1079
RECT rcWindow =
NativeMethods
.GetWindowRect(_hwnd);
1150
if (
NativeMethods
.DwmIsCompositionEnabled())
1154
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1161
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)
1361
return
NativeMethods
.FindClose(handle);
1524
return
NativeMethods
.DeleteObject(handle);
1534
Status s =
NativeMethods
.GdiplusShutdown(this.handle);
1545
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
;
2612
bool succeeded =
SNM
.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode);