Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. The "hide_gui" key in the regedit , i want to know how does it works?

The "hide_gui" key in the regedit , i want to know how does it works?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ITboy_Lemon
    wrote on last edited by
    #1

    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 .

    L 1 Reply Last reply
    0
    • I ITboy_Lemon

      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 .

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You need to contact Imagination Technologies about this, it's their software. However, the code above sets its value to "NO" or "YES", according to whether bEnable is true or not.

      Use the best guess

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups