Advertisement
Guest User

Untitled

a guest
Nov 18th, 2013
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. extern "C" __declspec(dllexport) bool SetTouchDisableProperty(HWND hWnd)
  2. {
  3. PROPVARIANT var;
  4. var.vt = VT_BOOL;
  5. var.boolVal = VARIANT_TRUE;
  6. // Get window properties
  7. IPropertyStore* pPropStore;
  8. IID_PPV_ARGS(&pPropStore);
  9. HRESULT hrReturnValue = SHGetPropertyStoreForWindow(hWnd, IID_PPV_ARGS(&pPropStore));
  10. // set PKEY_EdgeGesture_DisableTouchWhenFullscreen property
  11. if (SUCCEEDED(hrReturnValue))
  12. {
  13. hrReturnValue = pPropStore->SetValue(PKEY_EdgeGesture_DisableTouchWhenFullscreen, var);
  14. pPropStore->Release();
  15. }
  16. return TRUE;
  17. }
  18.  
  19. [DllImport("libDisableTouchDll.dll", EntryPoint = "SetTouchDisableProperty"
  20. , ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
  21. static extern bool SetTouchDisableProperty(IntPtr hWnd);
  22.  
  23. static void Main(string[] args)
  24. {
  25. // dirty get inPtr process for firefox
  26. IntPtr intPtr = System.Diagnostics.Process.GetProcessesByName("firefox")[0].MainWindowHandle;
  27. SetTouchDisableProperty(intPtr);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement