[SHELL32][EXPLORER][SHLWAPI][SDK] Implement SHGetSetSettings (#6982)

These settings are cached per-process (and invalidated by the global counter). This should reduce the number of registry reads performed by DefView and CFSFolder.
This commit is contained in:
Whindmar Saksit 2024-07-05 20:35:45 +02:00 committed by GitHub
parent 80c170d7bc
commit 71a3be2497
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 332 additions and 136 deletions

View file

@ -204,10 +204,9 @@ public:
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
// fix me: start menu style (classic/modern) should be read somewhere from the registry.
CheckDlgButton(IDC_TASKBARPROP_STARTMENUCLASSIC, BST_CHECKED); // HACK: This has to be read from registry!!!!!!!
BOOL modern = SHELL_GetSetting(SSF_STARTPANELON, fStartPanelOn);
CheckDlgButton(modern ? IDC_TASKBARPROP_STARTMENU : IDC_TASKBARPROP_STARTMENUCLASSIC, BST_CHECKED);
_UpdateDialog();
return TRUE;
}
@ -219,7 +218,9 @@ public:
int OnApply()
{
//TODO
SHELLSTATE ss;
ss.fStartPanelOn = !IsDlgButtonChecked(IDC_TASKBARPROP_STARTMENUCLASSIC);
SHGetSetSettings(&ss, SSF_STARTPANELON, TRUE);
return PSNRET_NOERROR;
}
};