Free cookie consent management tool by TermsFeed Policy Generator

source: branches/CEDMA-Exporter-715/sources/WinFormsUI/Docking/Win32/NativeMethods.cs @ 2716

Last change on this file since 2716 was 2134, checked in by gkronber, 15 years ago

Added up to date source of Weifen Luo dock panel suit in a separate project (and added strong name key). Removed binary versions of Weifen Luo dock panel suite and references to it. #687 (Update AdvancedOptimizationFrontend to use more recent version of Weifen Luo Docking library)

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