CDHtmlDialog::GetElementInterface
Pobiera wskaźnik żądany interfejs z elementu HTML identyfikowane przez szElementId.
template <class Q>
HRESULT GetElementInterface(
LPCTSTR szElementId,
Q** ppvObj
);
HRESULT GetElementInterface(
LPCTSTR szElementId,
REFIID riid,
void** ppvObj
);
Parametry
szElementId
Identyfikator elementu HTML.ppvObj
Adres wskaźnik wypełnione przy użyciu wskaźnika żądany interfejs Jeśli element zostanie znaleziony i kwerendy powiedzie się.riid
Identyfikator (IID) żądany interfejs interfejsu.
Wartość zwracana
Standard HRESULT wartości.
Przykład
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));
Wymagania
Nagłówek: afxdhtml.h