86 references to NativeMethods
PresentationFramework (86)
System\Windows\Appearance\WindowBackdropManager.cs (3)
82
var dwmResult =
NativeMethods
.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
91
var dwmResult =
NativeMethods
.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
132
var dwmApiResult =
NativeMethods
.DwmExtendFrameIntoClientArea(hwnd, ref margins);
System\Windows\Shell\WindowChromeWorker.cs (46)
262
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
373
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, uMsg, wParam, lParam);
391
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1));
522
handled =
NativeMethods
.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet);
618
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
625
NativeMethods
.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
634
var wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
650
RECT windowPosition =
NativeMethods
.GetWindowRect(_hwnd);
675
IntPtr hmenu =
NativeMethods
.GetSystemMenu(_hwnd, false);
678
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
687
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
688
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
689
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
690
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
691
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled);
694
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
695
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
696
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
697
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled);
698
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
701
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled);
702
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfEnabled);
703
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled);
704
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
705
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
725
bool frameState =
NativeMethods
.DwmIsCompositionEnabled();
741
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
747
NativeMethods
.SetWindowRgn(_hwnd, IntPtr.Zero,
NativeMethods
.IsWindowVisible(_hwnd));
756
WINDOWPLACEMENT wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
775
IntPtr hMon =
NativeMethods
.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST);
777
MONITORINFO mi =
NativeMethods
.GetMonitorInfo(hMon);
786
hrgn =
NativeMethods
.CreateRectRgnIndirect(rcMax);
787
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
864
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
881
return
NativeMethods
.CreateRectRgn(
889
return
NativeMethods
.CreateRoundRectRgn(
905
CombineRgnResult result =
NativeMethods
.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR);
956
if (!
NativeMethods
.DwmIsCompositionEnabled())
1011
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1085
RECT rcWindow =
NativeMethods
.GetWindowRect(_hwnd);
1156
if (
NativeMethods
.DwmIsCompositionEnabled())
1160
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1167
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (8)
52
hInstance =
NativeMethods
.GetModuleHandle(null),
53
hbrBackground =
NativeMethods
.GetStockObject(StockObject.NULL_BRUSH),
58
NativeMethods
.RegisterClassEx(ref wc);
66
Handle =
NativeMethods
.CreateWindowEx(
161
return
NativeMethods
.DefWindowProc(hwnd, msg, wParam, lParam);
173
ret =
NativeMethods
.DefWindowProc(hwnd, msg, wParam, lParam);
188
NativeMethods
.UnregisterClass(className,
NativeMethods
.GetModuleHandle(null));
System\Windows\Standard\NativeMethods.cs (4)
1367
return
NativeMethods
.FindClose(handle);
1530
return
NativeMethods
.DeleteObject(handle);
1540
Status s =
NativeMethods
.GdiplusShutdown(this.handle);
1551
Status s =
NativeMethods
.GdiplusStartup(out unsafeHandle, new StartupInput(), out output);
System\Windows\Standard\Utilities.cs (5)
190
s_bitDepth =
NativeMethods
.GetDeviceCaps(dc, DeviceCap.BITSPIXEL) *
NativeMethods
.GetDeviceCaps(dc, DeviceCap.PLANES);
203
NativeMethods
.DeleteObject(p);
211
if (
NativeMethods
.IsWindow(p))
213
NativeMethods
.DestroyWindow(p);
System\Windows\SystemCommands.cs (6)
34
if (hwnd == IntPtr.Zero || !
NativeMethods
.IsWindow(hwnd))
39
NativeMethods
.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
83
if (hwnd == IntPtr.Zero || !
NativeMethods
.IsWindow(hwnd))
88
IntPtr hmenu =
NativeMethods
.GetSystemMenu(hwnd, false);
90
uint cmd =
NativeMethods
.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero);
93
NativeMethods
.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (12)
5518
_isGlassEnabled = Standard.
NativeMethods
.DwmIsCompositionEnabled();
5541
if (!Standard.
NativeMethods
.IsThemeActive())
5551
Standard.
NativeMethods
.GetCurrentThemeName(out name, out color, out size);
5576
if (!Standard.
NativeMethods
.IsThemeActive())
5586
Standard.
NativeMethods
.GetCurrentThemeName(out name, out color, out size);
5631
if (Standard.
NativeMethods
.DwmIsCompositionEnabled())
5671
Standard.
NativeMethods
.DwmGetColorizationColor(out color, out isOpaque);
5719
Size frameSize = new Size(Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CXSIZEFRAME),
5720
Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYSIZEFRAME));
5744
Size frameSize = new Size(Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CXSIZEFRAME),
5745
Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYSIZEFRAME));
5747
int captionHeight = Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYCAPTION);
System\Windows\Window.cs (2)
37
using SNM = Standard.
NativeMethods
;
2642
bool succeeded =
SNM
.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode);