
COM object that uses MFC and MFC Socket class
Derive from CWindowImpl<> and specify NULL as the parent window.
Of course if you are using MFC, you could just use a CWnd window...
And why use ATL at all? MFC can implement COM and Automation
interfaces - read TN038 and TN039. There's no point whatsoever
in mixing MFC and ATL... (You can even implement dual interfaces
in MFC, although I don't know the details...)
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
Quote:
> How would you create a come object that uses MFC Socket classes. I want to
> be able to create this object in VB or Excel or whatever and get live data
> from a feed that is coming from this socket connection.
> I am currently having trouble with the socket calling my com object back
> after I connect to it. It is trying to send it to a window handle and I
> can't figure out how to create a window inside this atl com object? What
> would the parent be? Please Help.
> Thanks,
> Mike