<div>
How to Change inner content of HTML?
Method 1
Called by the framework to exchange and validate dialog data.
CString szElem;
void CMyMultiPageDlg::DoDataExchange(CDataExchange* pDX){
DDX_DHtml_ElementInnerHtml(pDX, _T("div_element"), szElem);
CMultiPageDHtmlDialog::DoDataExchange(pDX)
}
Method 2
IHTMLElement interface
This interface provides the ability to programmatically access the properties and methods that are common to all element objects.
CString szTmp;
CComBSTR bStr;
CComBSTR bStr2;
CComPtr<IHTMLElement> pElem;
if(!FAILED(GetElementInterface(_T("div_element"), __uuidof(IHTMLElement), (void**)&pElem)) {
pElem->get_innerHTML(&bStr);
bStr2 = szTmp.AllocSysString();
pElem->put_innerHTML(bStr2);
}
How to disable the Element?
IHTMLElement3 interface
Provides access to the properties and methods that are common to all element objects.
CComPtr<IHTMLElement3> pElem
VARIANT_BOOL disable = VARIANT_TRUE;
if(!FAILED(GetElementInterface(_T("element_id"), __uuidof(IHTMLElement3), (void **)&pElem)) {
element->put_disabled(disable);
}
Reference : MSDN