MFC- Programmatically Disable Charms Bar

2019-07-30 15:27发布

I need to programmatically disable Windows 8 charms bar. On MSDN i can find sample code to do that. However while using that code snippet with Windows 8 SDK installed on my machine i am getting Linker error. The code snippet can be found at System.EdgeGesture.DisableTouchWhenFullscreen

I am able to retrieve the PropertyStore pointer but when i try to set the value "PKEY_EdgeGesture_DisableTouchWhenFullscreen" i am get linker error for this property.

2条回答
女痞
2楼-- · 2019-07-30 15:44

All you need is to create(if not existed) EdgeUI key under:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell

and add new DWORD keys: DisableTLcorner & DisableCharmsHint

For disable:

DisableTLcorner = 1 
DisableCharmsHint = 1

For Enable change to zero or delete them:

DisableTLcorner = 0 
DisableCharmsHint = 0

All this can be easily done in MFC!!!!

查看更多
劫难
3楼-- · 2019-07-30 16:04

The symbol is exported the following lib files.

C:\Program Files (x86)\Windows Kits\8.0\Lib>findstr /m /S /c:"PKEY_EdgeGesture
isableTouchWhenFullscreen" *.*

win8\um\arm\Uuid.Lib
win8\um\x64\ehstorguids.lib
win8\um\x64\Uuid.Lib
win8\um\x86\ehstorguids.lib
win8\um\x86\Uuid.Lib

Did you modify your libpath?

查看更多
登录 后发表回答