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. Application fails trying to display a dialog containing an ActiveX control [modified]

Application fails trying to display a dialog containing an ActiveX control [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++helpvisual-studiocom
1 Posts 1 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.
  • T Offline
    T Offline
    tufkap
    wrote on last edited by
    #1

    Hi all, I am working on a dialog-based MFC application, which consists of multiple property pages. From one of the property pages, I am trying to launch a dialog box which contains an ActiveX control. This is currently not working and the application exits with an access violation error when I call DoModal for the dialog. On debugging, I see this is due to AfxGetThread() returning NULL in AfxOleInit(). This does not happen if I launch the dialog-box from the application's InitInstance() function instead of a property page or if I add the control to the property page itself. I have made sure that the control is registered and that I call AfxEnableControlContainer() from the application's InitInstance() function. I am using Visual Studio C++ .NET. Is there something else that I have missed? Any help is greatly appreciated. Thanks, Priya -- modified at 6:46 Thursday 16th August, 2007

    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