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. [SOLVED]CWebBrowser2 not getting displayed on a dialog in a dll. [modified]

[SOLVED]CWebBrowser2 not getting displayed on a dialog in a dll. [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 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.
  • C Offline
    C Offline
    chandu004
    wrote on last edited by
    #1

    Hi, iam trying to display a browser control of type CWebBrowser2 in a dialog, which will be initiated from a dll. now, the problem is, the dialog is getting displayed properly, when i dont insert the webbrowser control. but when i draw the webbrowser control on the dialog, it is not showing up. i even tried to create it dynamically, but Create method is returning by closing the application. any ideas? thanks in advance.

    modified on Friday, June 17, 2011 5:19 PM

    C 1 Reply Last reply
    0
    • C chandu004

      Hi, iam trying to display a browser control of type CWebBrowser2 in a dialog, which will be initiated from a dll. now, the problem is, the dialog is getting displayed properly, when i dont insert the webbrowser control. but when i draw the webbrowser control on the dialog, it is not showing up. i even tried to create it dynamically, but Create method is returning by closing the application. any ideas? thanks in advance.

      modified on Friday, June 17, 2011 5:19 PM

      C Offline
      C Offline
      chandu004
      wrote on last edited by
      #2

      further investigations on this issue, concluded that, the window itself was not getting properly created for the web browser control. any ideas?

      -------------------------------------------- Suggestion to the members: Please prefix your main thread subject with [SOLVED] if it is solved. thanks. chandu.

      P C 2 Replies Last reply
      0
      • C chandu004

        further investigations on this issue, concluded that, the window itself was not getting properly created for the web browser control. any ideas?

        -------------------------------------------- Suggestion to the members: Please prefix your main thread subject with [SOLVED] if it is solved. thanks. chandu.

        P Offline
        P Offline
        pix_programmer
        wrote on last edited by
        #3

        chandu004 wrote:

        the window itself was not getting properly created for the web browser control.

        Derive your Dialog from CDialog instead of CHtmlDialog, while adding the Dialog through MFC Wizard and add a web browser control to it. Use the Navigate() method to browse to a URL.

        1 Reply Last reply
        0
        • C chandu004

          further investigations on this issue, concluded that, the window itself was not getting properly created for the web browser control. any ideas?

          -------------------------------------------- Suggestion to the members: Please prefix your main thread subject with [SOLVED] if it is solved. thanks. chandu.

          C Offline
          C Offline
          chandu004
          wrote on last edited by
          #4

          after some browse through the net, i could solve this problem by adding AfxOleInit() in the calling application's InitInstance.

          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