Implementing Span tag
COM
2
Posts
2
Posters
0
Views
1
Watching
-
HI, I need to implemnent span tag style(overline etc) in vc++ can anyone help me out... plz thanx.... Helping hands are greater than praying lips lokesh
-
HI, I need to implemnent span tag style(overline etc) in vc++ can anyone help me out... plz thanx.... Helping hands are greater than praying lips lokesh
Hi Lokesh, Not too sure what you are after but here I've done an example that may be what you are looking for:
MSHTML::IHTMLDocument2Ptr spDoc(m\_ctlWeb1.GetDocument()); if (spDoc) { MSHTML::IHTMLDocument3Ptr spDoc3 = spDoc; if (spDoc3) { MSHTML::IHTMLElementPtr spElem = spDoc3->getElementById(\_bstr\_t("idSpan1")); if (spElem) { spElem->innerText = \_bstr\_t("Hello There"); MSHTML::IHTMLStylePtr spElemStyle = spElem->style; if (spElemStyle) { spElemStyle->textDecorationOverline = true; } } } }
So in the code above we look for an element called 'idSpan1', set the text, and then set the text decoration style to be Overline. Hope this is near the mark. For further style information go to MSDN and look at the following interfaces: IHTMLStyle IHTMLStyle2 IHTMLStyle3 IHTMLStyle4 Hope this helps, Andy