Why does GetSafeHwnd() return zero in an ActiveX control?

前端 未结 1 596
一生所求
一生所求 2020-12-22 13:06

I have developed a MFC Activex control which is windowless and invisible in runtime, while i assumed that basically an activex is a control that would manipulate a windows h

相关标签:
1条回答
  • 2020-12-22 13:56

    By definition, windowless ActiveX control doesn't have a window, and rendered as part of its parent. If you want to work with Windows messages in the control, you can create worker thread with a message loop, and handle any messages there. To have message loop, you don't need a window, just thread. This solution can be implemented in windowless control or in any COM component.

    Alternatively, you can use windowed ActiveX control by changing its properties.

    0 讨论(0)
提交回复
热议问题