[SHELL32][BROWSEUI] CDefView: Implement SFVM_ADDPROPERTYPAGES callback (#6944)

Implementing missing folder view callbacks...
JIRA issue: CORE-19616
- Add SFVM_PROPPAGE_DATA structure to "shobjidl.idl".
- Implement CDefView::AddPropertySheetPages by calling
  SFVM_ADDPROPERTYPAGES callback.
- Modify CShellBrowser::DoFolderOptions that uses AddPropertySheetPages.
This commit is contained in:
Katayama Hirofumi MZ 2024-05-28 08:07:29 +09:00 committed by GitHub
parent 4696996ee2
commit 38b7a6816c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 7 deletions

View file

@ -1355,17 +1355,13 @@ HRESULT CShellBrowser::DoFolderOptions()
if (FAILED_UNEXPECTEDLY(hResult))
return E_FAIL;
// CORE-11140 : Disabled this bit, because it prevents the folder options from showing.
// It returns 'E_NOTIMPL'
#if 0
if (fCurrentShellView != NULL)
if (fCurrentShellView)
{
hResult = fCurrentShellView->AddPropertySheetPages(
0, AddFolderOptionsPage, reinterpret_cast<LPARAM>(&m_PropSheet));
if (FAILED_UNEXPECTEDLY(hResult))
return E_FAIL;
}
#endif
// show sheet
CStringW strFolderOptions(MAKEINTRESOURCEW(IDS_FOLDER_OPTIONS));

View file

@ -2662,9 +2662,11 @@ HRESULT WINAPI CDefView::GetCurrentInfo(LPFOLDERSETTINGS lpfs)
HRESULT WINAPI CDefView::AddPropertySheetPages(DWORD dwReserved, LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam)
{
FIXME("(%p) stub\n", this);
TRACE("(%p)->(0x%lX, %p, %p)\n", this, dwReserved, lpfn, lparam);
return E_NOTIMPL;
SFVM_PROPPAGE_DATA Data = { dwReserved, lpfn, lparam };
_DoFolderViewCB(SFVM_ADDPROPERTYPAGES, 0, (LPARAM)&Data);
return S_OK;
}
HRESULT WINAPI CDefView::SaveViewState()

View file

@ -110,6 +110,13 @@ typedef enum
typedef int GPFIDL_FLAGS;
typedef struct _SFVM_PROPPAGE_DATA
{
DWORD dwReserved;
LPFNADDPROPSHEETPAGE pfn;
LPARAM lParam;
} SFVM_PROPPAGE_DATA, *LPSFVM_PROPPAGE_DATA;
UINT
WINAPI
SHAddFromPropSheetExtArray(