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