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