86 references to NativeMethods
PresentationFramework (86)
System\Windows\Appearance\WindowBackdropManager.cs (3)
84var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 93var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 134var dwmApiResult = NativeMethods.DwmExtendFrameIntoClientArea(hwnd, ref margins);
System\Windows\Shell\WindowChromeWorker.cs (46)
256NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 367IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, uMsg, wParam, lParam); 385IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 516handled = NativeMethods.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet); 612var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32(); 619NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle)); 628var wpl = NativeMethods.GetWindowPlacement(_hwnd); 644RECT windowPosition = NativeMethods.GetWindowRect(_hwnd); 669IntPtr hmenu = NativeMethods.GetSystemMenu(_hwnd, false); 672var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32(); 681NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled); 682NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfDisabled); 683NativeMethods.EnableMenuItem(hmenu, SC.SIZE, mfDisabled); 684NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled); 685NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled); 688NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled); 689NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfDisabled); 690NativeMethods.EnableMenuItem(hmenu, SC.SIZE, mfDisabled); 691NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled); 692NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled); 695NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled); 696NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfEnabled); 697NativeMethods.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled); 698NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled); 699NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled); 719bool frameState = NativeMethods.DwmIsCompositionEnabled(); 735NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 741NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 750WINDOWPLACEMENT wpl = NativeMethods.GetWindowPlacement(_hwnd); 769IntPtr hMon = NativeMethods.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); 771MONITORINFO mi = NativeMethods.GetMonitorInfo(hMon); 780hrgn = NativeMethods.CreateRectRgnIndirect(rcMax); 781NativeMethods.SetWindowRgn(_hwnd, hrgn, NativeMethods.IsWindowVisible(_hwnd)); 858NativeMethods.SetWindowRgn(_hwnd, hrgn, NativeMethods.IsWindowVisible(_hwnd)); 875return NativeMethods.CreateRectRgn( 883return NativeMethods.CreateRoundRectRgn( 899CombineRgnResult result = NativeMethods.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR); 950if (!NativeMethods.DwmIsCompositionEnabled()) 1005NativeMethods.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin); 1079RECT rcWindow = NativeMethods.GetWindowRect(_hwnd); 1150if (NativeMethods.DwmIsCompositionEnabled()) 1154NativeMethods.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin); 1161NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (8)
48hInstance = NativeMethods.GetModuleHandle(null), 49hbrBackground = NativeMethods.GetStockObject(StockObject.NULL_BRUSH), 54NativeMethods.RegisterClassEx(ref wc); 62Handle = NativeMethods.CreateWindowEx( 157return NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); 169ret = NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); 184NativeMethods.UnregisterClass(className, NativeMethods.GetModuleHandle(null));
System\Windows\Standard\NativeMethods.cs (4)
1361return NativeMethods.FindClose(handle); 1524return NativeMethods.DeleteObject(handle); 1534Status s = NativeMethods.GdiplusShutdown(this.handle); 1545Status s = NativeMethods.GdiplusStartup(out unsafeHandle, new StartupInput(), out output);
System\Windows\Standard\Utilities.cs (5)
180s_bitDepth = NativeMethods.GetDeviceCaps(dc, DeviceCap.BITSPIXEL) * NativeMethods.GetDeviceCaps(dc, DeviceCap.PLANES); 193NativeMethods.DeleteObject(p); 201if (NativeMethods.IsWindow(p)) 203NativeMethods.DestroyWindow(p);
System\Windows\SystemCommands.cs (6)
31if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 36NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 80if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 85IntPtr hmenu = NativeMethods.GetSystemMenu(hwnd, false); 87uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero); 90NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (12)
5499_isGlassEnabled = Standard.NativeMethods.DwmIsCompositionEnabled(); 5522if (!Standard.NativeMethods.IsThemeActive()) 5532Standard.NativeMethods.GetCurrentThemeName(out name, out color, out size); 5557if (!Standard.NativeMethods.IsThemeActive()) 5567Standard.NativeMethods.GetCurrentThemeName(out name, out color, out size); 5612if (Standard.NativeMethods.DwmIsCompositionEnabled()) 5652Standard.NativeMethods.DwmGetColorizationColor(out color, out isOpaque); 5700Size frameSize = new Size(Standard.NativeMethods.GetSystemMetrics(Standard.SM.CXSIZEFRAME), 5701Standard.NativeMethods.GetSystemMetrics(Standard.SM.CYSIZEFRAME)); 5725Size frameSize = new Size(Standard.NativeMethods.GetSystemMetrics(Standard.SM.CXSIZEFRAME), 5726Standard.NativeMethods.GetSystemMetrics(Standard.SM.CYSIZEFRAME)); 5728int captionHeight = Standard.NativeMethods.GetSystemMetrics(Standard.SM.CYCAPTION);
System\Windows\Window.cs (2)
24using SNM = Standard.NativeMethods; 2612bool succeeded = SNM.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode);