The "hide_gui" key in the regedit , i want to know how does it works?
-
These days ,i read the source code of cocos2d-x . When i read the CCApplication class of win32 platform , in the function run of CCApplication ,there is a function :
static void PVRFrameEnableControlWindow(bool bEnable)
{
HKEY hKey = 0;// Open PVRFrame control key, if not exist create it. if(ERROR\_SUCCESS != RegCreateKeyExW(HKEY\_CURRENT\_USER, L"Software\\\\Imagination Technologies\\\\PVRVFRame\\\\STARTUP\\\\", 0, 0, REG\_OPTION\_NON\_VOLATILE, KEY\_ALL\_ACCESS, 0, &hKey, NULL)) { return; } const WCHAR\* wszValue = L"hide\_gui"; const WCHAR\* wszNewData = (bEnable) ? L"NO" : L"YES"; WCHAR wszOldData\[256\] = {0}; DWORD dwSize = sizeof(wszOldData); LSTATUS status = RegQueryValueExW(hKey, wszValue, 0, NULL, (LPBYTE)wszOldData, &dwSize); if (ERROR\_FILE\_NOT\_FOUND == status // the key not exist || (ERROR\_SUCCESS == status // or the hide\_gui value is exist && 0 != wcscmp(wszNewData, wszOldData))) // but new data and old data not equal { dwSize = sizeof(WCHAR) \* (wcslen(wszNewData) + 1); RegSetValueEx(hKey, wszValue, 0, REG\_SZ, (const BYTE \*)wszNewData, dwSize); } RegCloseKey(hKey);
}
i do not understand the key value "hide_gui" .What can it do to effect my app ? I am a new learner in C++ and i am not a english speaker , so if you do not understand my meaning ,i am very sorry for that .
-
These days ,i read the source code of cocos2d-x . When i read the CCApplication class of win32 platform , in the function run of CCApplication ,there is a function :
static void PVRFrameEnableControlWindow(bool bEnable)
{
HKEY hKey = 0;// Open PVRFrame control key, if not exist create it. if(ERROR\_SUCCESS != RegCreateKeyExW(HKEY\_CURRENT\_USER, L"Software\\\\Imagination Technologies\\\\PVRVFRame\\\\STARTUP\\\\", 0, 0, REG\_OPTION\_NON\_VOLATILE, KEY\_ALL\_ACCESS, 0, &hKey, NULL)) { return; } const WCHAR\* wszValue = L"hide\_gui"; const WCHAR\* wszNewData = (bEnable) ? L"NO" : L"YES"; WCHAR wszOldData\[256\] = {0}; DWORD dwSize = sizeof(wszOldData); LSTATUS status = RegQueryValueExW(hKey, wszValue, 0, NULL, (LPBYTE)wszOldData, &dwSize); if (ERROR\_FILE\_NOT\_FOUND == status // the key not exist || (ERROR\_SUCCESS == status // or the hide\_gui value is exist && 0 != wcscmp(wszNewData, wszOldData))) // but new data and old data not equal { dwSize = sizeof(WCHAR) \* (wcslen(wszNewData) + 1); RegSetValueEx(hKey, wszValue, 0, REG\_SZ, (const BYTE \*)wszNewData, dwSize); } RegCloseKey(hKey);
}
i do not understand the key value "hide_gui" .What can it do to effect my app ? I am a new learner in C++ and i am not a english speaker , so if you do not understand my meaning ,i am very sorry for that .