Click to open or copy the Dispdemo project files.
The Dispdemo sample is an Automation controller. Dispdemo drives the two polygon servers (spoly and spoly2) that are also provided as samples.
The interesting part of Dispdemo is in the remote polygon class. The remote polygon class was constructed so that the IDispatch members could be accessed conveniently from C++. The remote polygon class does this by transforming the C++ calls into IDispatch calls. The code that calls these routines does not detect that it is going through IDispatch.
This sample uses the following keywords:
addref; ansistring; assert; button; buttonpush; c2pstr; carith; ccalc; ccalccf; clear; convertstrwtoa; coregisterclassobject; corevokeclassobject; create; createdialog; createdisptypeinfo; createinstance; createstddispatch; data_seg; define_guid; defined; defwindowproc; delay; dim; dispatchmessage; dispinvoke; display; ensureregistration; eval; failed; get_accum; get_op; get_opnd; getditem; getitem; getmenuitemtext; getmessage; header; hilitecontrol; initapplication; initinstance; initole; isequaliid; loadcursor; loadicon; lockserver; mdata; method0; method1; oleinitialize; olestr; oleuninitialize; pdata1; postquitmessage; property; put_accum; put_op; put_opnd; queryinterface; quit; regclosekey; registeractiveobject; registerclass; regopenkey; regsetvalue; release; revokeactiveobject; sendmessage; setdlgitemtext; setitext; showwindow; stdmethod; stdmethod_; stdmethodimp_; strcpy; string; switch; sysstringlen; translatemessage; tstr; uninitole; unused; variantchangetype; variantclear; variantinit; warning; widechartomultibyte; widestring; winmain; wndproc