DTS Programming

Implementing the User Interface Class

To implement the user interface class in the Data Transformation Services (DTS) custom task user interface example, add code to the Microsoft® Visual C++® file GVUserIF.cpp. No changes are necessary to the user interface class header file.

Add the following to the user interface class code file GVUserIF.cpp:

Adding an Include Statement

The include statement is necessary so the New and Edit methods can access the property page class.

Immediately after the line:

#include "GVUserIF.h"

insert the line:

#include "GVPropPage.h"
Displaying the Property Page

This code displays the property page and passes it a reference to the custom task so it can retrieve and update properties.

Example

Replace the entire body of both the CGVUserIF::New and CGVUserIF::Edit methods with the following code:

    CGVPropPage    dlgProp;

    if(!m_pIDTSTask || !m_pIDTSCustomTask)
        return E_FAIL;

    dlgProp.DoModal( (struct HWND__ *)hwndParent, (long)m_pIDTSCustomTask );

    return NOERROR;