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. C / C++ / MFC
  3. Dialogs with ActiveX controls in MFC regular dlls

Dialogs with ActiveX controls in MFC regular dlls

Scheduled Pinned Locked Moved C / C++ / MFC
3 Posts 3 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL. What do I do to solve this problem. Thanks, Anyhelp would be highly appreciated.

    D 1 Reply Last reply
    0
    • A Anonymous

      I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL. What do I do to solve this problem. Thanks, Anyhelp would be highly appreciated.

      D Offline
      D Offline
      DomDo
      wrote on last edited by
      #2

      Did you call AfxOleInit() and AfxEnableControlContainer() ? ================== The original message was: I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I
      insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL.
      What do I do to solve this problem.
      Thanks, Anyhelp would be highly appreciated.

      L 1 Reply Last reply
      0
      • D DomDo

        Did you call AfxOleInit() and AfxEnableControlContainer() ? ================== The original message was: I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I
        insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL.
        What do I do to solve this problem.
        Thanks, Anyhelp would be highly appreciated.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Actually the client part of the code creates an MFC worker thread which calls my exportred function. I found a KB article in MSDN which said that I need to call OleInitialize(0) from my client. I did that also, but the dialog is still not displayed. Any ideas ? Here is the pseudo-code, UINT Thread Proc(LPVOID ) { //exported function from regular dll which //has a dialog with a Registered Active-X control ShowDlg(); return 0; } void CMainFrame::OnViewTest() { AfxBeginThread(x,y); } The thing works fine if there is no thread involved. ================== The original message was: Did you call AfxOleInit() and AfxEnableControlContainer() ?
        ==================
        The original message was:

        I've been developing an MFC regular dll which exports a function which creates and displays a dialog. Everytthing works fine. However I get a problem when I
        insert an Active -X control (eg: MS-Chart control) at design time and then display the dialog. In this case when I call my exported function the dialog is not displayed at all, and I noticed one thing DoModal returns IDCANCEL.
        What do I do to solve this problem.
        Thanks, Anyhelp would be highly appreciated.

        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