AGOpenWithView
Use the AGOpenWithView function to open a guide file and specify its initial active list. You can use this function to open a guide file that uses a Full Access window or Single List access window.
AGErr AGOpenWithView (FSSpec *fileSpec, UInt32 flags,
Handle mixinControl,
short viewNum,
AGRefNum *resultRefNum);
- fileSpec
- A pointer to the file system specification record for the guide file you wish to open. Specify
NIL to open the first guide file of type Help that is available to the application.
- flags
- Reserved. Specify 0 in this parameter.
- mixinControl
- Reserved. Specify
NIL in this parameter.
- viewNum
- A value that indicates which list to display. You can use these constants to specify which list should be initially active:
enum {
kAGViewFullHowdy = 1, /*full howdy*/
kAGViewTopicAreas = 2, /*Topic Area*/
kAGViewIndex = 3, /*Index*/
kAGViewLookFor = 4, /*Look For*/
kAGViewSingleHowdy = 5, /*Single List *
/* howdy*/
kAGViewSingleTopics = 6 /*Single List */
/* topics*/
};
- resultRefNum
- An address through which
AGOpenWithView returns a reference number for the guide file specified in the fileSpec parameter. You use this reference number to refer to the guide file in other Apple Guide functions.
DESCRIPTION
The AGOpenWithView function opens the guide file specified in the fileSpec parameter, and displays the active list specified in the viewNum parameter. If the application portion of Apple Guide is not in memory, AGOpenWithView calls AGStart to start up Apple Guide before it opens the specified guide file.
RESULT CODES
| noErr | 0 | No error |
| kAGErrCannotOpenAliasFile | -2954 | Unable to open alias |
| kAGErrNoAliasResource | -2955 | Unable to open resource alias |
| kAGErrDatabaseNotAvailable | -2956 | Guide file is not available |
| kAGErrInsufficientMemory | -2962 | Not enough memory |