CDHtmlDialog::GetElementInterface
İstenen arabirim işaretçisi ile tanımlanan html öğesi alır szElementId.
template <class Q>
HRESULT GetElementInterface(
LPCTSTR szElementId,
Q** ppvObj
);
HRESULT GetElementInterface(
LPCTSTR szElementId,
REFIID riid,
void** ppvObj
);
Parametreler
szElementId
html öğesi kimliği.ppvObj
Adresi öğe bulunursa, istenen arabirim işaretçisi ile doldurulmuş bir işaretçi ve sorgu başarılı olur.riid
Arabirim Kimliği'nin (IID) istenen arabirim.
Dönüş Değeri
Standart bir HRESULT değeri.
Örnek
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));
Gereksinimler
Başlık: afxdhtml.h