Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Implementing Span tag

Implementing Span tag

Scheduled Pinned Locked Moved COM
c++help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 527726
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • U User 527726

      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

      A Offline
      A Offline
      Andrew Quinn AUS
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups