The COMPCTRL sample demonstrates a composite control. A composite control is an ActiveX control that contain other controls. COMPCTRL contains the SMILEY and POLYGON samples. The COMPCNTR sample is a simple dialog box application that provides a container for the CCOMPCTRL control.
Before you can use the COMPCTRL sample, you need to register Compctrl.dll, Polygon.dll, and Smiley.ocx.
The CComCtrl class uses the following interfaces:
IDataObject | IViewObjectEx |
IDispatch | IPersistStreamInit |
IOleControl | IPersistStorage |
IOleInPlaceActiveObject | IPersistStreamInit |
IOleInPlaceObject | IProvideClassInfo |
IOleInPlaceObjectWindowless | IProvideClassInfo2 |
IOleObject | IQuickActivate |
IOleWindow | ISpecifyPropertyPages |
IOleInPlaceObjectWindowless | IViewObject |
IPersist | IViewObject2 |
When COMPCTRL is run, both the SMILEY and POLYGON controls are displayed. For more information on these controls, see SMILEY/SMILEYDG and POLYGON/POLYCNTR.
You can interact with the SMILEY sample by selecting the Smile, Sad, or Wink buttons which will case you will see a smiling, sad, or winking smiley bitmap respectively. You can also click in the box containing the face, in which case you a dialog box will appear that will indicate whether you clicked inside or outside the face.
You can add or subtract the number of sides of the polygon displayed in the POLYGON sample, by selecting the Increment or Decrement buttons respectively. You can also change a shape by clicking in the lower left/upper right half of the polygon circle.
This sample demonstrates the following keywords:
You can find the COMPCTRL project files in the Wce\Samples\Atl\ COMPCTRL directory.
You can find the COMPCNTR project files in the Wce\Samples\Atl\ COMPCNTR directory.