Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Win32/NativeMethods.cs @ 4068

Last change on this file since 4068 was 4068, checked in by swagner, 14 years ago

Sorted usings and removed unused usings in entire solution (#1094)

File size: 2.6 KB
Line 
1using System;
2using System.Diagnostics.CodeAnalysis;
3using System.Drawing;
4using System.Runtime.InteropServices;
5using WeifenLuo.WinFormsUI.Docking.Win32;
6
7namespace WeifenLuo.WinFormsUI.Docking {
8  internal static class NativeMethods {
9    [DllImport("User32.dll", CharSet = CharSet.Auto)]
10    [return: MarshalAs(UnmanagedType.Bool)]
11    public static extern bool DragDetect(IntPtr hWnd, Point pt);
12
13    [DllImport("User32.dll", CharSet = CharSet.Auto)]
14    public static extern IntPtr GetFocus();
15
16    [DllImport("User32.dll", CharSet = CharSet.Auto)]
17    public static extern IntPtr SetFocus(IntPtr hWnd);
18
19    [DllImport("User32.dll", CharSet = CharSet.Auto)]
20    [return: MarshalAs(UnmanagedType.Bool)]
21    public static extern bool PostMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
22
23    [DllImport("User32.dll", CharSet = CharSet.Auto)]
24    public static extern uint SendMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
25
26    [DllImport("User32.dll", CharSet = CharSet.Auto)]
27    public static extern int ShowWindow(IntPtr hWnd, short cmdShow);
28
29    [DllImport("User32.dll", CharSet = CharSet.Auto)]
30    public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndAfter, int X, int Y, int Width, int Height, FlagsSetWindowPos flags);
31
32    [DllImport("user32.dll", CharSet = CharSet.Auto)]
33    public static extern int GetWindowLong(IntPtr hWnd, int Index);
34
35    [DllImport("user32.dll", CharSet = CharSet.Auto)]
36    public static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);
37
38    [DllImport("user32.dll", CharSet = CharSet.Auto)]
39    public static extern int ShowScrollBar(IntPtr hWnd, int wBar, int bShow);
40
41    [DllImport("user32.dll", CharSet = CharSet.Auto)]
42    //*********************************
43    // FxCop bug, suppress the message
44    //*********************************
45    [SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", MessageId = "0")]
46    public static extern IntPtr WindowFromPoint(Point point);
47
48    [DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
49    public static extern int GetCurrentThreadId();
50
51    public delegate IntPtr HookProc(int code, IntPtr wParam, IntPtr lParam);
52
53    [DllImport("user32.dll")]
54    public static extern IntPtr SetWindowsHookEx(Win32.HookType code, HookProc func, IntPtr hInstance, int threadID);
55
56    [DllImport("user32.dll")]
57    public static extern int UnhookWindowsHookEx(IntPtr hhook);
58
59    [DllImport("user32.dll")]
60    public static extern IntPtr CallNextHookEx(IntPtr hhook, int code, IntPtr wParam, IntPtr lParam);
61  }
62}
Note: See TracBrowser for help on using the repository browser.