取消Wince App 应用启动动画和隐藏分区注册表项

在WinCE系统中,应用启动时窗体有一个动画效果(从中间往窗体边缘扩散开)。

有些人不想要此效果,可以通过修改注册表来完成。

[HKEY_LOCAL_MACHINE/system/gwe] 
"PORepaint"=dword:1
去掉APP窗口的动画显示效果 
"Animate"=dword:0

隐藏分区:

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDrv/ROFATFS]
MountHidden	1: 隐藏/0: 不隐藏

注: 修改注册表后,需要重启系统或在CE控制面板的存贮管理中Unmount/Mount分区

 

 1 /* 
 2  * HKEY hKey: 
 3  *  HKEY_CLASSES_ROOT 
 4  *  HKEY_CURRENT_USER 
 5  *  HKEY_LOCAL_MACHINE 
 6  *  HKEY_USERS 
 7  * LPCWSTR lpSubKey: 
 8  *  L"System/StorageManager/Profiles/FlashDrv/ROFATFS" 
 9  * LPCTSTR lpValueName 
10  *  L"MountHidden" 
11 */  
12 BOOL CLeoZhengDlg::RegSetDword(HKEY hRoot,LPCWSTR lpSubKey,LPCTSTR lpValueName,DWORD dwValue)  
13 {  
14     HKEY hKey;  
15     DWORD dwRegType = REG_DWORD;  
16     DWORD dwGetValue = 0;  
17     DWORD dwSize = 4;  
18     LONG nRet = ERROR_SUCCESS;  
19     nRet = RegOpenKeyEx(hRoot,lpSubKey,0,0,&hKey);  
20     if(ERROR_SUCCESS == nRet)  
21     {  
22         nRet = RegQueryValueEx(hKey,lpValueName,NULL,&dwRegType,(BYTE *)&dwGetValue,&dwSize);  
23         if(ERROR_SUCCESS == nRet)  
24         {  
25             if(1 == dwGetValue)  
26             {  
27                 nRet = RegSetValueEx(hKey,lpValueName,0,REG_DWORD,(BYTE *)&dwValue,sizeof(DWORD));  
28                 if(ERROR_SUCCESS == nRet)  
29                 {  
30                 }  
31             }  
32         }  
33         RegFlushKey(hKey);  
34         RegCloseKey(hKey);  
35     }  
36     return TRUE;  
37 }  

 

posted @ 2016-02-25 09:06  91program  阅读(443)  评论(0编辑  收藏  举报