To do this programmatically, you can call the function in the link below. It requires hWnd for the window you want to target.
http://msdn.microsoft.com/en-us/library/windows/desktop/jj553591%28v=vs.85%29.aspx
Next in C ++ there will be a search for a window with the window title "helloworld" and disable all Windows 8 gestures for it. This does not work for Windows Store applications, and the function should be called in the window while it is open. If the application is closed and reopens, the gestures will return. In addition, I believe that it only works during a full-screen application.
#include "stdafx.h" #include <windows.h> #include <iostream> #include <propsys.h> #include <propkey.h> using namespace std; HWND windowHandle; HRESULT SetTouchDisableProperty(HWND hwnd, BOOL fDisableTouch) { IPropertyStore* pPropStore; HRESULT hrReturnValue = SHGetPropertyStoreForWindow(hwnd, IID_PPV_ARGS(&pPropStore)); if (SUCCEEDED(hrReturnValue)) { PROPVARIANT var; var.vt = VT_BOOL; var.boolVal = fDisableTouch ? VARIANT_TRUE : VARIANT_FALSE; hrReturnValue = pPropStore->SetValue(PKEY_EdgeGesture_DisableTouchWhenFullscreen, var); pPropStore->Release(); } return hrReturnValue; } BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam) { TCHAR title[500]; ZeroMemory(title, sizeof(title)); GetWindowText(hWnd, title, sizeof(title)/sizeof(title[0])); if (!_tcscmp(title, _T("helloworld"))) { SetTouchDisableProperty(hWnd,true); } return TRUE; } int _tmain(int argc, _TCHAR* argv[]) { EnumWindows(MyEnumProc, 0); return 0; }
source share