[SHELL32] Refresh UI on assoc change (SHOpenWithDialog) (#7076)

Fix file association UX.
JIRA issue: CORE-19670
- Check the return value of
  shell32!SHOpenWithDialog function.
- If changed, then update the UI display
  and internal data.
- Use OAIF_FORCE_REGISTRATION flag.
This commit is contained in:
Katayama Hirofumi MZ 2024-07-03 23:01:50 +09:00 committed by GitHub
parent edf6b805a7
commit b41332349a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 5 deletions

View file

@ -1049,8 +1049,12 @@ VOID COpenWithDialog::Accept()
if (pApp)
{
/* Set programm as default handler */
if (SendDlgItemMessage(m_hDialog, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED)
if (IsDlgButtonChecked(m_hDialog, 14003) == BST_CHECKED)
{
m_pAppList->SetDefaultHandler(pApp, m_pInfo->pcszFile);
// FIXME: Update DefaultIcon registry
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSHNOWAIT, NULL, NULL);
}
/* Execute program */
if (m_pInfo->oaifInFlags & OAIF_EXEC)