mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 04:23:57 +00:00
[BOOT][SHELL32][INCLUDE] Support 'SuperHidden' files (#2102)
PR #2101 shows desktop.ini files on Desktop. I want to hide them. - Add "ShowSuperHidden" setting to Explorer. - Add SHCONTF_INCLUDESUPERHIDDEN flag. - Support SHCONTF_INCLUDESUPERHIDDEN in Explorer. CORE-10045
This commit is contained in:
parent
2c272a9017
commit
5734570a15
4 changed files with 34 additions and 19 deletions
|
@ -908,29 +908,32 @@ HRESULT CDefView::FillList()
|
|||
DWORD dwFetched;
|
||||
HRESULT hRes;
|
||||
HDPA hdpa;
|
||||
HKEY hKey;
|
||||
DWORD dFlags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS;
|
||||
DWORD dwValue, cbValue;
|
||||
|
||||
TRACE("%p\n", this);
|
||||
|
||||
/* determine if there is a setting to show all the hidden files/folders */
|
||||
if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
|
||||
dwValue = 1;
|
||||
cbValue = sizeof(dwValue);
|
||||
SHGetValueW(HKEY_CURRENT_USER,
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
L"Hidden", NULL, &dwValue, &cbValue);
|
||||
if (dwValue == 1)
|
||||
{
|
||||
DWORD dataLength, flagVal;
|
||||
dFlags |= SHCONTF_INCLUDEHIDDEN;
|
||||
m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
|
||||
}
|
||||
|
||||
dataLength = sizeof(flagVal);
|
||||
if (RegQueryValueExW(hKey, L"Hidden", NULL, NULL, (LPBYTE)&flagVal, &dataLength) == ERROR_SUCCESS)
|
||||
{
|
||||
/* if the value is 1, then show all hidden files/folders */
|
||||
if (flagVal == 1)
|
||||
{
|
||||
dFlags |= SHCONTF_INCLUDEHIDDEN;
|
||||
m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* close the key */
|
||||
RegCloseKey(hKey);
|
||||
dwValue = 0;
|
||||
cbValue = sizeof(dwValue);
|
||||
SHGetValueW(HKEY_CURRENT_USER,
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
L"ShowSuperHidden", NULL, &dwValue, &cbValue);
|
||||
if (dwValue)
|
||||
{
|
||||
dFlags |= SHCONTF_INCLUDESUPERHIDDEN;
|
||||
m_ListView.SendMessageW(LVM_SETCALLBACKMASK, LVIS_CUT, 0);
|
||||
}
|
||||
|
||||
/* get the itemlist from the shfolder */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue