wpQueryAssociationFilter
WPProgram
This instance method is called to determine which file title filters are used to associate data file objects to this program object.
Syntax
wpQueryAssociationFilter(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 title filter. This string can contain several file title filters separated by commas. For example:
"*.TXT, *.DOC"
- 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 title filters are used to associate data file objects to this program object.
Remarks
The association filter is used to designate this program as an available **open view** for data file objects that have a title that matches one of the association filters which are set. If a data file object matches a filter 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 **wpQueryAssociationFilter** method will return the filter string set by the last call to the wpSetAssociationFilter method. The wpQueryAssociationType method can be called to determine which file types 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 = wpQueryAssociationFilter(somSelf);
Related Methods
WPProgramFile
This instance method is called to determine which file title filters are used to associate data file objects to this program object.
Syntax
_wpQueryAssociationFilter(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 title filters. This string can contain several file title filters separated by commas. For example:
"file*.TXT, *.DOC"
- 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 title filters are used to associate data file objects to this program object.
Remarks
The association filter is used to designate this program as an available **open view** for data file objects which have a title that matches one of the association filters which are set. If a data file object matches a filter 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 **wpQueryAssociationFilter** method will return the filter string set by the last call to the wpSetAssociationFilter method. The wpQueryAssociationType method can be called to determine which file types 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 = _wpQueryAssociationFilter(somSelf);