Created
December 23, 2016 10:14
-
-
Save harujoh/afcc60cae265dad30488cd0f093affd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DllImport("user32")] | |
[return: MarshalAs(UnmanagedType.Bool)] | |
private static extern bool SetGestureConfig(IntPtr hWnd, int dwReserved, int cIDs, ref Gestureconfig pGestureConfig, int cbSize); | |
[StructLayout(LayoutKind.Sequential)] | |
private struct Gestureconfig | |
{ | |
public int dwID; | |
public int dwWant; | |
public int dwBlock; | |
} | |
private const int GC_ALLGESTURES = 0x00000001; | |
readonly Gestureconfig _gc = new Gestureconfig | |
{ | |
dwID = 0, | |
dwWant = 0, //必要であればこちらにGC_ALLGESTURES | |
dwBlock = GC_ALLGESTURES //必要であればこちらに0 | |
}; | |
public Form1() | |
{ | |
InitializeComponent(); | |
SetGestureConfig( | |
this.Handle, | |
0, | |
1, | |
ref this._gc, | |
Marshal.SizeOf(new Gestureconfig()) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment