// THIS FILE IS PART OF Vanara PROJECT // THE Vanara PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MIT License. // COPYRIGHT (C) dahall. ALL RIGHTS RESERVED. // GITHUB: https://github.com/dahall/Vanara using System.Runtime.InteropServices; namespace Vanara.PInvoke { /// User32.dll function with GDI params. public static partial class User32 { /// Values to use a return codes when handling the WM_HCHITTEST message. public enum HitTestValues : short { /// In the border of a window that does not have a sizing border. HTBORDER = 18, /// In the lower-horizontal border of a resizable window (the user can click the mouse to resize the window vertically). HTBOTTOM = 15, /// /// In the lower-left corner of a border of a resizable window (the user can click the mouse to resize the window diagonally). /// HTBOTTOMLEFT = 16, /// /// In the lower-right corner of a border of a resizable window (the user can click the mouse to resize the window diagonally). /// HTBOTTOMRIGHT = 17, /// In a title bar. HTCAPTION = 2, /// In a client area. HTCLIENT = 1, /// In a Close button. HTCLOSE = 20, /// /// On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function /// produces a system beep to indicate an error). /// HTERROR = -2, /// In a size box (same as HTSIZE). HTGROWBOX = 4, /// In a Help button. HTHELP = 21, /// In a horizontal scroll bar. HTHSCROLL = 6, /// In the left border of a resizable window (the user can click the mouse to resize the window horizontally). HTLEFT = 10, /// In a menu. HTMENU = 5, /// In a Maximize button. HTMAXBUTTON = 9, /// In a Minimize button. HTMINBUTTON = 8, /// On the screen background or on a dividing line between windows. HTNOWHERE = 0, /* /// Not implemented. HTOBJECT = 19, */ /// In a Minimize button. HTREDUCE = HTMINBUTTON, /// In the right border of a resizable window (the user can click the mouse to resize the window horizontally). HTRIGHT = 11, /// In a size box (same as HTGROWBOX). HTSIZE = HTGROWBOX, /// In a window menu or in a Close button in a child window. HTSYSMENU = 3, /// In the upper-horizontal border of a window. HTTOP = 12, /// In the upper-left corner of a window border. HTTOPLEFT = 13, /// In the upper-right corner of a window border. HTTOPRIGHT = 14, /// /// In a window currently covered by another window in the same thread (the message will be sent to underlying windows in the /// same thread until one of them returns a code that is not HTTRANSPARENT). /// HTTRANSPARENT = -1, /// In the vertical scroll bar. HTVSCROLL = 7, /// In a Maximize button. HTZOOM = HTMAXBUTTON, } /// Contains information about the size and position of a window. [StructLayout(LayoutKind.Sequential)] public struct WINDOWPOS { /// A handle to the window. public HWND hwnd; /// /// The position of the window in Z order (front-to-back position). This member can be a handle to the window behind which this /// window is placed, or can be one of the special values listed with the SetWindowPos function. /// public HWND hwndInsertAfter; /// The position of the left edge of the window. public int x; /// The position of the top edge of the window. public int y; /// The window width, in pixels. public int cx; /// The window height, in pixels. public int cy; /// The window position. This member can be one or more of the following values. public SetWindowPosFlags flags; } } }