diff -r 72885c950813 -r cdc5f8f1b79e Win32/Win32AppCommand.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Win32/Win32AppCommand.cs Sun Mar 15 20:25:58 2015 +0100 @@ -0,0 +1,37 @@ +// +// Copyright (C) 2014-2015 Stéphane Lenclud. +// +// This file is part of SharpLibHid. +// +// SharpDisplayManager is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// SharpDisplayManager is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SharpDisplayManager. If not, see . +// + +using System; +using System.Runtime.InteropServices; + +namespace SharpLib.Win32 +{ + static public partial class Const + { + public const int WM_APPCOMMAND = 0x0319; + } + + static public partial class Macro + { + public static int GET_APPCOMMAND_LPARAM(IntPtr lParam) + { + return ((short)HIWORD(lParam.ToInt32()) & ~Const.FAPPCOMMAND_MASK); + } + } +} \ No newline at end of file