HELEMENT GetElemById(const char* id) const { HELEMENT h_root = 0; HTMLayoutGetRootElement(m_hwnd, &h_root); char selector[256] = ""; sprintf_s(selector, 256, "#%s", id); HELEMENT h_found = 0; HTMLayoutSelectElements(h_root, selector, &FindElementCallback, &h_found); return h_found; }
STDMETHODIMP CEngine::get_Root(IElement **pVal) { HELEMENT he = 0; HTMLayoutGetRootElement(m_hWnd,&he); return CElement::create(he,pVal); }