wpQueryFldrAttr
Appearance
This instance method is called to allow the folder to query its current view attributes for the WC_CONTAINER window used in each view window.
Syntax
_wpQueryFldrAttr(somSelf, ulView)
Parameters
- somSelf (WPFolder *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPFolder.
- ulView (ULONG) - input
- Flag indicating the view to query.
- **OPEN_CONTENTS** Open contents view.
- **OPEN_DETAILS** Open details view.
- **OPEN_HELP** Display HelpPanel.
- **OPEN_TREE** Open tree view.
Returns
- ulViewAttributes (ULONG) - returns
- Flag containing current folder view attribute.
- These are the **CV_*** attributes defined by the Container Control Window. See **CNRINFO** for a detailed description.
How to Override
This method is generally not overridden.
Usage
This method can be called at any time in order to determine the view attributes currently set.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPFolder *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulView; /* Flag indicating the view to query. */
ULONG ulViewAttributes; /* Flag containing current folder view attribute. */
ulViewAttributes = _wpQueryFldrAttr(somSelf,
ulView);
Example Code
SOMAny *pfolder, *objDesktop, *ObjCopy;
BOOL rc;
CHAR FolderTitle[CCHMAXPATHCOMP] = "My Folder Title";
PSZ pszFolderTitle = FolderTitle;
ULONG ulFolderAttr;
objDesktop = _wpclsQueryFolder(_WPFolder,"<WP_DESKTOP>",TRUE);
if ((pfolder = _wpclsNew(_WPFolder, /* Object class name */
pszFolderTitle, /* Title of object */
"NODELETE=NO", /* Setup string */
objDesktop, /* Target folder */
TRUE)) != NULLHANDLE) /* Never dormant */
{
if ((ObjCopy = _wpCopyObject(self, pfolder, TRUE)) != NULLHANDLE) {
ulFolderAttr = _wpQueryFldrAttr (pfolder, OPEN_CONTENTS);
if (ulFolderAttr & CV_FLOW) {
/* Handle view processing */
} // endif FolderAttr
} // endif wpclsNew