/ src / modules / MeasureTool / MeasureToolUI / NativeMethods.cs
NativeMethods.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System;
 6  using System.Runtime.InteropServices;
 7  
 8  internal static class NativeMethods
 9  {
10      [DllImport("user32.dll")]
11      internal static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
12  
13      internal static readonly IntPtr HWND_TOPMOST = new System.IntPtr(-1);
14      internal const uint SWP_NOSIZE = 0x0001;
15      internal const uint SWP_NOMOVE = 0x0002;
16      internal const uint SWP_NOACTIVATE = 0x0010;
17      internal const uint SWP_SHOWWINDOW = 0x0040;
18  
19      [DllImport("user32.dll", SetLastError = true)]
20      internal static extern int GetWindowLong(IntPtr hWnd, int nIndex);
21  
22      [DllImport("user32.dll")]
23      internal static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
24  
25      internal const int GWL_STYLE = -16;
26      internal const int WS_CAPTION = 0x00C00000;
27  }