Win32/Win32AppCommand.cs
changeset 79 cdc5f8f1b79e
parent 77 fb9ea5ad8c2d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Win32/Win32AppCommand.cs	Sun Mar 15 20:25:58 2015 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +//
     1.5 +// Copyright (C) 2014-2015 Stéphane Lenclud.
     1.6 +//
     1.7 +// This file is part of SharpLibHid.
     1.8 +//
     1.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
    1.10 +// it under the terms of the GNU General Public License as published by
    1.11 +// the Free Software Foundation, either version 3 of the License, or
    1.12 +// (at your option) any later version.
    1.13 +//
    1.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
    1.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.17 +// GNU General Public License for more details.
    1.18 +//
    1.19 +// You should have received a copy of the GNU General Public License
    1.20 +// along with SharpDisplayManager.  If not, see <http://www.gnu.org/licenses/>.
    1.21 +//
    1.22 +
    1.23 +using System;
    1.24 +using System.Runtime.InteropServices;
    1.25 +
    1.26 +namespace SharpLib.Win32
    1.27 +{
    1.28 +    static public partial class Const
    1.29 +    {
    1.30 +        public const int WM_APPCOMMAND = 0x0319;
    1.31 +    }
    1.32 +
    1.33 +    static public partial class Macro
    1.34 +    {
    1.35 +        public static int GET_APPCOMMAND_LPARAM(IntPtr lParam)
    1.36 +        {
    1.37 +            return ((short)HIWORD(lParam.ToInt32()) & ~Const.FAPPCOMMAND_MASK);
    1.38 +        }
    1.39 +    }
    1.40 +}
    1.41 \ No newline at end of file