在全屏运行时,禁用Windows 8的边缘手势/热角的多点触控应用 [英] Disable Windows 8 edge gestures/hot corners for multi-touch applications while running in full screen

查看:642
本文介绍了在全屏运行时,禁用Windows 8的边缘手势/热角的多点触控应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个全屏幕AS3游戏莫比与运行在Windows 7中的Adobe AIR。 在这个游戏中,可能不容易退出(想想Kiosk模式,只能由pressing退出<大骨节病> ESC 并输入密码)。

I have a full screen AS3 game maby with Adobe AIR that runs in Windows 7. In this game it may not be easy to exit (think about kiosk mode, only exit by pressing esc and enter a password).

现在我想这个游戏在Windows 8中运行该游戏工作像预期,但该是烦人的事情是这些边缘手势/热角(左,上,右,下)和快捷方式。

Now I want this game to run in Windows 8. The game is working like expected but the anoying things are these edge gestures/hot corners (left, top, right, bottom) and the shortcuts.

我读过的文章,但没有帮助我。人们谈论系统登录编辑,但我没有得到这个工作+用户需要重新启动他/她的电脑。

I've read articles but none helped me. People talk about registery edits, but I dont get this working + the user needs to restart his/hers computer.

我想开我的游戏,关闭手势/热的角落,游戏关闭手势时/热角要回来再次可用。

I want to open my game, turn off gestures/hot corners and when the game closes the gestures/hot corners need to come back available again.

我已经看到了一些应用程序做同样的东西我想完成的任务。

I have seen some applications doing the same what I want to accomplish.

我发现这个,以便我能够检测到的手势。但如何忽视他们的行为?

I found this so I am able to detect the gestures. But how to ignore they're actions?

我也读<一href="http://support.asus.com/Troubleshooting/detail.aspx?SLanguage=en&p=3&m=A53E&s=299&hashedid=pNhYyNnFj0hhaQb2&os=&no=1776">ASUS智能手势的,但这是为触摸垫。

I also read ASUS Smart Gestures but this is for the touch-pad.

和我都试过经典壳牌但我需要禁用边比划/热角没有这样的计划,刚上任何─飞了。

And I have tried Classic Shell but I need to disable the edge gestures/hot corners without such programs, just on-the-fly.

我还发现但我不知道如何实现这一点。

I also found this but I don't know how to implement this.

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;
}

有谁知道我能做到这一点?或点我到正确的方向?

Does anyone know how I can do this? Or point me into the right direction?

我已经尝试了一些在C#和C ++,但我不是一个熟练的C#/ C ++开发。此外本场比赛是在AS3所以这将是很难在C#/ C ++实现这个

I have tried some in C# and C++, but I aint a skilled C#/C++ developer. Also the game is made in AS3 so it will be hard to implement this in C#/C++.

我在联想AIO(All in one的)工作与Windows 8。

I work on the Lenovo aio (All in one) with Windows 8.

推荐答案

我试图做同样的事情。在C ++以下禁用的每次的运行的应用程序/窗口的Win8手势。正如JonoRR提到,下一步将只在您想针对HWND来调用它。如果目标应用程序被关闭,然后重新打开,手势将返回。

I'm trying to do the same thing. The C++ below disables Win8 Gestures on every running application/window. As JonoRR mentioned, the next step would be calling it only on the HWND you would like to target. If the targeted application is closed, then re-opened, the gestures will return.

#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]));
    SetTouchDisableProperty(hWnd,true);

    _tprintf(_T("Value is %s\n"), title);

    return TRUE;
}

int _tmain(int argc, _TCHAR* argv[])
{   
    EnumWindows(MyEnumProc, 0);
    return 0;
}

这篇关于在全屏运行时,禁用Windows 8的边缘手势/热角的多点触控应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆