htlmview crashed in child dialog
-
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);
-
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);
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.
-
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.
Thanks a lot Superman.It is clean and easy solution.