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