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. C / C++ / MFC
  4. Using CHtmlView w/o a doc

Using CHtmlView w/o a doc

Scheduled Pinned Locked Moved C / C++ / MFC
html
3 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.
  • M Offline
    M Offline
    Matt Gates
    wrote on last edited by
    #1

    I want to add text into this view without using a CHtmlEditDoc. This is what I have tried in my class which is derived from CHtmlEditView(Note the Uppercase HTML): void CHTMLEditView::SetHTML(CString sHTML) { SetWindowText(sHTML); } Everything runs fine but the text does not show up. This function is called before I show the view. Any suggestions would be appreciated. Matt (Padawan Learner)

    S M 2 Replies Last reply
    0
    • M Matt Gates

      I want to add text into this view without using a CHtmlEditDoc. This is what I have tried in my class which is derived from CHtmlEditView(Note the Uppercase HTML): void CHTMLEditView::SetHTML(CString sHTML) { SetWindowText(sHTML); } Everything runs fine but the text does not show up. This function is called before I show the view. Any suggestions would be appreciated. Matt (Padawan Learner)

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      SetWindowText has a different purpose than adding html content in the view. Even calling SetWindowText on a CView is doubtful since there is no caption in a CView.

      1 Reply Last reply
      0
      • M Matt Gates

        I want to add text into this view without using a CHtmlEditDoc. This is what I have tried in my class which is derived from CHtmlEditView(Note the Uppercase HTML): void CHTMLEditView::SetHTML(CString sHTML) { SetWindowText(sHTML); } Everything runs fine but the text does not show up. This function is called before I show the view. Any suggestions would be appreciated. Matt (Padawan Learner)

        M Offline
        M Offline
        Matt Gates
        wrote on last edited by
        #3

        I went back to see if I could get any text into my newly created view like so: sHTML = "this is a test"; MessageBox( sHTML ); SetDocumentHTML( sHTML ); It only updates the view if I have MessageBox( sHTML ); in there, so I need to get my view to do whatever the msg box does. I saw a post where someone had the same problem, but I can't find it now. Matt (Padawan Learner)

        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