The Active Template Library (ATL) MinMaxShip Component Sample
The MinMaxShip sample component, which is included on the Commerce Server CD, calculates the shipping total for an order by taking the largest list price in an OrderForm object's Items
collection, multiplying it by a percentage, and comparing the product to some specified minimum. The larger number in this comparison is then stored in the OrderForm's _shipping
_total
name/value pair.
This section demonstrates how to use the Active Template Library and the Pipeline Component Wizard to create and implement the MinMaxShip component as an Active Template Library (ATL) object. This tutorial covers the following topics:
-
υCreating a project for the MinMaxShip sample component.
-
υAdding an object to the MinMaxShip project.
-
υAdding properties to the MinMaxShip project.
-
υAdding support for IPersistStreamInit to save the component's properties to storage.
-
υImplementing property pages. A property page is a dialog box-like window that component users can use to set properties on the MinMaxShipping object that the MinMaxShip component implements.
-
υImplementing IPipelineComponent, the interface that an object must implement to be executed by the pipeline.
-
υImplementing IPipelineComponentDescription. Implementing this interface results in the addition of a property page to the property sheet for your component. This property page identifies the pipe context values that your component reads, and the OrderForm values that your component reads and writes.
© 1997-1998 Microsoft Corporation. All rights reserved.