90 references to NativeMethods
PresentationFramework (90)
System\Windows\Appearance\WindowBackdropManager.cs (3)
77var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 86var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 127var dwmApiResult = NativeMethods.DwmExtendFrameIntoClientArea(hwnd, ref margins);
System\Windows\Shell\WindowChromeWorker.cs (51)
280NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 367RECT rcWindow = NativeMethods.GetWindowRect(_hwnd); 465WINDOWPLACEMENT wp = NativeMethods.GetWindowPlacement(_hwnd); 486var style = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE); 487var exstyle = (WS_EX)NativeMethods.GetWindowLongPtr(_hwnd, GWL.EXSTYLE); 489return NativeMethods.AdjustWindowRectEx(rcWindow, style, false, exstyle); 545IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, uMsg, wParam, lParam); 563IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 694handled = NativeMethods.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet); 863var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32(); 870NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle)); 879var wpl = NativeMethods.GetWindowPlacement(_hwnd); 895RECT windowPosition = NativeMethods.GetWindowRect(_hwnd); 920IntPtr hmenu = NativeMethods.GetSystemMenu(_hwnd, false); 923var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32(); 932NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled); 933NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfDisabled); 934NativeMethods.EnableMenuItem(hmenu, SC.SIZE, mfDisabled); 935NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled); 936NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled); 939NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled); 940NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfDisabled); 941NativeMethods.EnableMenuItem(hmenu, SC.SIZE, mfDisabled); 942NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled); 943NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled); 946NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled); 947NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfEnabled); 948NativeMethods.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled); 949NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled); 950NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled); 970bool frameState = NativeMethods.DwmIsCompositionEnabled(); 986NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 992NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 1001WINDOWPLACEMENT wpl = NativeMethods.GetWindowPlacement(_hwnd); 1020IntPtr hMon = NativeMethods.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); 1022MONITORINFO mi = NativeMethods.GetMonitorInfo(hMon); 1031hrgn = NativeMethods.CreateRectRgnIndirect(rcMax); 1032NativeMethods.SetWindowRgn(_hwnd, hrgn, NativeMethods.IsWindowVisible(_hwnd)); 1109NativeMethods.SetWindowRgn(_hwnd, hrgn, NativeMethods.IsWindowVisible(_hwnd)); 1126return NativeMethods.CreateRectRgn( 1134return NativeMethods.CreateRoundRectRgn( 1150CombineRgnResult result = NativeMethods.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR); 1201if (!NativeMethods.DwmIsCompositionEnabled()) 1256NativeMethods.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin); 1330RECT rcWindow = NativeMethods.GetWindowRect(_hwnd); 1410if (NativeMethods.DwmIsCompositionEnabled()) 1414NativeMethods.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin); 1421NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (8)
53hInstance = NativeMethods.GetModuleHandle(null), 54hbrBackground = NativeMethods.GetStockObject(StockObject.NULL_BRUSH), 59NativeMethods.RegisterClassEx(ref wc); 67Handle = NativeMethods.CreateWindowEx( 162return NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); 174ret = NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); 189NativeMethods.UnregisterClass(className, NativeMethods.GetModuleHandle(null));
System\Windows\Standard\NativeMethods.cs (4)
1367return NativeMethods.FindClose(handle); 1536return NativeMethods.DeleteObject(handle); 1546Status s = NativeMethods.GdiplusShutdown(this.handle); 1558Status s = NativeMethods.GdiplusStartup(out unsafeHandle, new StartupInput(), out output);
System\Windows\Standard\Utilities.cs (5)
215s_bitDepth = NativeMethods.GetDeviceCaps(dc, DeviceCap.BITSPIXEL) * NativeMethods.GetDeviceCaps(dc, DeviceCap.PLANES); 229NativeMethods.DeleteObject(p); 238if (NativeMethods.IsWindow(p)) 240NativeMethods.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\ThemeManager.cs (1)
144var dwmResult = NativeMethods.DwmSetWindowAttributeUseImmersiveDarkMode(handle, useDarkMode);