Results 1 to 4 of 4

Thread: QAxServer. How to embed QWidget into .NET forrm?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Nov 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QAxServer. How to embed QWidget into .NET forrm?

    Here is how I proceed:
    - The directory containing the qt dlls is in the PATH
    - I build the qt example 'activeqt/simple' in VS2008 (launched from the 'Visual Studio with Qt 4.8.2' shortcut)
    - I registered the COM server with the cmd 'simpleax.exe /regserver'
    - In VS2008 (normal mode, not launched from Visual Studio with Qt 4.8.2 shortcut), I create a new MFC dialog-based application, with the "ActiveX controls" option checked on
    - in the main dialog resource view, I right-click and select the "Insert ActiveX control" menu item
    - In the "Insert ActiveX control" window list, I select the "QSimpleAX Class" item, and validate the dialog
    - There is a white window displayed now in the resource view
    - I launch the MFC application in debug mode: a failed assertion occurs in atlmfc\src\mfc\occcont.cpp:

    HWND hwndCtrl=AfxGetDlgItemStartFromHWND(pOccDlgInfo->m_pItemInfo[i].nId, hwndSearchFrom);
    //If not found, revert to prev method of GetDlgItem, this means Win32 children list and
    //resource item array are out of sync
    if (hwndCtrl == NULL)
    {
    hwndCtrl = ::GetDlgItem(m_pWnd->GetSafeHwnd(),pOccDlgInfo->m_pItemInfo[i].nId);
    TRACE(traceAppMsg, 0, "Warning: Resource items and Win32 Z-order lists are out of sync. Tab order may be not defined well.\n");
    }
    COleControlSiteOrWnd *pTemp =
    new COleControlSiteOrWnd(
    hwndCtrl,
    pOccDlgInfo->m_pItemInfo[i].bAutoRadioButton);
    ASSERT(IsWindow(pTemp->m_hWnd)); <===== H E R E

    I note that hwndCtrl is NULL

    If I launch the "ActiveX Control Test Container" application provided in the C++ samples with VS2008, I can insert this activex with no problem, while this application is also a MFC application!

    In my basic MFC dialog-based application, I tried to insert other well known activex, like "adobe pdf reader", and "microsoft office spreadsheet", both worked.

    So what could be wrong?

    Thanks
    Last edited by d_d_v; 29th November 2012 at 13:06. Reason: updated contents

Similar Threads

  1. QAxServer:: Out of process executable server
    By Pharell in forum Qt Programming
    Replies: 3
    Last Post: 14th December 2012, 10:31
  2. Replies: 10
    Last Post: 11th June 2012, 09:16
  3. How to hide QAxServer details from .NET?
    By EgorSharin in forum Newbie
    Replies: 2
    Last Post: 16th February 2011, 22:50
  4. Linker error with QAxServer and QAxContainer
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 29th October 2008, 22:44
  5. Listening events of a QAxServer module
    By juan in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2008, 14:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.