Hey guys I got a pretty unique situation here and I was wondering if somebody could enlighten me.
I have a full-fledged application contained in a dialog-based MFC program using html dialogs. The UI is basically written completely in HTML (CDHtmlDialog) and it connects seamlessly (both ways) to the main MFC app. I started with the MFC Application Wizard in Visual Studio and changed the application type to HTML dialog-based. I know it's kind of a crazy idea building the UI in HTML but I thought it was pretty cool. It even has native win32 api menus and status bars.
What I'm trying to do is get a DirectX device to render to an element INSIDE the HTML page. All I really need is a hwnd (window handle) to the HTML element.
Of course, I know that MSHTML renders controls in a "windowless" fashion but I also that some ActiveX control can actually have their own windows (something about m_bWindowOnly.) For example, the following object rendered in a 32-bit MSHTML app will produce a slider with it's own window.
Its possible the documentation for the ActiveX Control you are running might give you some insight on this. The Api function EnumChildWindows() is an enumerator, and will return all HWNDs of a parent. Also, with a HWND you can get the address of the Window Procedure for its class, whatever that might be. Just throwing some ideas out there for you to mull over and research.
I wrote an ActiveX Grid Control recently - all low level COM, no ATL, and one of the methods of the main interface was to return the HWND of the 'container' window of the grid. So what I'm saying is that attempting to get or even needing the HWND of an object like that isn't that unusual. The main issue would be whether the original designer of the object felt making the HWND available would break encapsulation or not.