It usually does not work to try to get around MFC and the ClassWizard and such if you are guessing at what needs to be done. I doubt that inserting a TYPELIB statement in that manner will work. We seldom need to modify the rc file directly ourselves. It is not likely to work; probably the TYPELIB statement will be deleted again as soon as you modify the resources using the resource editor.
Last edited by Sam Hobbs; March 6th, 2004 at 07:33 PM.
When you create the (CMessageCenter) class for your Automation object, what do you derive from? It has been a while since I did any Automation server development myself so I forget the details. I should go through the Autoclik tutorial too.
CWnd is not likely to work. CWnd is difficult to use unless it is a child of another window. If you make your object derived from a window object, then you probably need to create a class derived from CFrameWnd and then use the derived class for your Automation object. However I think that would be a mistake too.
Probably the Automation object should be drived from a non-window class. You can still create a window in the Automation server, and methods and properties can be provided to control the winow, but my guess is that the object itself should not be derived from CWnd or any class derived from CWnd.
However if there is anything anywhere saying that using CWnd for your Automation object will work, then I am probably wrong.
In the AutoClik tutorial is ODL File for Creating a Type Library. It says that the odl gets compiled to a tlb; it does not say anything about the type library being put into the resources. I think that putting the type library into the resources is an additional step but I don't know what that is.
Also, the AutoClik Automation object is a CDocument-derived class, correct? Of course, a DLL Automation server does not have a document (initially) but I make that point just to show that it is probably not normal to use a dialog or other window for the object.
Last edited by Sam Hobbs; March 6th, 2004 at 03:57 PM.