69 REFIID riid,
void __RPC_FAR *__RPC_FAR *ppvObject)
73 IUnknown* pUnk =
nullptr;
74 if (IID_IUnknown == riid || IID_IShellExtInit == riid)
76 pUnk =
static_cast<IShellExtInit*
>(
this);
81 else if (IID_IShellPropSheetExt == riid)
83 pUnk =
static_cast<IShellPropSheetExt*
>(
this);
96 return InterlockedIncrement(&
m_RefCnt);
116 LPCITEMIDLIST , IDataObject * lpdobj, HKEY )
118 InitCommonControls();
121 FORMATETC fe = {CF_HDROP,
nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
123 HRESULT
hr = lpdobj->GetData(&fe, &
medium);
127 (1 == DragQueryFileW(
128 static_cast<HDROP
>(
medium.hGlobal),
133 UINT
size = DragQueryFileW(
static_cast<HDROP
>(
medium.hGlobal), 0,
nullptr, 0 );
136 auto buffer = std::make_unique<WCHAR[]>(
size + 1 );
137 UINT result_size = DragQueryFileW(
static_cast<HDROP
>(
medium.hGlobal),
138 0, buffer.get(),
size + 1 );
139 if ( result_size != 0 )
155 ReleaseStgMedium(&
medium);
166 std::wstring proppage_header;
169 ZeroMemory(&
psp,
sizeof(
psp));
173 psp.dwFlags = PSP_DEFAULT | PSP_USETITLE | PSP_USECALLBACK;
175 psp.lParam =
reinterpret_cast<LPARAM
>(
this);
178 HPROPSHEETPAGE hPage =
nullptr;
184 psp.pszTitle = proppage_header.c_str();
187 hPage = CreatePropertySheetPageW(&
psp);
191 if (lpfnAddPage(hPage, lParam))
194 DestroyPropertySheetPage(hPage);
203 EXPPS , LPFNSVADDPROPSHEETPAGE , LPARAM )
210 HWND , UINT uMsg, LPPROPSHEETPAGE ppsp)
216 if (PSPCB_RELEASE == uMsg)
231 LPPROPSHEETPAGE
psp =
reinterpret_cast<LPPROPSHEETPAGE
>(lParam);
248 LPPROPSHEETPAGE
psp =
reinterpret_cast<LPPROPSHEETPAGE
>(lParam);
272 std::wstring::size_type itor = tempStr.find ( L
"\n" , 0 );
273 while (itor != std::wstring::npos)
275 tempStr.insert(itor, L
"\r");
276 itor = tempStr.find(L
"\n", itor + 2);
278 SetWindowTextW(GetDlgItem(hwnd,
IDC_COMMENTS), tempStr.c_str());
280 catch (
const std::exception&)
295 doc_stat_reader->read(&sgl);
302 lv_builder->build(sgl);
304 catch (
const std::exception&)
virtual ~CPropertySheet()
void InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE lppsp)
void InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE lppsp)
Filepath_char_t m_szFileName[MAX_PATH]
virtual HRESULT STDMETHODCALLTYPE ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam) override
virtual ULONG STDMETHODCALLTYPE AddRef() override
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *lpdobj, HKEY hkeyProgID) override
static bool CALLBACK PropPageSummaryProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
static BOOL CALLBACK PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNSVADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam) override
CPropertySheet(LONG RefCnt=1)
static UINT CALLBACK PropPageSummaryCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
virtual ULONG STDMETHODCALLTYPE Release() override
#define META_INFO_SUBJECT
#define META_INFO_KEYWORDS
#define META_INFO_DESCRIPTION
document_statistic_reader_ptr create_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
std::unique_ptr< document_statistic_reader > document_statistic_reader_ptr
std::vector< statistic_group_t > statistic_group_list_t
list_view_builder_ptr create_list_view_builder(HWND hwnd_lv, const std::wstring &col1, const std::wstring &col2)
std::unique_ptr< list_view_builder > list_view_builder_ptr
#define SAL_N_ELEMENTS(arr)
const wchar_t *typedef BOOL
#define IDD_PROPPAGE_STATISTICS
#define IDS_PROPERTY_VALUE
#define IDS_PROPPAGE_STATISTICS_TITLE
#define IDC_STATISTICSLIST
std::wstring GetResString(int ResId)
Retrieve a string from the resources of this module.
HMODULE GetCurrentModuleHandle()
std::wstring getShortPathName(const std::wstring &aLongName)
helper function to convert windows paths to short form.
void OutputDebugStringFormatW(LPCWSTR pFormat,...)