void CPPageInternalFilters::ShowPPage(CPPageInternalFiltersListBox& l) { int i = l.GetCurSel(); if (i < 0) { return; } filter_t* f = (filter_t*)l.GetItemDataPtr(i); if (!f || !f->CreateInstance) { return; } HRESULT hr; CUnknown* pObj = f->CreateInstance(NULL, &hr); if (!pObj) { return; } CComPtr<IUnknown> pUnk = (IUnknown*)(INonDelegatingUnknown*)pObj; if (SUCCEEDED(hr)) { if (CComQIPtr<ISpecifyPropertyPages> pSPP = pUnk) { CComPropertySheet ps(ResStr(IDS_PROPSHEET_PROPERTIES), this); ps.AddPages(pSPP); ps.DoModal(); } } }
void CPPageInternalFilters::ShowPPage(CPPageInternalFiltersListBox& l) { int i = l.GetCurSel(); if (i < 0) { return; } filter_t* f = (filter_t*)l.GetItemDataPtr(i); if (f && f->ShowPropertyPages) { f->ShowPropertyPages(this); } }