Jump to content

wpQueryAssociationType

From EDM2


WPProgram

This instance method is called to determine which file types are used to associate data file objects to this program object.

Syntax

_wpQueryAssociationType(somSelf)

Parameters

somSelf (WPProgram *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPProgram.

Returns

rc (PSZ) - returns
A pointer to a string containing the file type. This string can contain several file title filters separated by commas. For example:
"Plain Text,C Code"
A return value of **NULL** indicates that an error occurred.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time in order to determine which file types are used to associate data file objects to this program object.

Remarks

The association type is used to designate this program as an available **open view** for data file objects which have a type that matches one of the association types which are set. If a data file object matches a type in a program object or program file object, the title of the program object or program file object will appear in the data file object's Open cascade of its pop-up menu.

The **wpQueryAssociationType** method will return the type string set by the last call to the wpSetAssociationType method.

The wpQueryAssociationFilter method can be called to determine which file title filters are used to associate data file objects to this program object.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPProgram     *somSelf;  /*  Pointer to the object on which the method is being invoked. */
PSZ            rc;       /*  Success indicator. */

rc = _wpQueryAssociationType(somSelf);

Related Methods

WPProgramFile

This instance method is called to determine which file types are used to associate data file objects to this program object.

Syntax

_wpQueryAssociationType(somSelf)

Parameters

somSelf (WPProgramFile *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPProgramFile.

Returns

rc (PSZ) - returns
A pointer to a string containing the file types. This string can contain several file title filters separated by commas. For example:
"Plain Text,C Code"
A return value of **NULL** indicates that an error occurred.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time in order to determine which file types are used to associate data file objects to this program object.

Remarks

The association type is used to designate this program as an available **open view** for data file objects which have a type that matches one of the association types which are set. If a data file object matches a type in a program object or program file object, the title of the program object or program file object will appear in the data file object's Open cascade of its pop-up menu.

The **wpQueryAssociationType** method will return the type string set by the last call to the wpSetAssociationType method. The wpQueryAssociationFilter method can be called to determine which file title filters are used to associate data file objects to this program object.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPProgramFile *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ rc; /* Success indicator. */

rc = _wpQueryAssociationType(somSelf);

Related Methods