VFW070 Create a Reusable Part Object

VLF Windows Application Development

VFW070 – Create a Reusable Part Object

The reusable parts you have built in previous exercises have been visual components. A reusable part of type Panel has an ancestor of PRIM_PANL.

A reusable part of type Object is non-visual, and has an ancestor of PRIM_OBJT. Think of this example as a component which you call (invoke) to perform some processing and return a result.

Objective

This exercise will build a simple reusable object which will calculate the years, months and days since an employee joined the company.

The component is invoked when passed the start date and it returns the three result values.

  • To build and implement a 'Time Employed' reusable part
  • To learn how to write a method routine, which has input and output parameters
  • To use the new component in the Employee Details command handler

To achieve these objectives you will complete the following:

Step 1. Create Time Employed Reusable Part

Step 2. Implement Time Employed calculation in Employee Details Command Handler

Summary

Before You Begin

You should complete exercises VFW030, VFW040 and VFW042.