Additional Information
The following list includes resources you may find useful.
-
Inside OLE, Second Edition, Kraig Brockschmidt, Microsoft Press. Chapters 3, 13–15 and 24 contain most of the information you'll need to work with an ActiveX control and Automation server. The chapters on persistence should be useful if you are unfamiliar with the topic.
-
COM Programmer’s Reference and Automation Programmer’s Reference, MSDN in the Platform Software Development Kit.
-
MFC Source Code, Visual C++ 5.0. When you’re looking for ideas, the MFC source code proves to be an invaluable resource. Use it frequently.
Host-Specific Notes
Here are some notes about known problems with specific ActiveX control hosts:
-
Microsoft Access 95: Access 95 requires IPerPropertyBrowsing. If you do not implement this interface, you will not able to put one of your controls on a form. See MSDN and the MFC source code for documentation on this interface.
In addition, you cannot return error SCODEs from GetPredefinedStrings. You must return either S_OK or S_FALSE. Returning an error SCODE causes a failure.
MapPropertyToPage should return PERPROP_E_NOPAGEAVAILABLE if there are no pages available.
-
TstCon32: The MFC Test container assumes your control is based around a dispinterface, and looks for VARDESC structures of variables. Because framework controls are based around dual interfaces, variables are all in FUNCDESC structures, and the test container will suggest that your control has no properties. This is, of course, incorrect.