Nominate our 2022 Qt Champions!

Implementing a windowless QAxServer

  • OK, I'm clueless by now. As a proof of concept I created some nice QAxServers implementing some analog clocks, and they work flawless. I'm asked to create a windowless ActiveX however, so I have to implement the IOleInPlaceObjectWindowless interface.

    So far I've tried to create a QAxAggregated, IOleInPlaceObjectWindowless derived class, and it gets created. I have some issues that keep me from getting an actual windowless control:

    • Somehow IID_IOleInPlaceObjectWindowless is not queried by the test container, so my nice implementation is useless.
    • IOleInPlaceObjectWindowless is a public public IOleInPlaceObject, so I would like to pass the implementation of those functions to QAxServerBase if possible, but how to get access to that instance?

    It's very well possible that I'm totally missing the point somewhere, is there someone who can point me in the right direction?

  • By now I found this is impossible to solve within the Qt Framework. QAxServerBase::internalActivate() calls
    OnInPlaceActivate() on the container instead of OnInPlaceActivateEx(), so a windowless QAxServer is not possible in Qt 5.5. I'll explore the options to use ATL instead, maybe that will be the solution.

    I'm hoping this post will at least save others the same frustration I've encountered.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If you feel it's something that could be useful, you can check the bug report system to see if there's already something about it. If not then you could open a feature request for that.