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. htlmview crashed in child dialog

htlmview crashed in child dialog

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 2 Posters 1 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.
  • B Offline
    B Offline
    Bilge Kaan
    wrote on last edited by
    #1

    Hello, I am trying to embed htmlview into dialog.I used this code below.Application is crashed when window type is child.Not crashing for overlapped or popup. How can ı solve this issue? RECT rc; GetClientRect(&rc); CFrameWnd * pfrm = (CFrameWnd*) RUNTIME_CLASS(CFrameWnd)->CreateObject(); pfrm->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rc, this); CCreateContext pContext; pContext.m_pNewViewClass = RUNTIME_CLASS(CHtmlView); CHtmlView *pView = (CHtmlView *) pfrm->CreateView(&pContext); if(!pView) { return FALSE; } pView->Navigate(htmlFilePath);

    _ 1 Reply Last reply
    0
    • B Bilge Kaan

      Hello, I am trying to embed htmlview into dialog.I used this code below.Application is crashed when window type is child.Not crashing for overlapped or popup. How can ı solve this issue? RECT rc; GetClientRect(&rc); CFrameWnd * pfrm = (CFrameWnd*) RUNTIME_CLASS(CFrameWnd)->CreateObject(); pfrm->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rc, this); CCreateContext pContext; pContext.m_pNewViewClass = RUNTIME_CLASS(CHtmlView); CHtmlView *pView = (CHtmlView *) pfrm->CreateView(&pContext); if(!pView) { return FALSE; } pView->Navigate(htmlFilePath);

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You should be using the Web Browser ActiveX control instead of CHtmlView. Its really very simple. Place the ActiveX control in the dialog, associate a variable with it and simply call its methods.

      «_Superman_» I love work. It gives me something to do between weekends.

      B 1 Reply Last reply
      0
      • _ _Superman_

        You should be using the Web Browser ActiveX control instead of CHtmlView. Its really very simple. Place the ActiveX control in the dialog, associate a variable with it and simply call its methods.

        «_Superman_» I love work. It gives me something to do between weekends.

        B Offline
        B Offline
        Bilge Kaan
        wrote on last edited by
        #3

        Thanks a lot Superman.It is clean and easy solution.

        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