TELChoose
Displays a dialog box in which a user can specify the settings for a given telephone tool.
pascal TELErr TELChoose ( TELHandle *hTEL, Point where, TelephoneChooseIDleUPP idleProc);
hTEL- On entry, a handle to a telephone record specifying the initial tool and settings of the tool-selection dialog box. On exit, a handle to a telephone record specifying the tool and settings selected by the user, or
nilif a significant error occurred during the execution ofTELChoose.where- The point, specified in global coordinates, where the upper-left corner of the tool settings dialog box should be positioned. You should place the dialog box as close as possible to the upper-left corner of the screen because the size of the tool-settings dialog box can vary depending on the telephone tool.
idleProc- A function, with no parameters, that the Telephone Manager calls each time
TELChooseloops through the setup dialog box filter procedure. Passnilin this parameter if your application has no idle procedure. For details on how to implement anidleProcprocedure, consult Inside the Macintosh Communications Toolbox.- function result
- A result code. The result codes
telChooseCancel,telChooseAborted,telChooseDisasterandtelChooseFailedindicate that the configuration process was not completed for some reason. The result codestelChooseOKMinorandtelChooseMajorindicate that the configuration process succeeded. For information about these result codes, see "Tool Choosing Result Codes" on page 1-24.DESCRIPTION
TheTELChoosefunction displays a standard tool-settings dialog box that lets users select a telephone tool and the desired configuration settings. On entry,hTELis a handle to a telephone record that specifies the initial settings of the dialog box.TELChoosereturns, in thehTELparameter, a handle to a telephone record whose fields are set according to the user's selections. If a significant error occurs during the configuration process, thehTELparameter is set tonil.If the user selects a new telephone tool and specifies the configuration settings,
TELChooseautomatically creates a new telephone record for the telephone terminal and returns a handle to that record in thehTELparameter.TELChoosealso fills in the configuration details with the settings specified by the user and the default configuration values returned through theTELDefaultfunction.TELChoosethen calls theTELValidatefunction to ensure that all of the configuration settings are valid for the selected telephone tool.Each telephone record contains the configuration settings for a single telephone terminal (for example, the GeoPort Telecom Adapter or ISDN interface). If your application supports more than one telephone terminal, you must provide a mechanism for configuring each one.
SPECIAL CONSIDERATIONS
TELChoosecallsTELNewto create a new telephone record. If a new telephone record cannot be created,TELChoosereturns a non-zero result code. You can callTELGetTelNewErrto determine the result code from that call toTELNew.