MFC- Programmatically Disable Charms Bar

佐手、 提交于 2019-12-11 13:47:15

问题


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.


回答1:


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?




回答2:


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!!!!



来源:https://stackoverflow.com/questions/14722154/mfc-programmatically-disable-charms-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!