CDHtmlDialog::GetElementInterface
Načte z prvku HTML označeny ukazatele požadované rozhraní szElementId .
template <class Q>
HRESULT GetElementInterface(
LPCTSTR szElementId,
Q** ppvObj
);
HRESULT GetElementInterface(
LPCTSTR szElementId,
REFIID riid,
void** ppvObj
);
Parametry
szElementId
ID prvku HTML.ppvObj
Adresa ukazatel, který bude vyplněn ukazatele požadované rozhraní Pokud je nalezen prvek a dotaz úspěšný.riid
Rozhraní ID (IID) požadované rozhraní.
Vrácená hodnota
Standard HRESULT hodnotu.
Příklad
CComPtr<IHTMLInputButtonElement> spBtn1;
CComPtr<IHTMLInputButtonElement> spBtn2;
HRESULT hr = S_OK;
// Use the template overload
hr = GetElementInterface(L"Button1", &spBtn1);
// Use the nontemplate overload
hr = GetElementInterface(L"Button1", IID_IHTMLInputButtonElement,
reinterpret_cast<void**>(&spBtn2));
Požadavky
Záhlaví: afxdhtml.h