//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// WFX satellite library | Author: Sergei Y.Kitáev
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Runtime.InteropServices;

using WF = System.Windows.Forms;

namespace WFX {

//**************************************************************************************************
static partial class Win32 {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public const uint
   SC_CLOSE          = 0xF060,
   MF_BYCOMMAND      = 0x0000,
   MF_ENABLED        = 0x0000,
   MF_GRAYED         = 0x0001,
   WM_CLOSE          = 0x0010,
   WM_KEYFIRST       = 0x0100,
   WM_KEYLAST        = 0x0108,
   WM_MOUSEFIRST     = 0x0200,
   WM_MOUSELAST      = 0x020E,
   WM_LBUTTONDOWN    = 0x0201;
   //WM_SETCURSOR   = 0x0020;
   //EM_SETSEL      = 0x00B1;
   //IDC_ARROW      = 32512;
   //IDC_WAIT       = 32514;

//==================================================================================================

[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
   public int
      x, y;
}

//==================================================================================================

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern IntPtr GetSystemMenu(IntPtr hWnd,bool bRevert);

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern uint EnableMenuItem(IntPtr hMenu,uint uIDEnableItem,uint uEnable);

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool ReleaseCapture();

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern int GetMessage
(
   out WF.Message message,
   IntPtr hWnd,
   uint wMsgFilterMin,
   uint wMsgFilterMax
);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern bool PeekMessage
(
   out WF.Message message,
   IntPtr hWnd,
   uint wMsgFilterMin,
   uint wMsgFilterMax,
   uint wRemoveMsg
);

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool TranslateMessage([In] ref WF.Message message);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern IntPtr DispatchMessage([In] ref WF.Message message);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern IntPtr GetFocus();

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool IsWindowEnabled(IntPtr hWnd);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern bool WaitMessage();

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool GetCursorPos(out POINT point);

[DllImport("User32.dll",ExactSpelling=true)]
public static extern IntPtr WindowFromPoint(POINT point);

[DllImport("User32.dll",ExactSpelling=true)]
public static extern IntPtr GetCapture();

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool SetForegroundWindow(IntPtr hWnd);

//--------------------------------------------------------------------------------------------------

//[DllImport("User32.dll",ExactSpelling=true)]
//public static extern bool EnableWindow(IntPtr hWnd,Int32 bEnable);

//[DllImport("User32.dll",CharSet=CharSet.Unicode)]
//public static extern IntPtr SendMessage(IntPtr hWnd,uint msg,IntPtr wParam,IntPtr lParam);

//[DllImport("User32.dll",CharSet=CharSet.Unicode)]
//public static extern IntPtr LoadCursor(IntPtr hInstance,UIntPtr uipCursorId);

//[DllImport("User32.dll",ExactSpelling=true)]
//public static extern IntPtr SetCursor(IntPtr hCursor);

//[DllImport("User32.dll",ExactSpelling=true)]
//public static extern bool BlockInput(Int32 fBlockIt);

//[DllImport("User32.dll",CharSet=CharSet.Unicode)]
//public static extern IntPtr SendMessage(IntPtr hWnd,uint msg,UIntPtr wParam,IntPtr lParam);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Win32
//**************************************************************************************************

} // WFX
