Step 5. Store a Pointer to the Filter

Step 5. Store a Pointer to the Filter

Override the CBasePropertyPage::OnConnect method to store a pointer to the filter. The following example queries the pUnk parameter for the filter's custom ISaturation interface:



HRESULT CGrayProp::OnConnect(IUnknown *pUnk)
{
    if (pUnk == NULL)
    {
        return E_POINTER;
    }
    ASSERT(m_pGray == NULL);
    return pUnk->QueryInterface(IID_ISaturation, 
        reinterpret_cast<void**>(&m_pGray));
}


Next: Step 6. Initialize the Dialog.

Related topics

Creating a Filter Property Page

 

 

Show:
© 2016 Microsoft