85 references to NativeMethods
PresentationFramework (85)
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (50)
345NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 442RECT rcWindow = NativeMethods.GetWindowRect(_hwnd); 546WINDOWPLACEMENT wp = NativeMethods.GetWindowPlacement(_hwnd); 571var style = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE); 572var exstyle = (WS_EX)NativeMethods.GetWindowLongPtr(_hwnd, GWL.EXSTYLE); 574return NativeMethods.AdjustWindowRectEx(rcWindow, style, false, exstyle); 642IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, uMsg, wParam, lParam); 664IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 803handled = NativeMethods.DwmDefWindowProc(_hwnd, uMsg, wParam, lParam, out lRet); 1000var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32(); 1007NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle)); 1020var wpl = NativeMethods.GetWindowPlacement(_hwnd); 1040RECT windowPosition = NativeMethods.GetWindowRect(_hwnd); 1069IntPtr hmenu = NativeMethods.GetSystemMenu(_hwnd, false); 1072var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32(); 1081NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled); 1082NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfDisabled); 1083NativeMethods.EnableMenuItem(hmenu, SC.SIZE, mfDisabled); 1084NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled); 1085NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, mfDisabled); 1088NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfEnabled); 1089NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfDisabled); 1090NativeMethods.EnableMenuItem(hmenu, SC.SIZE, mfDisabled); 1091NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, mfDisabled); 1092NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled); 1095NativeMethods.EnableMenuItem(hmenu, SC.RESTORE, mfDisabled); 1096NativeMethods.EnableMenuItem(hmenu, SC.MOVE, mfEnabled); 1097NativeMethods.EnableMenuItem(hmenu, SC.SIZE, canSize ? mfEnabled : mfDisabled); 1098NativeMethods.EnableMenuItem(hmenu, SC.MINIMIZE, canMinimize ? mfEnabled : mfDisabled); 1099NativeMethods.EnableMenuItem(hmenu, SC.MAXIMIZE, canMaximize ? mfEnabled : mfDisabled); 1123bool frameState = NativeMethods.DwmIsCompositionEnabled(); 1139NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 1149NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 1162WINDOWPLACEMENT wpl = NativeMethods.GetWindowPlacement(_hwnd); 1181IntPtr hMon = NativeMethods.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); 1183MONITORINFO mi = NativeMethods.GetMonitorInfo(hMon); 1192hrgn = NativeMethods.CreateRectRgnIndirect(rcMax); 1193NativeMethods.SetWindowRgn(_hwnd, hrgn, NativeMethods.IsWindowVisible(_hwnd)); 1270NativeMethods.SetWindowRgn(_hwnd, hrgn, NativeMethods.IsWindowVisible(_hwnd)); 1291return NativeMethods.CreateRectRgn( 1299return NativeMethods.CreateRoundRectRgn( 1319CombineRgnResult result = NativeMethods.CombineRgn(hrgnSource, hrgnSource, hrgn, RGN.OR); 1374if (!NativeMethods.DwmIsCompositionEnabled()) 1429NativeMethods.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin); 1566if (NativeMethods.DwmIsCompositionEnabled()) 1570NativeMethods.DwmExtendFrameIntoClientArea(_hwnd, ref dwmMargin); 1581NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
src\Framework\System\Windows\Standard\MessageWindow.cs (8)
81hInstance = NativeMethods.GetModuleHandle(null), 82hbrBackground = NativeMethods.GetStockObject(StockObject.NULL_BRUSH), 87NativeMethods.RegisterClassEx(ref wc); 95Handle = NativeMethods.CreateWindowEx( 210return NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); 222ret = NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); 241NativeMethods.UnregisterClass(className, NativeMethods.GetModuleHandle(null));
src\Framework\System\Windows\Standard\NativeMethods.cs (4)
1355return NativeMethods.FindClose(handle); 1598return NativeMethods.DeleteObject(handle); 1621Status s = NativeMethods.GdiplusShutdown(this.handle); 1637Status s = NativeMethods.GdiplusStartup(out unsafeHandle, new StartupInput(), out output);
src\Framework\System\Windows\Standard\Utilities.cs (5)
198s_bitDepth = NativeMethods.GetDeviceCaps(dc, DeviceCap.BITSPIXEL) * NativeMethods.GetDeviceCaps(dc, DeviceCap.PLANES); 216NativeMethods.DeleteObject(p); 229if (NativeMethods.IsWindow(p)) 231NativeMethods.DestroyWindow(p);
src\Framework\System\Windows\SystemCommands.cs (6)
35if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 40NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 117if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 122IntPtr hmenu = NativeMethods.GetSystemMenu(hwnd, false); 124uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero); 127NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
src\Framework\System\Windows\SystemParameters.cs (12)
6097_isGlassEnabled = Standard.NativeMethods.DwmIsCompositionEnabled(); 6124if (!Standard.NativeMethods.IsThemeActive()) 6134Standard.NativeMethods.GetCurrentThemeName(out name, out color, out size); 6163if (!Standard.NativeMethods.IsThemeActive()) 6173Standard.NativeMethods.GetCurrentThemeName(out name, out color, out size); 6222if (Standard.NativeMethods.DwmIsCompositionEnabled()) 6266Standard.NativeMethods.DwmGetColorizationColor(out color, out isOpaque); 6322Size frameSize = new Size(Standard.NativeMethods.GetSystemMetrics(Standard.SM.CXSIZEFRAME), 6323Standard.NativeMethods.GetSystemMetrics(Standard.SM.CYSIZEFRAME)); 6351Size frameSize = new Size(Standard.NativeMethods.GetSystemMetrics(Standard.SM.CXSIZEFRAME), 6352Standard.NativeMethods.GetSystemMetrics(Standard.SM.CYSIZEFRAME)); 6354int captionHeight = Standard.NativeMethods.GetSystemMetrics(Standard.SM.CYCAPTION);