86 references to NativeMethods
PresentationFramework (86)
System\Windows\Appearance\WindowBackdropManager.cs (3)
81
var dwmResult =
NativeMethods
.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
90
var dwmResult =
NativeMethods
.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
131
var dwmApiResult =
NativeMethods
.DwmExtendFrameIntoClientArea(hwnd, ref margins);
System\Windows\Shell\WindowChromeWorker.cs (46)
257
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
368
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, uMsg, wParam, lParam);
386
IntPtr lRet =
NativeMethods
.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1));
517
handled =
NativeMethods
.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet);
613
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
620
NativeMethods
.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
629
var wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
645
RECT windowPosition =
NativeMethods
.GetWindowRect(_hwnd);
670
IntPtr hmenu =
NativeMethods
.GetSystemMenu(_hwnd, false);
673
var dwStyle = (WS)
NativeMethods
.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
682
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
683
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
684
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
685
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
686
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled);
689
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled);
690
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfDisabled);
691
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, mfDisabled);
692
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled);
693
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
696
NativeMethods
.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled);
697
NativeMethods
.EnableMenuItem(hmenu, SC.MOVE, mfEnabled);
698
NativeMethods
.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled);
699
NativeMethods
.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled);
700
NativeMethods
.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled);
720
bool frameState =
NativeMethods
.DwmIsCompositionEnabled();
736
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
742
NativeMethods
.SetWindowRgn(_hwnd, IntPtr.Zero,
NativeMethods
.IsWindowVisible(_hwnd));
751
WINDOWPLACEMENT wpl =
NativeMethods
.GetWindowPlacement(_hwnd);
770
IntPtr hMon =
NativeMethods
.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST);
772
MONITORINFO mi =
NativeMethods
.GetMonitorInfo(hMon);
781
hrgn =
NativeMethods
.CreateRectRgnIndirect(rcMax);
782
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
859
NativeMethods
.SetWindowRgn(_hwnd, hrgn,
NativeMethods
.IsWindowVisible(_hwnd));
876
return
NativeMethods
.CreateRectRgn(
884
return
NativeMethods
.CreateRoundRectRgn(
900
CombineRgnResult result =
NativeMethods
.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR);
951
if (!
NativeMethods
.DwmIsCompositionEnabled())
1006
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1080
RECT rcWindow =
NativeMethods
.GetWindowRect(_hwnd);
1151
if (
NativeMethods
.DwmIsCompositionEnabled())
1155
NativeMethods
.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin);
1162
NativeMethods
.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (8)
49
hInstance =
NativeMethods
.GetModuleHandle(null),
50
hbrBackground =
NativeMethods
.GetStockObject(StockObject.NULL_BRUSH),
55
NativeMethods
.RegisterClassEx(ref wc);
63
Handle =
NativeMethods
.CreateWindowEx(
158
return
NativeMethods
.DefWindowProc(hwnd, msg, wParam, lParam);
170
ret =
NativeMethods
.DefWindowProc(hwnd, msg, wParam, lParam);
185
NativeMethods
.UnregisterClass(className,
NativeMethods
.GetModuleHandle(null));
System\Windows\Standard\NativeMethods.cs (4)
1362
return
NativeMethods
.FindClose(handle);
1525
return
NativeMethods
.DeleteObject(handle);
1535
Status s =
NativeMethods
.GdiplusShutdown(this.handle);
1546
Status s =
NativeMethods
.GdiplusStartup(out unsafeHandle, new StartupInput(), out output);
System\Windows\Standard\Utilities.cs (5)
181
s_bitDepth =
NativeMethods
.GetDeviceCaps(dc, DeviceCap.BITSPIXEL) *
NativeMethods
.GetDeviceCaps(dc, DeviceCap.PLANES);
194
NativeMethods
.DeleteObject(p);
202
if (
NativeMethods
.IsWindow(p))
204
NativeMethods
.DestroyWindow(p);
System\Windows\SystemCommands.cs (6)
32
if (hwnd == IntPtr.Zero || !
NativeMethods
.IsWindow(hwnd))
37
NativeMethods
.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
81
if (hwnd == IntPtr.Zero || !
NativeMethods
.IsWindow(hwnd))
86
IntPtr hmenu =
NativeMethods
.GetSystemMenu(hwnd, false);
88
uint cmd =
NativeMethods
.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero);
91
NativeMethods
.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (12)
5514
_isGlassEnabled = Standard.
NativeMethods
.DwmIsCompositionEnabled();
5537
if (!Standard.
NativeMethods
.IsThemeActive())
5547
Standard.
NativeMethods
.GetCurrentThemeName(out name, out color, out size);
5572
if (!Standard.
NativeMethods
.IsThemeActive())
5582
Standard.
NativeMethods
.GetCurrentThemeName(out name, out color, out size);
5627
if (Standard.
NativeMethods
.DwmIsCompositionEnabled())
5667
Standard.
NativeMethods
.DwmGetColorizationColor(out color, out isOpaque);
5715
Size frameSize = new Size(Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CXSIZEFRAME),
5716
Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYSIZEFRAME));
5740
Size frameSize = new Size(Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CXSIZEFRAME),
5741
Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYSIZEFRAME));
5743
int captionHeight = Standard.
NativeMethods
.GetSystemMetrics(Standard.SM.CYCAPTION);
System\Windows\Window.cs (2)
25
using SNM = Standard.
NativeMethods
;
2629
bool succeeded =
SNM
.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode);