home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / Data1.cab / _987457DA79724B1292415DDCC89DF953 < prev    next >
Text File  |  2003-03-07  |  115KB  |  3,274 lines

  1. Date
  2.  
  3. Syntax
  4.  
  5. Description
  6.  
  7. Return Value
  8.  
  9. Parameter
  10.  
  11.     
  12.  
  13. numeric := DateAddDays
  14.  
  15. Syntax
  16.  
  17. ([Date: numeric]; Days: numeric)
  18.  
  19. Description
  20.  
  21. Add a specified number of days to Date (parameter).
  22.  
  23. Return Value
  24.  
  25. A date with the specified number of days added. An error returns DateAndTime.Error!.
  26.  
  27. Parameter
  28.  
  29. Date: numeric (optional)    Add days to this date. If missing, the current date is used.
  30.  
  31. Days: numeric)    Number of days to add to Date (parameter).
  32.  
  33. Note
  34.  
  35. * To pass a specific date and time, use the DateAndTime function.
  36. numeric := DateAddMonths
  37.  
  38. Syntax
  39.  
  40. ([Date: numeric]; Months: numeric; [EndOfMonth: enumeration])
  41.  
  42. Description
  43.  
  44. Add a specified number of months to a specified date.
  45.  
  46. Return Value
  47.  
  48. Date with the specified number of months added. An error returns DateAndTime.Error!.
  49.  
  50. Parameters
  51.  
  52. Date: numeric (optional)    Date to add months to. If missing, the current date is used.
  53.  
  54. Months: numeric    Number of months to add to Date.
  55.  
  56. EndOfMonth: enumeration (optional)    Return the last day or same day in the specified month. If missing, EndOfMonth! is used.
  57.  
  58. SameDay! If the date is March 15 and one month is added, April 15 is returned.
  59.  
  60. EndOfMonth! If the date is April 30 and one month is added, May 31 is returned.
  61.  
  62. Note
  63.  
  64. * To pass a specific date and time, use the DateAndTime function.
  65. numeric := DateAddWeeks
  66.  
  67. Syntax
  68.  
  69. ([Date: numeric]; Weeks: numeric; [FirstOfWeek: enumeration])
  70.  
  71. Description
  72.  
  73. Add a specified number of weeks to a specified date.
  74.  
  75. Return Value
  76.  
  77. A date with the specified number of weeks added. An error returns DateAndTime.Error!.
  78.  
  79. Parameter
  80.  
  81. Date: numeric (optional)    Add weeks to this date. If missing, the current date is used.
  82.  
  83. Weeks: numeric    Number of weeks to add to Date (parameter).
  84.  
  85. FirstOfWeek: enumeration (optional)    Day of the week to return for the return date. If missing, Current! is used.
  86.  
  87. Current! Return the date of the same day of the week as the current day.
  88.  
  89. Sunday! Return Sunday's date for the specified week.
  90.  
  91. Monday! Return Monday's date for the specified week.
  92.  
  93. Tuesday! Return Tuesday's date for the specified week.
  94.  
  95. Wednesday! Return Wednesday's date for the specified week.
  96.  
  97. Thursday! Return Thursday's date for the specified week.
  98.  
  99. Friday! Return Friday's date for the specified week.
  100.  
  101. Saturday! Return Saturday's date for the specified week.
  102.  
  103. Note
  104.  
  105. * To pass a specific date and time, use the DateAndTime function.
  106. numeric := DateAddYears
  107.  
  108. Syntax
  109.  
  110. ([Date: numeric]; Years: numeric)
  111.  
  112. Description
  113.  
  114. Add a specified number of years to a specified date.
  115.  
  116. Return Value
  117.  
  118. Date with a specified number of years added. An error returns DateAndTime.Error!.
  119.  
  120. Parameters
  121.  
  122. Date: numeric (optional)    Date to add years to. If missing, the current date is used.
  123.  
  124. Years: numeric    Number of years to add to Date.
  125.  
  126. Note
  127.  
  128. * To pass a specific date and time, use the DateAndTime function.
  129. numeric or enumeration := DateAndTime
  130.  
  131. Syntax
  132.  
  133. ([Day: numeric]; [Month: enumeration or numeric]; [Year: numeric]; [Hour: numeric]; [Minutes: numeric]; [Seconds: numeric]; [Hundredths: numeric])
  134.  
  135. Description
  136.  
  137. Return a value representing the date and time.
  138.  
  139. The earliest valid date is January 1, 1601.
  140.  
  141. Examples
  142.  
  143. DateAndCurrentTime := DateAndTime()
  144.  
  145. MessageBox (x; "Date"; DateString (DateAndCurrentTime))
  146.  
  147. MessageBox (x; "Time"; TimeString (DateAndCurrentTime))
  148.  
  149. Explanation: MessageBox 1 displays the current date. MessageBox 2 displays current time.
  150.  
  151. vResult := DateAndTime (15; 10; 1994; 00; 10; 10; 10)
  152.  
  153. vDate := DateString (vResult)
  154.  
  155. vTime := TimeString (vResult)
  156.  
  157. MessageBox (x; "Date"; vDate)
  158.  
  159. MessageBox (x; "Time"; vTime)
  160.  
  161. Explanation: Messagebox 1 displays 10/15/94. Messagebox 2 displays 12:10:10 AM.
  162.  
  163. Return Value
  164.  
  165. A number representing the current day, month, year, hour, minute, second, and hundredths of a second is returned if the corresponding parameter is not used. If an error occurs, the enumeration value of Error! is returned.
  166.  
  167. Parameters
  168.  
  169. Day: numeric (optional)    A number representing a day of the week.
  170.  
  171. Month: enumeration or numeric (optional)    One of the following enumerations, or a number representing a month (number in brackets).
  172.  
  173. January! [1]
  174.  
  175. February! [2]
  176.  
  177. March! [3]
  178.  
  179. April! [4]
  180.  
  181. May! [5]
  182.  
  183. June! [6]
  184.  
  185. July! [7]
  186.  
  187. August! [8]
  188.  
  189. September! [9]
  190.  
  191. October! [10]
  192.  
  193. November! [11]
  194.  
  195. December! [12]
  196.  
  197. Year: numeric (optional)    A number representing a year. Example: 2007
  198.  
  199. Hour: numeric (optional)    A number representing an hour.
  200.  
  201. Minutes: numeric (optional)    A number representing a minute.
  202.  
  203. Seconds: numeric (optional)    A number representing a second.
  204.  
  205. Hundredths: numeric (optional)    A number representing hundredths of a second.
  206.  
  207. numeric := DateDay
  208.  
  209. Example
  210.  
  211. Syntax
  212.  
  213. ([Date: numeric])
  214.  
  215. Description
  216.  
  217. Return a numeric value representing a day of the month.
  218.  
  219. Example
  220.  
  221. vDay := DateDay()
  222.  
  223. Messagebox (x; "Day of the Month"; vDay)
  224.  
  225. Result (current system day): 17
  226.  
  227. Return Value
  228.  
  229. Check for an error (illegal date) by comparing the return value to DateAndTime.Error!.
  230.  
  231. Parameters
  232.  
  233. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  234.  
  235. numeric := DateDayOfYear
  236.  
  237. Syntax
  238.  
  239. ([Date: numeric])
  240.  
  241. Description
  242.  
  243. Return the number of a day in the year.
  244.  
  245. Return Value
  246.  
  247. Number of the day in the year specified by the Date parameter. An error returns DateAndTime.Error!.
  248.  
  249. Parameters
  250.  
  251. Date: numeric (optional)    Date for which to return the number of the day.
  252.  
  253. Note
  254.  
  255. * To pass a specific date and time, use the DateAndTime function.
  256. numeric := DateDaysInMonth
  257.  
  258. Syntax
  259.  
  260. ([Month: enumeration or numeric]; [Year: numeric])
  261.  
  262. Description
  263.  
  264. Return the number of days in a specified month.
  265.  
  266. Return Value
  267.  
  268. Number of days in a specified month (takes Leap year into account). An error returns DateAndTime.Error!.
  269.  
  270. Parameters
  271.  
  272. Month: enumeration or numeric (optional)    Month for which to return the number of days. If missing, the current month is used. You can also specify a numeric value to represent the month. For example, 1 for January, 2 for February, and so on.
  273.  
  274. January!
  275.  
  276. February!
  277.  
  278. March!
  279.  
  280. April!
  281.  
  282. May!
  283.  
  284. June!
  285.  
  286. July!
  287.  
  288. August!
  289.  
  290. September!
  291.  
  292. October!
  293.  
  294. November!
  295.  
  296. December!
  297.  
  298. Year: numeric (optional)    Year in which to return the number of days in the specified month. If missing, the current year is used.
  299.  
  300. Note
  301.  
  302. * To pass a specific date and time, use the DateAndTime function.
  303. numeric := DateDaysInYear
  304.  
  305. Syntax
  306.  
  307. ([Year: numeric])
  308.  
  309. Description
  310.  
  311. Return the number of days in a specified year.
  312.  
  313. Return Value
  314.  
  315. Number of calendar days in a specified year. An error returns DateAndTime.Error!.
  316.  
  317. Parameters
  318.  
  319. Year: numeric (optional)    Year for which to return the number of calendar days. If missing, the current year is used. Leap years are taken into consideration.
  320.  
  321. boolean := DateIsLeapYear
  322.  
  323. Syntax
  324.  
  325. ([Year: numeric])
  326.  
  327. Description
  328.  
  329. Determine whether a specified year is a leap year.
  330.  
  331. Return Value
  332.  
  333. True if leap year, False if not.
  334.  
  335. Parameters
  336.  
  337. Year: numeric (optional)    Year to check for leap year. If missing, the current year is used.
  338.  
  339. Note
  340.  
  341. * A year that is evenly divisible by 4 is a leap year. The only exception is a century year (for example, 1600), which is a leap year only if it is evenly divisible by 400.
  342. enumeration or numeric := DateMonth
  343.  
  344. Example
  345.  
  346. Syntax
  347.  
  348. ([Date: numeric])
  349.  
  350. Description
  351.  
  352. Return an enumeration representing the month.
  353.  
  354. Example
  355.  
  356. // Assume the current month is February
  357.  
  358. vMonth := DateMonth()
  359.  
  360. MessageBox (x; "Month"; vMonth)
  361.  
  362. Result (current system month): 2 or February!
  363.  
  364. Return Value
  365.  
  366. Check for an error (illegal date) by comparing the return value to DateMonth.Error! or DateAndTime.Error!.
  367.  
  368. January!
  369.  
  370. February!
  371.  
  372. March!
  373.  
  374. April!
  375.  
  376. May!
  377.  
  378. June!
  379.  
  380. July!
  381.  
  382. August!
  383.  
  384. September!
  385.  
  386. October!
  387.  
  388. November!
  389.  
  390. December!
  391.  
  392. Error!
  393.  
  394. Parameters
  395.  
  396. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  397.  
  398. string := DateMonthName
  399.  
  400. Syntax
  401.  
  402. ([Date: numeric]; [Type: enumeration])
  403.  
  404. Description
  405.  
  406. Return the name of a month.
  407.  
  408. Examples
  409.  
  410. vDate := DateAndTime (1; 12; 1996)
  411.  
  412. vMonth := DateMonthName (vDate)
  413.  
  414. MessageBox (x; "Month"; vMonth)
  415.  
  416. Result: December
  417.  
  418. vDate := DateAndTime (1; 12; 1996)
  419.  
  420. vMonth := DateMonthName (vDate; Short!)
  421.  
  422. MessageBox (x; "Month"; vMonth)
  423.  
  424. Result: Dec
  425.  
  426. Return Value
  427.  
  428. An empty string ("") is returned for an illegal date.
  429.  
  430. Parameters
  431.  
  432. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  433.  
  434. Type: enumeration (optional)    Default: Long!
  435.  
  436. Short! Month is abbreviated.
  437.  
  438. Long! Month is spelled out.
  439.  
  440. numeric := DateOfMonthEnd
  441.  
  442. Syntax
  443.  
  444. ([Month: enumeration or numeric]; [Year: numeric])
  445.  
  446. Description
  447.  
  448. Return the date for the end of a specified month.
  449.  
  450. Return Value
  451.  
  452. Date for the end of a specified month. An error returns DateAndTime.Error!.
  453.  
  454. Parameters
  455.  
  456. Month: enumeration or numeric (optional)    Month for which to return the end-of-month date. If missing, the current month is used. You can also use numbers to specify the month. For example, 1 for January, 2 for February, and so on.
  457.  
  458. January!
  459.  
  460. February!
  461.  
  462. March!
  463.  
  464. April!
  465.  
  466. May!
  467.  
  468. June!
  469.  
  470. July!
  471.  
  472. August!
  473.  
  474. September!
  475.  
  476. October!
  477.  
  478. November!
  479.  
  480. December!
  481.  
  482. Years: numeric (optional)    Year in which to return the end-of-month date for Month. If missing, the current year is used.
  483.  
  484. numeric := DateOfNthDay
  485.  
  486. Syntax
  487.  
  488. (Nth: numeric; [Year: numeric])
  489.  
  490. Description
  491.  
  492. Return the date for a specified day in a year.
  493.  
  494. Return Value
  495.  
  496. Date of a specified day number. An error returns DateAndTime.Error!.
  497.  
  498. Parameters
  499.  
  500. Nth: numeric    Day number for which to return the date.
  501.  
  502. Year: numeric (optional)    Year in which to return the date of a specified day. If missing, the current year is used.
  503.  
  504. numeric := DateOfNthWeek
  505.  
  506. Syntax
  507.  
  508. (Nth: numeric; [Year: numeric]; [FirstDayOfWeek: enumeration])
  509.  
  510. Description
  511.  
  512. Return the date for a specified week.
  513.  
  514. Return Value
  515.  
  516. Date of a specified week number. An error returns DateAndTime.Error!.
  517.  
  518. Parameters
  519.  
  520. Nth: numeric    Week number for which to return the date.
  521.  
  522. Year: numeric (optional)    Year in which to return the date of a specified week. If missing, the current year is used.
  523.  
  524. FirstDayOfWeek: enumeration (optional)    Day of the week for the date to return. If missing, Sunday! is used.
  525.  
  526. Sunday!
  527.  
  528. Monday!
  529.  
  530. Tuesday!
  531.  
  532. Wednesday!
  533.  
  534. Thursday!
  535.  
  536. Friday!
  537.  
  538. Saturday!
  539.  
  540. numeric := DateOfNthWeekDay
  541.  
  542. Syntax
  543.  
  544. (Nth: enumeration or numeric; DayOfWeek: enumeration; [Month: enumeration]; [Year: numeric])
  545.  
  546. Description
  547.  
  548. Return the date for a specified weekday in a specified month.
  549.  
  550. Return Value
  551.  
  552. Date of the nth weekday in a specified month. An error returns DateAndTime.Error!.
  553.  
  554. Parameters
  555.  
  556. Nth: enumeration or numeric    Number of the weekday in a specified month and year. Numeric values range from 1 to 5, or use one of the following enumerations:
  557.  
  558. First! Return the date of the first specified weekday.
  559.  
  560. Last! Return the date of the last specified weekday.
  561.  
  562. DayOfWeek: enumeration    Day of the week to return.
  563.  
  564. Sunday!
  565.  
  566. Monday!
  567.  
  568. Tuesday!
  569.  
  570. Wednesday!
  571.  
  572. Thursday!
  573.  
  574. Friday!
  575.  
  576. Saturday!
  577.  
  578. Month: enumeration (optional)    Month for which to return the date of a specified weekday. If missing, the current month is used.
  579.  
  580. January!
  581.  
  582. February!
  583.  
  584. March!
  585.  
  586. April!
  587.  
  588. May!
  589.  
  590. June!
  591.  
  592. July!
  593.  
  594. August!
  595.  
  596. September!
  597.  
  598. October!
  599.  
  600. November!
  601.  
  602. December!
  603.  
  604. Year: numeric (optional)    Year for which to return the date of a specified weekday. If missing, the current year is used.
  605.  
  606. string := DateString
  607.  
  608. Syntax
  609.  
  610. ([Date: numeric]; [Type: enumeration]; [Format: string])
  611.  
  612. Description
  613.  
  614. Return the date in a string.
  615.  
  616. Examples
  617.  
  618. vNmbrDate := DateAndTime (1; 1; 2000)
  619.  
  620. vDate := DateString (vNmbrDate; ; "dd/MM/yyyy (dddd)")
  621.  
  622. MessageBox (x; "Date String"; vDate)
  623.  
  624. Result: 01/01/2000 (Saturday)
  625.  
  626. vDate := DateString (; Short!)
  627.  
  628. MessageBox (x; "System Date"; vDate)
  629.  
  630. Result (system date): 2/17/96
  631.  
  632. vDate := DateString (; Long!)
  633.  
  634. MessageBox (x; "System Date"; vDate)
  635.  
  636. Result (system date): Saturday, February 17, 1996
  637.  
  638. Return Value
  639.  
  640. An empty string ("") is returned for an illegal date.
  641.  
  642. Parameters
  643.  
  644. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  645.  
  646. Type: enumeration (optional)    If missing, Short! is used.
  647.  
  648. Short! Date represented as digits.
  649.  
  650. Long! Date spelled out.
  651.  
  652. Custom! The format as specified by the Format parameter
  653.  
  654. Format: string (optional)    Specify a date string format. If missing, the current system format from the Windows Control Panel is used. See the example above for use; see the table below for details.
  655.  
  656.  
  657.  
  658. String    Codes
  659.  
  660. Day (month)    d (digits without leading zeros for single-digit days)
  661.  
  662. dd (digits with leading zeros for single-digit days)
  663.  
  664. Day (week)    ddd (three-letter abbreviation)
  665.  
  666. dddd (day of the week)
  667.  
  668. Month    M (digits without leading zeros for single-digit months)
  669.  
  670. MM (digits with leading zeros for single-digit months)
  671.  
  672. MMM (three-letter abbreviation)
  673.  
  674. MMMM (month spelled out)
  675.  
  676. Year    y (last digit only)
  677.  
  678. yy (last two digits)
  679.  
  680. yyyy (four digits)
  681.  
  682. Period/Era    gg (ignored if era string is not associated)
  683.  
  684. enumeration := DateWeekday
  685.  
  686. Syntax
  687.  
  688. ([Date: numeric])
  689.  
  690. Description
  691.  
  692. Return an enumeration representing the day of the week.
  693.  
  694. Example
  695.  
  696. vDate := DateAndTime (1; 1; 2000)
  697.  
  698. If(DateWeekday(vDate) = DateWeekday.Date.Saturday!)
  699.  
  700. MessageBox (x; "Day of the Week"; "Saturday")
  701.  
  702. Endif
  703.  
  704. Result: MessageBox displays "Saturday."
  705.  
  706. Return Value
  707.  
  708. Check for an error (illegal date) by comparing the return value to DateWeekday.Error! or DateAndTime.Error!.
  709.  
  710. Sunday!
  711.  
  712. Monday!
  713.  
  714. Tuesday!
  715.  
  716. Wednesday!
  717.  
  718. Thursday!
  719.  
  720. Friday!
  721.  
  722. Saturday!
  723.  
  724. Error!
  725.  
  726. Parameters
  727.  
  728. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  729.  
  730. date := DatePart
  731.  
  732. Syntax
  733.  
  734. ([Date: date])
  735.  
  736. Description
  737.  
  738. Remove the time from the specified date, returning a date with only the date part in it. The time portion of the date/time value returned will be cleared, which is interpreted as midnight.
  739.  
  740. Return Value
  741.  
  742. The date portion of the specified date.
  743.  
  744. Parameters
  745.  
  746. Date:
  747.  
  748. date    The date to return the date part of. If missing, the current date is used.
  749.  
  750. string := DateWeekdayName
  751.  
  752. Syntax
  753.  
  754. ([Date: numeric]; [Type: enumeration])
  755.  
  756. Description
  757.  
  758. Return the name of a day of the week.
  759.  
  760. Example
  761.  
  762. vDate := DateAndTime (17; 2; 1996)
  763.  
  764. vWeekday := DateWeekdayName (vDate; Short!)
  765.  
  766. MessageBox (x; "Weekday"; vWeekday)
  767.  
  768. Result: Sat
  769.  
  770. Return Value
  771.  
  772. An empty string ("") is returned for an illegal date.
  773.  
  774. Parameters
  775.  
  776. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  777.  
  778. Type: enumeration (optional)    Default: Long!
  779.  
  780. Short! Weekday is abbreviated.
  781.  
  782. Long! Weekday is spelled out.
  783.  
  784. numeric := DateWeekOfYear
  785.  
  786. Syntax
  787.  
  788. ([Date: numeric]; [FirstDayOfWeek: enumeration])
  789.  
  790. Description
  791.  
  792. Return the week number for a specified date.
  793.  
  794. Examples
  795.  
  796. Type(DateWeekOfYear (Date:(DateAndTime (Day:31; Month:December!; Year:1999)); FirstDayOfWeek:Monday!))
  797.  
  798. // Result 53
  799.  
  800.  
  801.  
  802. Type(DateWeekOfYear (Date:(DateAndTime (Day:1; Month:January!; Year:1999)); FirstDayOfWeek:Monday!))
  803.  
  804. //Result 1
  805.  
  806. Return Value
  807.  
  808. Week number for a specified date. An error returns DateAndTime.Error!.
  809.  
  810. Parameters
  811.  
  812. Date: numeric (optional)    Date for which to return the week.
  813.  
  814. FirstDayOfWeek: enumeration (optional)    Day of the week that week starts on. If missing, Sunday! is used.
  815.  
  816. Sunday!
  817.  
  818. Monday!
  819.  
  820. Tuesday!
  821.  
  822. Wednesday!
  823.  
  824. Thursday!
  825.  
  826. Friday!
  827.  
  828. Saturday!
  829.  
  830. Note
  831.  
  832. * To pass a specific date and time, use the DateAndTime function.
  833. numeric := DateYear
  834.  
  835. Example
  836.  
  837. Syntax
  838.  
  839. ([Date: numeric])
  840.  
  841. Description
  842.  
  843. Return a value representing a year.
  844.  
  845. Example
  846.  
  847. vYear = DateYear (DateAndTime (Day:13; Month:May!; Year:1873))
  848.  
  849. MessageBox (x; "Year"; vYear)
  850.  
  851. // Result 1873
  852.  
  853. Return Value
  854.  
  855. Check for an error (illegal date) by comparing the return value to DateAndTime.Error!.
  856.  
  857. Parameters
  858.  
  859. Date: numeric (optional)    A number representing a date, or the system date if not used. For a number, see DateAndTime.
  860.  
  861. DDEExecute
  862.  
  863. Example
  864.  
  865. Syntax
  866.  
  867. (ConversationID: numeric; Command: string; [TimeOut: numeric] [;Label: label ])
  868.  
  869. Description
  870.  
  871. Send a command string to a server application.
  872.  
  873. See the server application's documentation for command names and syntax.
  874.  
  875. Return Value
  876.  
  877. If DDEExecute is unsuccessful, it returns an enumeration value of Error!. Otherwise, it returns the transaction ID.
  878.  
  879. Error!    The command was not successful
  880.  
  881. Parameters
  882.  
  883. ConversationID: numeric    A number that links the server and client applications. DDEInitiate returns ConversationID.
  884.  
  885. Command: string    A command to execute.
  886.  
  887. TimeOut: numeric    Asynchronous DDE: Set TimeOut to 0 or a negative value. DDE returns immediately, and notifies the macro that the command was delivered. When the server application acknowledges receiving the command, DDE notifies the macro and the macro calls Label. The return value is invalid for asynchronous DDE, because the server application has not yet processed the command.
  888.  
  889. Synchronous DDE: Set TimeOut to a positive integer, which specifies the maximum number of milliseconds to wait while the server application processes the command. The result is returned when the command is processed or DDE times out (command is not processed within the specified time). See Return Value above.
  890.  
  891. Label: label (optional)    The Label to call when the server application acknowledges receiving the command (see the TimeOut parameter above). If the Label statement does not include Return, macro behavior is unpredictable.
  892.  
  893. numeric := DDEInitiate
  894.  
  895. Example
  896.  
  897. Syntax
  898.  
  899. (ServiceName: string; TopicName: string)
  900.  
  901. Description
  902.  
  903. Start a DDE conversation with a server application, and return a conversation ID.
  904.  
  905. A conversation must be started between server and client applications before you can use commands such as DDEPoke, DDERequest, and DDEExecute.
  906.  
  907. Return Value
  908.  
  909. A number that links the server and client applications is returned, or Error! if the conversation is not started. The return value returns an enumeration if the operation is not successful.
  910.  
  911. Parameters
  912.  
  913. ServiceName: string    A DDE service name. See a server application's documentation.
  914.  
  915. "WPWin10_Macros (WordPerfect 10)
  916.  
  917. "WPWin9_Macros" (WordPerfect 9)
  918.  
  919. "WPWin8_Macros" (WordPerfect 8)
  920.  
  921. "Presentations" (Presentations 7)
  922.  
  923. "WPWin60_Macros" (WordPerfect 6.1)
  924.  
  925. TopicName: string    A topic name. See the server application's documentation.
  926.  
  927. "Commands" (WordPerfect 10)
  928.  
  929. "Commands" (WordPerfect 9)
  930.  
  931. "Commands" (WordPerfect 8)
  932.  
  933. "Command" (Presentations)
  934.  
  935. "Commands" (WordPerfect 6.1)
  936.  
  937. DDEPoke
  938.  
  939. Example
  940.  
  941. Syntax
  942.  
  943. (ConversationID: numeric; ItemName: string; ItemData: string; [;TimeOut: numeric or enumeration])
  944.  
  945. Description
  946.  
  947. Assign data to an item in a server application. Check your server application documentation to see if it supports XTYP_POKE transactions. Many applications do not.
  948.  
  949. Parameters
  950.  
  951. ConversationID: numeric    A number that links the server and client applications. DDEInitiate returns ConversationID.
  952.  
  953. ItemName: string    A server application item. See the server application's documentation for item names.
  954.  
  955. ItemData: string    The data to assign to a server application item.
  956.  
  957. TimeOut: numeric or enumeration [optional]    Lets you specify the maximum amount of time, in milliseconds, to wait for the poke operation to complete.
  958.  
  959. Standard! Wait 18000 milliseconds.
  960.  
  961. NoTimeOut! Use the maximum timeout value possible (approximately 24.8 days).
  962.  
  963. string := DDERequest
  964.  
  965. Example
  966.  
  967. Syntax
  968.  
  969. (ConversationID: numeric; ItemName: string [;TimeOut: numeric or enumeration])
  970.  
  971. Description
  972.  
  973. Get the contents of a server application item. Check your server application documentation to see if it supports XTYP_REQUEST transactions. Many applications do not.
  974.  
  975. Return Value
  976.  
  977. Contents of the server application item specified by ItemName.
  978.  
  979. Parameters
  980.  
  981. ConversationID: numeric    A number that links the server and client applications. DDEInitiate returns ConversationID.
  982.  
  983. ItemName: string    The name of a server application item.
  984.  
  985. Timeout: numeric or enumeration [optional]    Lets you specify the maximum amount of time, in milliseconds, to wait for the poke operation to complete.
  986.  
  987. Standard! Wait 18000 milliseconds.
  988.  
  989. NoTimeOut! Use the maximum timeout value possible (approximately 24.8 days).
  990.  
  991. DDETerminate
  992.  
  993. Example
  994.  
  995. Syntax
  996.  
  997. ([ConversationID: numeric])
  998.  
  999. Description
  1000.  
  1001. End a DDE conversation with a server application.
  1002.  
  1003. Parameter
  1004.  
  1005. ConversationID: numeric [optional]    A number that links the server and client applications. DDEInitiate returns ConversationID.
  1006.  
  1007. Note
  1008.  
  1009. * If you omit the ConversationID parameter, then DDETerminate terminates all conversations.
  1010. DDETerminateAll
  1011.  
  1012. Example
  1013.  
  1014. Syntax
  1015.  
  1016. ()
  1017.  
  1018. Description
  1019.  
  1020. End all DDE conversations.
  1021.  
  1022. Declare
  1023.  
  1024. Example
  1025.  
  1026. Syntax
  1027.  
  1028. ({<VariableName> variable := <Value> any})
  1029.  
  1030. Description
  1031.  
  1032. Create a local variable or array, which stores as many variables, constants, or expressions as memory allows.
  1033.  
  1034. An array can have up to 10 dimensions, and up to 32,767 elements per dimension depending on the amount of available memory. In the following example, Declare creates ArrayA with 10 elements and ArrayB with five elements. An element in each array is assigned a value. Parentheses are optional.
  1035.  
  1036. Examples
  1037.  
  1038. Declare(ArrayA[10]; ArrayB[5])
  1039.  
  1040. ArrayA[3] := "John"
  1041.  
  1042. Explanation: Assigns "John" to the third element in ArrayA.
  1043.  
  1044. ArrayB[5] := ArrayA[3]
  1045.  
  1046. Explanation: Assigns "John" to the fifth element in ArrayB.
  1047.  
  1048. In the next example, Declare creates a two-dimensional array (ArrayC) with 100 elements (10 rows and 10 columns). One element is assigned a value.
  1049.  
  1050. Declare ArrayC[10;10]
  1051.  
  1052. ArrayC[2;3] := 3+6
  1053.  
  1054. Explanation: Assigns 9 to the element at row 2, column 3.
  1055.  
  1056. Parameters
  1057.  
  1058. <VariableName> variable    The name of a local variable or array. Use a semicolon to separate names when declaring more than one variable or array. If an array is declared, enclose the array indices in brackets. Use a semicolon to separate elements in a multi-dimensional array.
  1059.  
  1060. <Value> any (optional)    The value assigned to <Variable> at the time of declaration. For example, Persist vTest = 20. vTest equals 20 at run time. If missing, the value of <Variable> is undefined.
  1061.  
  1062. Default
  1063.  
  1064. Example
  1065.  
  1066. Specify the code to execute when no CaseOF <Selector> matches the control expression in a Switch statement. See Switch.
  1067.  
  1068. enumeration := DefaultUnits
  1069.  
  1070. Example
  1071.  
  1072. Syntax
  1073.  
  1074. ([Units: enumeration])
  1075.  
  1076. Description
  1077.  
  1078. Specify the default unit of measure, and return the previous unit of measure. You can set a new value, and then restore the previous value.
  1079.  
  1080. Examples
  1081.  
  1082. In the first example, Advance uses the default unit of measure (WPUnits!). In the second, Advance overrides the default unit of measure and uses inches. In the third, DefaultUnits specifies centimeters as the default unit of measure.
  1083.  
  1084. Advance(AdvanceFromTop!; 4)
  1085.  
  1086. Explanation: Advance insertion point 4 WPUnits.
  1087.  
  1088. Advance(AdvanceFromTop!; 4")
  1089.  
  1090. Explanation: Advance insertion point 4 inches.
  1091.  
  1092. DefaultUnits(Centimeters!)
  1093.  
  1094. Advance(AdvanceFromTop!; 4)
  1095.  
  1096. Explanation: Advance insertion point 4 centimeters.
  1097.  
  1098. The default unit of measure is effective until changed by another DefaultUnits command. If not specified by DefaultUnits, the default unit of measure is WPUnits!.
  1099.  
  1100. Discussion
  1101.  
  1102. None! has been added to the list of possible units. Normally, when a non-units value such as 1200 is combined with a units value such as 1.0C, the non-units value assumes the default unit type. If the default unit type is WPUnits,
  1103.  
  1104. 1.0C + 1200 = 3.54C (1200 WPUnits = 2.54C)
  1105.  
  1106. If, however, the default unit is set to None!, the non-units value assumes the unit type of the value it is combined with (no conversion is performed). For example,
  1107.  
  1108. 1.0C + 1200 = 1201.0C
  1109.  
  1110. With the default unit set to None!, 1200 assumes the unit type of centimeter.
  1111.  
  1112. Return Values
  1113.  
  1114. The previous unit value.
  1115.  
  1116. None!
  1117.  
  1118. Centimeters!
  1119.  
  1120. Inches!
  1121.  
  1122. Millimeters!
  1123.  
  1124. NoChange!
  1125.  
  1126. Points!
  1127.  
  1128. WPUnits!
  1129.  
  1130. Parameters
  1131.  
  1132. Units: enumeration (optional)    The default unit of measure. If missing, the NoChange! is returned.
  1133.  
  1134. None!
  1135.  
  1136. Centimeters!
  1137.  
  1138. Inches!
  1139.  
  1140. Millimeters!
  1141.  
  1142. NoChange! (Return the current default units: new default units type is not changed.)
  1143.  
  1144. Points! (One Point equals 1/72 of an inch)
  1145.  
  1146. WPUnits! (One WordPerfect unit equals 1/1200 of an inch)
  1147.  
  1148. WP1200ths! (Synonym for WPUnits!)
  1149.  
  1150. numeric := DegreesToRadians
  1151.  
  1152. Syntax
  1153.  
  1154. (Degrees: numeric)
  1155.  
  1156. Description
  1157.  
  1158. Convert an angle in degrees to radians.
  1159.  
  1160. Examples
  1161.  
  1162. Type (DegreesToRadians (Degrees:180))
  1163.  
  1164. //Returns: 3.14159265358979
  1165.  
  1166.  
  1167.  
  1168. Type (DegreesToRadians (Degrees:360))
  1169.  
  1170. //Returns: 6.28318530717959
  1171.  
  1172.  
  1173.  
  1174. Type (DegreesToRadians (Degrees:0))
  1175.  
  1176. //Returns: 0.0
  1177.  
  1178. Return Value
  1179.  
  1180. Angle in radians.
  1181.  
  1182. Parameters
  1183.  
  1184. Degrees: numeric    The angle in degrees.
  1185.  
  1186. boolean := DeleteDirectory
  1187.  
  1188. Example
  1189.  
  1190. Syntax
  1191.  
  1192. (DirectoryName: string; [Prompts: enumeration])
  1193.  
  1194. Description
  1195.  
  1196. Delete a directory.
  1197.  
  1198. Return Value
  1199.  
  1200. True if successful, False if not.
  1201.  
  1202. Parameters
  1203.  
  1204. DirectoryName: string    Include the full path.
  1205.  
  1206. Prompts: enumeration (optional)    Default: NoPrompts!
  1207.  
  1208. NoPrompts!
  1209.  
  1210. Prompts! Prompt if the directory does not exist.
  1211.  
  1212. boolean := DeleteFile
  1213.  
  1214. Example
  1215.  
  1216. Syntax
  1217.  
  1218. (Filename: string; [Prompts: enumeration])
  1219.  
  1220. Description
  1221.  
  1222. Delete a file(s).
  1223.  
  1224. Return Value
  1225.  
  1226. True if successful, False if not.
  1227.  
  1228. Parameters
  1229.  
  1230. Filename: string    Include the full path and filename. Use with caution. If you do not specify a file, all files in the directory are deleted.
  1231.  
  1232. Prompts: enumeration (optional)    Default: NoPrompts!
  1233.  
  1234. NoPrompts!
  1235.  
  1236. Prompts! Prompt if the file does not exist.
  1237.  
  1238. string := DialogAddBitmap
  1239.  
  1240. Example
  1241.  
  1242. Syntax
  1243.  
  1244. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; FileName: string; [Name: string]; [TransparentColor: numeric])
  1245.  
  1246. Description
  1247.  
  1248. Add a bitmap control to a dialog box. After DialogLoad or DialogShow, bitmap controls can be added to a dialog created with the Dialog Editor.
  1249.  
  1250. Note
  1251.  
  1252. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1253.  
  1254. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1255.  
  1256. Return Value
  1257.  
  1258. Name of the control if successful, an empty string ("") if not. This same value is placed into the MacroDialogResult variable.
  1259.  
  1260. Parameters
  1261.  
  1262. Dialog: String    The name or number of the dialog box to contain the bitmap control (see DialogDefine).
  1263.  
  1264. Control: string    A name or number that identifies the bitmap control (the "Named region" of a control created with the Dialog Editor).
  1265.  
  1266. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the bitmap.
  1267.  
  1268. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the bitmap.
  1269.  
  1270. Width: numeric (optional)    The width of the bitmap control in dialog units.
  1271.  
  1272. Height: numeric (optional)    The height of the bitmap control in dialog units.
  1273.  
  1274. Style: enumeration (optional)    Lets you specify how to display the bitmap and the style of the bitmap control. New enumerations have been added that cause the same behavior that was specified by leaving this parameter off in previous versions. If this parameter is missing, NoResize! | Opaque! is used.
  1275.  
  1276. NoResize! (Don't resize the bitmap to fit the control and don't resize the control to fit the bitmap.)
  1277.  
  1278. Opaque! (The background is drawn with an opaque background, rather than transparent.)
  1279.  
  1280. SizeCtlToBmp!
  1281.  
  1282. SizeBmpToCtl!
  1283.  
  1284. Transparent!
  1285.  
  1286. FileName: string    The path and filename of a bitmap file, or resource file such as a .dll. If "" or "0", and the Name parameter are missing, no bitmap is loaded and the bitmap control is cleared to nothing. If the Name parameter is missing, the Filename parameter is the name of the bitmap (bmp) file loaded from disk. Otherwise, the Filename parameter is the name of a .dll file that contains a bitmap resource to load. If the Filename parameter is "" or "0", the PFIT90EN.dll file is used. If the Filename parameter is a number other than "0", it is the instance handle of a previously loaded .dll. If the specified bitmap is not found, a special bitmap is displayed to indicate an error.
  1287.  
  1288. Name: string (optional)    Specify a bitmap in a resource file such as "#1". If the Name parameter begins with "#", the reaminder is assumed to be an integer which is the resource id of the bitmap to load. Otherwise, the Name parameter is the resource name of the bitmap to load. I fthe specified bitmap is not found, a special bitmap is displayed to indicate an error.
  1289.  
  1290. TransparentColor: enueration (optional)    Any color between 0 and 16,777,215 (0 is black). Colors are based on RGB colors. If the Style parameter is Transparent!, this parameter defines what color is to be used as the transparent color. The parameter may be specified as a numeric value of the colors specified as an RGB value, with the red component value of 0 to 255 in bits 0-7, the green component value of 0 to 255 in bits 8-15, and the blue component value of 0 to 255 in bits 16-23 (and 0 in bits 24-31) or a predefined enumeration may be specified that defines the RGB value of some predefined colors. 
  1291.  
  1292.  
  1293.  
  1294. White! An RGB color value of 00FFFFFFx
  1295.  
  1296. Black! An RGB color value of 00000000x
  1297.  
  1298. Red! An RGB color value of 000000FFx
  1299.  
  1300. Green! An RGB color value of 0000FF00x
  1301.  
  1302. Blue! An RGB color value of 00FF0000x
  1303.  
  1304. Cyan! An RGB color value of 00FFFF00x
  1305.  
  1306. Yellow! An RGB color value of 00FFFF00x
  1307.  
  1308. Magenta! An RGB color value of 00FF00FFx
  1309.  
  1310. Orange! An RGB color value of 000080FFx
  1311.  
  1312. Purple! An RGB color value of 00800080x
  1313.  
  1314. Gray25! An RGB color value of 00C0C0C0x
  1315.  
  1316. Gray50! An RGB color value of 00808080x
  1317.  
  1318. Gray75! An RGB color value of 00404040x
  1319.  
  1320. string := DialogAddCheckBox
  1321.  
  1322. Example
  1323.  
  1324. Syntax
  1325.  
  1326. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; Text: string; MacroVar: Variable; [Style: enumeration])
  1327.  
  1328. Description
  1329.  
  1330. Add a check box control to a dialog box. After DialogLoad or DialogShow, a check box can be added to a dialog created with the Dialog Editor.
  1331.  
  1332. Note
  1333.  
  1334. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1335.  
  1336. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1337.  
  1338. Return Value
  1339.  
  1340. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1341.  
  1342. Parameters
  1343.  
  1344. Dialog: string    The name or number of the dialog box to contain the check box control (see DialogDefine).
  1345.  
  1346. Control: string    A name or number that identifies the check box control (the "Named region" of a control created with the Dialog Editor).
  1347.  
  1348. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the check box.
  1349.  
  1350. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the check box.
  1351.  
  1352. Width: numeric (optional)    The width of the check box control in dialog units.
  1353.  
  1354. Height: numeric (optional)    The height of the check box control in dialog units.
  1355.  
  1356. Text: string    The text displayed to the right of the check box, unless TextOnLeft! style is used. See Style below.
  1357.  
  1358. MacroVar: variable    1 is returned in this variable when the check box is checked, and 0 when it is not checked. The default value is 0. If MacroVar is assigned a value greater than 0 before the check box is added, the check box is checked when the dialog box is displayed.
  1359.  
  1360. Style: enumeration (optional)    Specifies the style of the checkbox to add. If this is missing, then CheckboxAuto! | TextOnRight! is used. Checkbox styles are mutually exclusive (choose only one).
  1361.  
  1362. CheckboxAuto! Toggles between check and clear.
  1363.  
  1364. Checkbox! Can be one of two states: check or clear. See RegionSetCheck.
  1365.  
  1366. Checkbox3State! Can be one of three states: check, clear, or gray. See RegionSetCheck.
  1367.  
  1368. CheckboxAuto3State! Toggles between check, clear, and gray.
  1369.  
  1370. TextOnLeft! Positions text to the left of the check box.
  1371.  
  1372. TextOnRight! Positions text to the right of the check box.
  1373.  
  1374. string := DialogAddColorWheel
  1375.  
  1376. Example
  1377.  
  1378. Syntax
  1379.  
  1380. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; MacroVar: variable)
  1381.  
  1382. Description
  1383.  
  1384. Add a color wheel control to a dialog box, and return a number that represents the selected color when the dialog is dismissed. After DialogShow or DialogLoad, a color wheel can be added to a dialog created with the Dialog Editor.
  1385.  
  1386. The color selection consists of three color elements (red, green, and blue), separated into color values by the formula given below (see the MacroVar parameter below). These values are used in Windows programming to specify the color of a pen or brush.
  1387.  
  1388. Note
  1389.  
  1390. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1391.  
  1392. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1393.  
  1394. Return Value
  1395.  
  1396. Name of the control if successful, an empty string ("") if not. This same value is placed into the MacroDialogResult variable.
  1397.  
  1398. Parameters
  1399.  
  1400. Dialog: string    The name or number of the dialog box to contain the color wheel control (see DialogDefine).
  1401.  
  1402. Control: string    A name or number that identifies the color wheel control (the "Named region" of a control created with the Dialog Editor).
  1403.  
  1404. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the color wheel control.
  1405.  
  1406. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the color wheel control.
  1407.  
  1408. Width: numeric (optional)    The width of the color wheel control in dialog units.
  1409.  
  1410. Height: numeric (optional)    The height of the color wheel control in dialog units.
  1411.  
  1412. MacroVar: variable    A number corresponding to a color selection is returned in this variable. This number can be divided into three other numbers which correspond to red, green, and blue. The formulas are:
  1413.  
  1414. vRed := MacroVar % 256 (vRed contains the red component, which is the remainder of MacroVar divided by 256)
  1415.  
  1416. vGreen := MacroVar / 256 % 256 (vGreen contains the green component, which is the remainder of MacroVar divided by 256 divided by 256)
  1417.  
  1418. vBlue := MacroVar / 256 / 256 (vBlue contains the blue component, which is the result of MacroVar divided by 256 divided by 256)
  1419.  
  1420. Preselect a color by assigning its value to MacroVar before adding the color wheel control.
  1421.  
  1422. string := DialogAddComboBox
  1423.  
  1424. Example
  1425.  
  1426. Syntax
  1427.  
  1428. (Dialog: string; Control: string; numeric; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; MacroVar: variable; [LimitText: numeric])
  1429.  
  1430. Description
  1431.  
  1432. Add a combo box control to a dialog box. After DialogShow or DialogLoad, a combo box can be added to a dialog created with the Dialog Editor.
  1433.  
  1434. The combo box displays an edit box and a list box. You enter text in the edit box, or double-click a list item to insert it. Use DialogAddListItem to create list box items.
  1435.  
  1436. Note
  1437.  
  1438. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1439.  
  1440. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1441.  
  1442. Example
  1443.  
  1444. Sort! | Simple!
  1445.  
  1446. Explanation: Name search allowed on a sorted list box. A vertical scrollbar automatically appears when needed.
  1447.  
  1448. Return Value
  1449.  
  1450. Name of the item added to the combo box control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1451.  
  1452. Parameters
  1453.  
  1454. Dialog: string    The name or number of the dialog box to contain the combo box control (see DialogDefine).
  1455.  
  1456. Control: string    A name or number that identifies the combo box control (the "Named region" of a control created with the Dialog Editor).
  1457.  
  1458. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the combo box.
  1459.  
  1460. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the combo box.
  1461.  
  1462. Width: numeric (optional)    The width of the combo box control in dialog units.
  1463.  
  1464. Height: numeric (optional)    The height of the combo box control in dialog units.
  1465.  
  1466. Style: enumeration (optional)    Specifies the style of the combo box to add. If missing, then Sorted! Is used. The first three styles are exclusive (choose only one). Type | between enumerations to combine styles.
  1467.  
  1468. Dropdown! Display an edit control. Clicking the arrow to the right of the edit control displays a drop-down list box.
  1469.  
  1470. Droplist! Display a read-only edit control. Clicking the arrow to the right of the edit control displays a drop-down list box.
  1471.  
  1472. Simple! Display an edit control and an opened drop-down list box.
  1473.  
  1474. Unsorted! Items are not sorted.
  1475.  
  1476. Sorted! Items are sorted alphabetically. If Sorted! is used by itself, Simple! Is the default combo box style. This is the same as the obsolete enumeration Sort! See DialogAddListItem.
  1477.  
  1478. WPChars! Non-keyboard characters allowed in a list item. See DialogAddListItem.
  1479.  
  1480. AutoHScroll! Automatic horizontal scrolling.
  1481.  
  1482. OEMConvert! Convert ANSI to OEM character set.
  1483.  
  1484. MacroVar: variable    The selected combo box item is returned in this variable. An item can be assigned to MacroVar before the control is added to a dialog.
  1485.  
  1486. LimitText: numeric (optional)    The maximum number of characters the edit control accepts, up to the number of characters that fit in the edit box. This number has no effect if you choose style DropList!.
  1487.  
  1488. string := DialogAddControl
  1489.  
  1490. Syntax
  1491.  
  1492. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; Class: string; [Style: numeric]; WindowName: string; [MacroVar: variable]; [Instance: numeric])
  1493.  
  1494. Description
  1495.  
  1496. Add a custom control to a dialog box. After DialogShow or DialogLoad, a custom control can be added to a dialog created with the Dialog Editor.
  1497.  
  1498. The macro system knows nothing about custom controls. The user is responsible for all control message processing and queries.
  1499.  
  1500. Note
  1501.  
  1502. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1503.  
  1504. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1505.  
  1506. Return Value
  1507.  
  1508. Name of the control added to the dialog box if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1509.  
  1510. Parameters
  1511.  
  1512. Dialog: string    The name or number of the dialog box to contain the custom control (see DialogDefine).
  1513.  
  1514. Control: string    A name or number that identifies the custom control (the "Named region" of a control created with the Dialog Editor).
  1515.  
  1516. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the custom control.
  1517.  
  1518. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the custom control.
  1519.  
  1520. Width: numeric (optional)    The width of the custom control in dialog units.
  1521.  
  1522. Height: numeric (optional)    The height of the custom control in dialog units.
  1523.  
  1524. Class: string    The name of the control class. Standard Windows classes include Button, ComboBox, Edit, ListBox, ScrollBar, and Static. Other controls such as Meters and Spin buttons must be defined in a DLL (see the Instance parameter below).
  1525.  
  1526. Style: numeric (optional)    A number that defines a valid style within the control Window class. For example, an edit control includes styles such as left, multiline, and password. The values for standard Windows styles are in the Windows SDK. If missing, no style bits are specified for this control.
  1527.  
  1528. WindowName: string    The control text. For example, the text that appears on a button control. Set this value to "" if the control does not accept text.
  1529.  
  1530. MacroVar: variable (optional)    The value returned by a control. This variable is retained for backward compatibility. You must query the control to retrieve needed values.
  1531.  
  1532. Instance: numeric (optional)    This parameter is retained for backward compatibility. If the DLL is loaded, the macro should be able to locate the control.
  1533.  
  1534. string := DialogAddCounter
  1535.  
  1536. Example
  1537.  
  1538. Syntax
  1539.  
  1540. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: Numeric]; [Format: enumeration]; MacroVar: variable; [CountMin: any]; [CountMax: any]; [CountStep: any])
  1541.  
  1542. Description
  1543.  
  1544. Add a counter control to a dialog box. After DialogShow or DialogLoad, a counter can be added to a dialog created with the Dialog Editor.
  1545.  
  1546. Click the counter button to insert a number in the edit box that is within a specified range (see the CountMin and CountMax parameters below).
  1547.  
  1548. Note
  1549.  
  1550. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1551.  
  1552. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1553.  
  1554. Return Value
  1555.  
  1556. Name of the control if successful, an empty string ("") if not. This same value is placed into the MacroDialogResult variable.
  1557.  
  1558. Parameters
  1559.  
  1560. Dialog: string    The name or number of the dialog box to contain the counter control (see DialogDefine).
  1561.  
  1562. Control: string    A name or number that identifies the counter control (the "Named region" of a control created with the Dialog Editor).
  1563.  
  1564. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the counter control.
  1565.  
  1566. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the counter control.
  1567.  
  1568. Width: numeric (optional)    The width of the counter control in dialog units.
  1569.  
  1570. Height: numeric (optional)    The height of the counter control in dialog units.
  1571.  
  1572. Format: enumeration (optional)    Specify counters of various unit values. When a value is entered without a unit of measure (24 instead of 24i), the value assumes the specified counter unit (not the default unit type). Use only one of the following enumerations.
  1573.  
  1574. DisplayNormal! (-2147483647 to 2147483647)
  1575.  
  1576. DisplayWPU! (-2147483647 to 2147483647)
  1577.  
  1578. DisplayPoints! (-4294967.0 to 4294966.0)
  1579.  
  1580. DisplayCentimeters! (-151518.0 to 151519.0)
  1581.  
  1582. DisplayFixedPoint! (-32767.0 to 32767.0)
  1583.  
  1584. DisplayPercent! (-2147483647 to 2147483647)
  1585.  
  1586. DisplayInches! (-59651.0 to 59652.0)
  1587.  
  1588. DisplayInches2! (-59651.0 to 59652.0)
  1589.  
  1590. DisplayMillimeters! (-1515513.0 to 1515514.0)
  1591.  
  1592. DisplayI_Inches (-59651.0 to 59652.0)
  1593.  
  1594. You can use any combination of the following enumerations with any of the above enumerations.
  1595.  
  1596. AutoHScroll!
  1597.  
  1598. NoScroll!
  1599.  
  1600. AutoValidate!
  1601.  
  1602. Type | between enumerations to combine enumerations.
  1603.  
  1604. MacroVar: variable    The selected counter number is returned in this variable. A number can be assigned to MacroVar before the dialog is displayed.
  1605.  
  1606. CountMin: any (optional)    The minimum number that you can insert by clicking the counter button. The range of values for CountMin is between -32767.0 to 32767.0
  1607.  
  1608. CountMax: any (optional)    The maximum number that you can insert by clicking the counter button. The range of values for CountMax is between -32767.0 to 32767.0
  1609.  
  1610. CountStep: any (optional)    The increment and decrement step value. Out-of-range values are replaced by the minimum or maximum values.
  1611.  
  1612. string := DialogAddDate
  1613.  
  1614. Example
  1615.  
  1616. Syntax
  1617.  
  1618. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; Style: enumeration; MacroVar: variable; [Year: numeric]; [Month: enumeration]; [Day: numeric])
  1619.  
  1620. Description
  1621.  
  1622. Add a date to a dialog box. After DialogShow or DialogLoad, a date can be added to a dialog created with the Dialog Editor.
  1623.  
  1624. Note
  1625.  
  1626. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1627.  
  1628. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1629.  
  1630. Return Value
  1631.  
  1632. Date added to the dialog box if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1633.  
  1634. Parameters
  1635.  
  1636. Dialog: string    The name or number of the dialog box to contain the date control (see DialogDefine).
  1637.  
  1638. Control: string    A name or number that identifies the date control (the "Named region" of a control created with the Dialog Editor).
  1639.  
  1640. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the date.
  1641.  
  1642. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the date.
  1643.  
  1644. Width: numeric (optional)    The width of the date control in dialog units.
  1645.  
  1646. Height: numeric (optional)    The height of the date control in dialog units.
  1647.  
  1648. Style: enumeration (optional)    Determine whether the date is valid.
  1649.  
  1650. NoValidate! The contents of the edit field in the date control will not be validated, and will accept any string.
  1651.  
  1652. Validate! Validate the contents of the edit field in the date control for a valid date.
  1653.  
  1654. MacroVar: variable    The initial value when the control is displayed, and the value of the control when the dialog is dismissed.
  1655.  
  1656. Year: numeric (optional)    The number representing the year.
  1657.  
  1658. Month: enumeration (optional)    January!
  1659.  
  1660. February!
  1661.  
  1662. March!
  1663.  
  1664. April!
  1665.  
  1666. May!
  1667.  
  1668. June!
  1669.  
  1670. July!
  1671.  
  1672. August!
  1673.  
  1674. September!
  1675.  
  1676. October!
  1677.  
  1678. November!
  1679.  
  1680. December!
  1681.  
  1682. Day: numeric (optional)    The number representing the day.
  1683.  
  1684. string := DialogAddEditBox
  1685.  
  1686. Example
  1687.  
  1688. Syntax
  1689.  
  1690. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; MacroVar: variable; [LimitText: numeric])
  1691.  
  1692. Description
  1693.  
  1694. Add an edit control to a dialog box. After DialogShow, an edit box can be added to a dialog created with the Dialog Editor.
  1695.  
  1696. The text entered in the edit box is returned in MacroVar when the dialog is dismissed (see MacroVar parameter).
  1697.  
  1698. Note
  1699.  
  1700. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1701.  
  1702. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1703.  
  1704. Return Value
  1705.  
  1706. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1707.  
  1708. Parameters
  1709.  
  1710. Dialog: string    The name or number of the dialog box to contain the edit control (see DialogDefine).
  1711.  
  1712. Control: string    A name or number that identifies the edit control (the "Named region" of a control created with the Dialog Editor).
  1713.  
  1714. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the edit control.
  1715.  
  1716. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the edit control.
  1717.  
  1718. Width: numeric (optional)    The width of the edit control in dialog units.
  1719.  
  1720. Height: numeric (optional)    The height of the edit control in dialog units.
  1721.  
  1722. Style: enumeration (optional)    The edit control styles. Type | between enumerations to combine styles. Not all combinations are possible.
  1723.  
  1724. Left! Text is left justified.
  1725.  
  1726. Right! Text is right justified if Multiline! style is set and WPChars! style is not set.
  1727.  
  1728. Center! Text is centered if Multiline! style is set and WPChars! style is not set.
  1729.  
  1730. VScroll! Edit control with a vertical scroll bar. Use with Multiline!
  1731.  
  1732. HScroll! Edit control with a horizontal scroll bar. Use with Multiline! or WPChars!.
  1733.  
  1734. WPChars! Can display WP Character box (press Ctrl+W). Non-keyboard characters are allowed.
  1735.  
  1736. Multiline! Multiple lines of input automatically wrap to the next line. Press Enter to cause the default button action (see DialogAddPushButton). If Enter2Hrtn! style is set in DialogDefine, press Enter to move the insertion point to the next line.
  1737.  
  1738. Uppercase! Text is automatically converted to uppercase.
  1739.  
  1740. Lowercase! Text is automatically converted to lowercase.
  1741.  
  1742. Password! Text is automatically displayed with asterisk (*) characters. The actual characters are stored by the edit control.
  1743.  
  1744. WordWrap! Text wraps if Multiline! is set.
  1745.  
  1746. SoftRet! Text contains Soft Return codes [SRt].
  1747.  
  1748. Attributes! Underline (press Ctrl+U) and italics (press Ctrl+I) are allowed if WPChars! Style is set.
  1749.  
  1750. NoTabs! Tab codes are not exported with output.
  1751.  
  1752. NoWPChar! Cannot display WP Character dialog box. Non-keyboard characters are not allowed.
  1753.  
  1754. AutoVScroll! Automatic vertical scrolling.
  1755.  
  1756. AutoHScroll! Automatic horizontal scrolling.
  1757.  
  1758. OEMConvert! Convert ANSI to OEM character set.
  1759.  
  1760. ReadOnly! Edit control is read only.
  1761.  
  1762. WantReturn! Pressing Enter produces a hard return. Use with Multiline!.
  1763.  
  1764. MacroVar: variable    The text entered in the edit box is returned in this variable. Text can be assigned to MacroVar before the dialog is displayed.
  1765.  
  1766. LimitText: numeric    The maximum number of characters the edit control accepts.
  1767.  
  1768. string := DialogAddFileNameBox
  1769.  
  1770. Example
  1771.  
  1772. Syntax
  1773.  
  1774. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; MacroVar: variable; [DefaultDir: string]; [Template: string])
  1775.  
  1776. Description
  1777.  
  1778. Add a filename edit control to a dialog box. After DialogShow or DialogLoad, a filename box can be added to a dialog created with the Dialog Editor.
  1779.  
  1780. The filename edit control consists of an edit control and a button control. Clicking the button displays the Select Directory or Select File dialog box depending on the control style (see the Style parameter).
  1781.  
  1782. Note
  1783.  
  1784. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1785.  
  1786. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1787.  
  1788. Return Value
  1789.  
  1790. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1791.  
  1792. Parameters
  1793.  
  1794. Dialog: string    The name or number of the dialog box to contain the filename edit control (see DialogDefine).
  1795.  
  1796. Control: string    A name or number that identifies the filename edit control (the "Named region" of a control created with the Dialog Editor).
  1797.  
  1798. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the filename edit control.
  1799.  
  1800. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the filename edit control.
  1801.  
  1802. Width: numeric (optional)    The width of the filename edit control in dialog units.
  1803.  
  1804. Height: numeric (optional)    The height of the filename edit control in dialog units.
  1805.  
  1806. Style: enumeration (optional)    The filename edit control styles. Default: FilesAndDirs!. Type | between enumerations to combine styles.
  1807.  
  1808. FilesAndDirs! Directories and filenames are allowed.
  1809.  
  1810. DirOnly! Only directories are allowed.
  1811.  
  1812. FileDoesntHaveToExist!
  1813.  
  1814. MacroVar: variable    The directory or filename entered in the edit box is returned in this variable. A name can be assigned to MacroVar before the macro is displayed.
  1815.  
  1816. DefaultDir: string (optional)    The default directory when the Select File dialog box is displayed.
  1817.  
  1818. Template: string (optional)    The filenames to display in the Select File dialog box. For example, "*.*" (all files) and "*.bat" (all batch files).
  1819.  
  1820. string := DialogAddFrame
  1821.  
  1822. Example
  1823.  
  1824. Syntax
  1825.  
  1826. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration])
  1827.  
  1828. Description
  1829.  
  1830. Add a frame to a dialog box. After DialogShow or DialogLoad, a frame can be added to a dialog created with the Dialog Editor.
  1831.  
  1832. You can combine frame styles by creating two frames the same size and at the same position. For example, you can create a black frame and a white-filled frame (see the Control and Style parameters). You can also create custom controls by combining frames and QuickSpots (see DialogAddHotSpot and DialogShow).
  1833.  
  1834. Note
  1835.  
  1836. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1837.  
  1838. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1839.  
  1840. Examples
  1841.  
  1842. Frame! | White!
  1843.  
  1844. Explanation: White frame is displayed.
  1845.  
  1846. Filled! | White!
  1847.  
  1848. Explanation: White-filled frame is displayed.
  1849.  
  1850. Return Value
  1851.  
  1852. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1853.  
  1854. Parameters
  1855.  
  1856. Dialog: string    The name or number of the dialog box to contain the frame control (see DialogDefine).
  1857.  
  1858. Control: string    A name or number that identifies the frame control (the "Named region" of a control created with the Dialog Editor).
  1859.  
  1860. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the frame control.
  1861.  
  1862. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the frame control.
  1863.  
  1864. Width: numeric (optional)    The width of the frame control in dialog units.
  1865.  
  1866. Height: numeric (optional)    The height of the frame control in dialog units.
  1867.  
  1868. Style: enumeration (optional)    The frame styles. Type | between enumerations to combine styles. Not all combinations are possible.
  1869.  
  1870. Frame! Frame only.
  1871.  
  1872. Black! Black frame.
  1873.  
  1874. Gray! Gray frame. Gray is the default DeskTop color of the Windows Default color scheme. To select a different color, choose Colors in the Windows Control Panel.
  1875.  
  1876. White! White frame.
  1877.  
  1878. Filled! Filled frame.
  1879.  
  1880. string := DialogAddGroupBox
  1881.  
  1882. Example
  1883.  
  1884. Syntax
  1885.  
  1886. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; Title: string)
  1887.  
  1888. Description
  1889.  
  1890. Draw a rectangle around related dialog controls such as buttons. After DialogShow or DialogLoad, a group box can be added to a dialog created with the Dialog Editor.
  1891.  
  1892. Grouping related controls helps narrow user options.
  1893.  
  1894. Note
  1895.  
  1896. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1897.  
  1898. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1899.  
  1900. Return Value
  1901.  
  1902. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1903.  
  1904. Parameters
  1905.  
  1906. Dialog: string    The name or number of the dialog box to contain the group box control (see DialogDefine).
  1907.  
  1908. Control: string    A name or number that identifies the group box control (the "Named region" of a control created with the Dialog Editor).
  1909.  
  1910. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the group box control.
  1911.  
  1912. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the group box control.
  1913.  
  1914. Width: numeric (optional)    The width of the group box control in dialog units.
  1915.  
  1916. Height: numeric (optional)    The height of the group box control in dialog units.
  1917.  
  1918. Title: string    The title displayed at the top-left corner.
  1919.  
  1920. string := DialogAddHLine
  1921.  
  1922. Example
  1923.  
  1924. Syntax
  1925.  
  1926. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Length: numeric])
  1927.  
  1928. Description
  1929.  
  1930. Add a horizontal line to a dialog box. After DialogShow or DialogLoad, a horizontal line can be added to a dialog created with the Dialog Editor.
  1931.  
  1932. Note
  1933.  
  1934. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1935.  
  1936. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1937.  
  1938. Return Value
  1939.  
  1940. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1941.  
  1942. Parameters
  1943.  
  1944. Dialog: string    The name or number of the dialog box to contain the horizontal line control (see DialogDefine).
  1945.  
  1946. Control: string    A name or number that identifies the horizontal line control (the "Named region" of a control created with the Dialog Editor).
  1947.  
  1948. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the horizontal line control.
  1949.  
  1950. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the horizontal line control.
  1951.  
  1952. Length: numeric (optional)    The length of the horizontal line control in dialog units.
  1953.  
  1954. string := DialogAddHotSpot
  1955.  
  1956. Example%DialogAddHotspotExample>sample
  1957.  
  1958. Syntax
  1959.  
  1960. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration])
  1961.  
  1962. Description
  1963.  
  1964. Create an invisible area (QuickSpot) in a dialog box that closes the dialog box when clicked. After DialogShow or DialogLoad, a QuickSpot can be added to a dialog created with the Dialog Editor.
  1965.  
  1966. Other responses are possible when you use DialogAddHotSpot with a callback function (see DialogShow).
  1967.  
  1968. To create a QuickSpot within a frame (see DialogAddFrame), overlap size and position parameters.
  1969.  
  1970. Note
  1971.  
  1972. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  1973.  
  1974. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  1975.  
  1976. Return Value
  1977.  
  1978. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  1979.  
  1980. Parameters
  1981.  
  1982. Dialog: string    The name or number of the dialog box to contain the QuickSpot control (see DialogDefine).
  1983.  
  1984. Control: string    A name or number that identifies the QuickSpot control (the "Named region" of a control created with the Dialog Editor). The Control value is returned in the implicit variable MacroDialogResult (see DialogAddPushButton or DialogDefine) if the user chooses the QuickSpot to dismiss the dialog box.
  1985.  
  1986. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the QuickSpot control.
  1987.  
  1988. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the QuickSpot control.
  1989.  
  1990. Width: numeric (optional)    The width of the QuickSpot control in dialog units.
  1991.  
  1992. Height: numeric (optional)    The height of the QuickSpot control in dialog units.
  1993.  
  1994. Style: enumeration (optional)    The QuickSpot styles.
  1995.  
  1996. Click! Single click closes dialog box.
  1997.  
  1998. DblClick! Double click closes dialog box.
  1999.  
  2000. string := DialogAddIcon
  2001.  
  2002. Syntax
  2003.  
  2004. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; IconName: string; [Instance: numeric])
  2005.  
  2006. Description
  2007.  
  2008. Add an icon to a dialog box. After DialogShow or DialogLoad, an icon can be added to a dialog created with the Dialog Editor.
  2009.  
  2010. Note
  2011.  
  2012. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2013.  
  2014. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2015.  
  2016. Return Value
  2017.  
  2018. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2019.  
  2020. Parameters
  2021.  
  2022. Dialog: string    The name or number of the dialog box to contain the icon control (see DialogDefine).
  2023.  
  2024. Control: string    A name or number that identifies the icon control (the "Named region" of a control created with the Dialog Editor).
  2025.  
  2026. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the icon control.
  2027.  
  2028. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the icon control.
  2029.  
  2030. Width: numeric (optional)    The width of the icon control in dialog units.
  2031.  
  2032. Height: numeric (optional)    The height of the icon control in dialog units.
  2033.  
  2034. IconName: string    The name of an icon in a DLL. If an icon is identified by a number, precede the number with a pound sign (#). For example, "#160". If "" or "0" is used, no icon is loaded and the icon control are cleared to nothing. Otherwise, the IconName parameter identifies an icon resource in a .dll file to be loaded. If the IconName parameter begins with "#", the remainder is assumed to be an integer which is the resource name of a icon to load. If the specified icon is not found, a special icon is displayed to indicate an error.
  2035.  
  2036. Instance: numeric (optional)    The instance handle of the DLL that contains the icon resource to load. The PerfectFit default is 0. DLLLoad returns the handle in a variable. If the Instance parameter is missing "" or "0", the PFIT90EN.dll file is used.
  2037.  
  2038. string := DialogAddListBox
  2039.  
  2040. Example
  2041.  
  2042. Syntax
  2043.  
  2044. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; MacroVar: variable)
  2045.  
  2046. Description
  2047.  
  2048. Add a list box control to a dialog box. After DialogShow or DialogLoad, a list box can be added to a dialog created with the Dialog Editor.
  2049.  
  2050. The item you choose is returned in MacroVar (see the MacroVar parameter). Use DialogAddListItem to create list box items.
  2051.  
  2052. Note
  2053.  
  2054. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2055.  
  2056. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2057.  
  2058. Examples
  2059.  
  2060. Sort! | NameSearch!
  2061.  
  2062. Explanation: Name search is allowed on a sorted list box. A vertical scrollbar automatically appears when needed.
  2063.  
  2064. Sort! | NameSearch! | MultiColumn!
  2065.  
  2066. Explanation: Name search is allowed on a sorted list box. Items automatically roll in other columns as needed. A horizontal scrollbar automatically appears when needed.
  2067.  
  2068. Return Value
  2069.  
  2070. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2071.  
  2072. Parameters
  2073.  
  2074. Dialog: string    The name or number of the dialog box to contain the list box control (see DialogDefine).
  2075.  
  2076. Control: string    A name or number that identifies the list box control (the "Named region" of a control created with the Dialog Editor).
  2077.  
  2078. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the list box control.
  2079.  
  2080. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the list box control.
  2081.  
  2082. Width: numeric (optional)    The width of the list box control in dialog units.
  2083.  
  2084. Height: numeric (optional)    The height of the list box control in dialog units.
  2085.  
  2086. Style: enumeration (optional)    The list box control styles. Type | between enumerations to combine styles.
  2087.  
  2088. UseTabStops! Specifies that the listbox supports tab stops.
  2089.  
  2090. Unsorted! Items are listed in the order in which they are defined. Type a keyboard character to give the input focus to the first item that begins with that character. A vertical scrollbar automatically appears when needed. See DialogAddListItem.
  2091.  
  2092. Sorted! Default. Items are sorted alphabetically. Type a keyboard character to give the input focus to the first item that begins with that character. See DialogAddListItem.
  2093.  
  2094. NameSearch! Item search is allowed. Begin typing the name of an item to select. An edit control is displayed above the list box, and the input focus is given to the item that most closely matches the characters you type.
  2095.  
  2096. MultiColumn! Items automatically roll into other columns as needed. A horizontal scrollbar automatically appears when needed. Column width is set by Windows.
  2097.  
  2098. WPChars! Non-keyboard characters are allowed in a list item. See DialogAddListItem.
  2099.  
  2100. ExtendedSelection! Click an item, press shift key and select another item. Selects all items in between.
  2101.  
  2102. MultipleSelection! Click items to select or deselect.
  2103.  
  2104. Checkboxes! List the box items have check boxes. Use with WPChars!.
  2105.  
  2106. MacroVar: variable    The selected list box item is returned in this variable. An item can be assigned to MacroVar before the dialog is displayed. The item is highlighted (selected) if it exists in the control's list of items. Otherwise, it is ignored.
  2107.  
  2108. numeric := DialogAddListItem
  2109.  
  2110. Example
  2111.  
  2112. Syntax
  2113.  
  2114. (Dialog: string; Control: string; {Item: string})
  2115.  
  2116. Description
  2117.  
  2118. Creates a list item(s) for DialogAddComboBox and DialogAddListBox. After DialogShow, a list item(s) can be added to a list box in a dialog created with the Dialog Editor.
  2119.  
  2120. Note
  2121.  
  2122. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2123.  
  2124. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2125.  
  2126. Return Value
  2127.  
  2128. Index (position) where the item was added to the list if successful, or -1 if not. The same result is placed into the MacroDialogResult variable.
  2129.  
  2130. Parameters
  2131.  
  2132. Dialog: string    The name or number of the dialog box to contain the list item (see DialogDefine).
  2133.  
  2134. Control: string    The name or number of the control to contain the list item (the "Named region" of a control created with the Dialog Editor).
  2135.  
  2136. Item: string (repeating)    One or more list items separated by a semicolon. Use the NToC programming command to include non-keyboard characters in a list item for DialogAddComboBox and DialogAddListBox, when the WPChars! style is set. For example,
  2137.  
  2138. DialogAddListItem(1000; 100; "Sample 1"; "Sample 2" + NToC(5;10))
  2139.  
  2140. string := DialogAddProgress
  2141.  
  2142. Example
  2143.  
  2144. Syntax
  2145.  
  2146. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric])
  2147.  
  2148. Description
  2149.  
  2150. Add a progress indicator to a dialog box. After DialogShow or DialogLoad, a progress indicator control can be added to a dialog created with the Dialog Editor. See RegionSetProgressPercent.
  2151.  
  2152. Note
  2153.  
  2154. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2155.  
  2156. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2157.  
  2158. Return Value
  2159.  
  2160. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2161.  
  2162. Parameters
  2163.  
  2164. Dialog: string    The name or number of the dialog box to contain the progress indicator control (see DialogDefine6109).
  2165.  
  2166. Control: string    A name or number that identifies the progress indicator control (the "Named region" of a control created with the Dialog Editor).
  2167.  
  2168. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the progress indicator.
  2169.  
  2170. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the progress indicator.
  2171.  
  2172. Width: numeric (optional)    The width of the progress indicator in dialog units.
  2173.  
  2174. Height: numeric (optional)    The height of the progress indicator in dialog units.
  2175.  
  2176. string := DialogAddPushButton
  2177.  
  2178. Example
  2179.  
  2180. Syntax
  2181.  
  2182. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; ButtonText: string)
  2183.  
  2184. Description
  2185.  
  2186. Add a push button to a dialog box. After DialogShow or DialogLoad, a push button can be added to a dialog created with the Dialog Editor.
  2187.  
  2188. When you choose a user-defined push button or QuickSpot, the Control parameter value of the button or QuickSpot is returned in the implicit variable MacroDialogResult (see DialogDefine). Other controls return the following Control parameter values: 1 for OK, 2 for Cancel, 2 for Close (system menu box), 2 if you double-click the system menu box, 2 if you press Alt+F4 or Esc.
  2189.  
  2190. Note
  2191.  
  2192. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2193.  
  2194. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2195.  
  2196. Return Value
  2197.  
  2198. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2199.  
  2200. Parameters
  2201.  
  2202. Dialog: string    A name or number that matches the Dialog parameter of the dialog box to contain the push-button control (see DialogDefine).
  2203.  
  2204. Control: string    A name or number that identifies the push-button control (the "Named region" of a control created with the Dialog Editor).
  2205.  
  2206. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the push-button control.
  2207.  
  2208. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the push-button control.
  2209.  
  2210. Width: numeric (optional)    The width of the push-button control in dialog units.
  2211.  
  2212. Height: numeric (optional)    The height of the push button control in dialog units.
  2213.  
  2214. Style: enumeration (optional)    The push button styles.
  2215.  
  2216. NonDefaultBttn! Create a push button.
  2217.  
  2218. DefaultBttn! Create a default push button, with a heavy black border, that dismisses the dialog box. Press Enter to choose the default button. If Enter2HRtn! style is specified in DialogDefine, pressing Enter in a multiline edit control produces a hard return rather than the default button action.
  2219.  
  2220. OKBttn! Create a push button with ID OK style.
  2221.  
  2222. CancelBttn! Create a push button with ID Cancel style.
  2223.  
  2224. HelpBttn! Create a Help push button.
  2225.  
  2226. ButtonText: string    The text displayed on the push button.
  2227.  
  2228. string := DialogAddRadioButton
  2229.  
  2230. Example
  2231.  
  2232. Syntax
  2233.  
  2234. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; ButtonText: string; MacroVar: variable; [Style: enumeration])
  2235.  
  2236. Description
  2237.  
  2238. Add a radio button to a dialog box. After DialogShow or DialogLoad, a radio button can be added to a dialog created with the Dialog Editor.
  2239.  
  2240. Radio buttons represent mutually exclusive choices. Selecting one radio button deselects another. Group them together by a control such as a group box or horizontal or vertical line. For multiple selections, see DialogAddCheckBox.
  2241.  
  2242. Note
  2243.  
  2244. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2245.  
  2246. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2247.  
  2248. Return Value
  2249.  
  2250. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2251.  
  2252. Parameters
  2253.  
  2254. Dialog: string    The name or number of the dialog box to contain the radio-button control (see DialogDefine).
  2255.  
  2256. Control: string    A name or number that identifies the radio-button control (the "Named region" of a control created with the Dialog Editor).
  2257.  
  2258. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the radio-button control.
  2259.  
  2260. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the radio-button control.
  2261.  
  2262. Width: numeric (optional)    The width of the radio-button control in dialog units.
  2263.  
  2264. Height: numeric (optional)    The height of the radio-button control in dialog units.
  2265.  
  2266. ButtonText: string    The text displayed by the radio button (see Styles).
  2267.  
  2268. MacroVar: variable    1 is returned in this variable if the radio button is selected, 0 if not. The default value is 0. If MacroVar is assigned a value greater than 0 before the macro compiles, the radio button is automatically selected.
  2269.  
  2270. Style: enumeration (optional)    Radio! Button is not checked. Use RegionSetCheck in a callback function to check or uncheck. See DialogShow.
  2271.  
  2272. RadioAuto! Normal radio button.
  2273.  
  2274. RadioLeft! Positions text to the left of the radio button.
  2275.  
  2276. string := DialogAddScrollBar
  2277.  
  2278. Example
  2279.  
  2280. Syntax
  2281.  
  2282. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; MacroVar: variable; [Minimum: numeric]; [Maximum: numeric]; [Step: numeric])
  2283.  
  2284. Description
  2285.  
  2286. Adds a horizontal or vertical scroll bar to a dialog box. After DialogShow or DialogLoad, a scroll bar can be added to a dialog created with the Dialog Editor.
  2287.  
  2288. A callback function (see DialogShow) can receive Windows WM_HSCROLL and WM_VSCROLL messages from DialogAddScrollBar.
  2289.  
  2290. For more information, refer to your Windows 95 documentation.
  2291.  
  2292. Examples
  2293.  
  2294. Left! | VScroll!
  2295.  
  2296. Explanation: Creates a standard-size vertical scroll control on the left side of the window defined by Left, Top, Width, and Height.
  2297.  
  2298. Right! | HScroll!
  2299.  
  2300. Explanation: Creates a standard-size vertical scroll control on the right side of the window defined by Left, Top, Width, and Height.
  2301.  
  2302. VScroll!
  2303.  
  2304. A vertical scroll control that occupies the entire window defined by Left, Top, Width, and Height.
  2305.  
  2306. Note
  2307.  
  2308. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2309.  
  2310. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2311.  
  2312. Return Value
  2313.  
  2314. Name that identifies the scroll bar control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2315.  
  2316. The runtime behavior of the scrollbar has changed. For macro dialogs created with the DialogDefine statement, the Step parameter was begin ignored and set to 1. This value is now used. 
  2317.  
  2318. Parameters
  2319.  
  2320. Dialog: string    The name or number of the dialog box to contain the scroll bar control (see DialogDefine).
  2321.  
  2322. Control: string    A name or number that identifies the scroll bar control (the "Named region" of a control created with the Dialog Editor).
  2323.  
  2324. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the scroll bar control.
  2325.  
  2326. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the scroll bar control.
  2327.  
  2328. Width: numeric (optional)    The width of the scroll bar control in dialog units (0 for vertical scroll bar).
  2329.  
  2330. Height: numeric (optional)    The height of the scroll bar control in dialog units (0 for horizontal scroll bar).
  2331.  
  2332. Style: enumeration (optional)    The scroll bar thumb position and type styles. If missing, Top! | vScroll! is used. Type "|" between enumerations to combine styles. Not all combinations are possible. HScroll! works the same as VScroll!, but uses the Top! and Bottom! styles.
  2333.  
  2334. Left!
  2335.  
  2336. Top!
  2337.  
  2338. Right!
  2339.  
  2340. Bottom!
  2341.  
  2342. VScroll! Create a vertical scroll bar.
  2343.  
  2344. HScroll! Create a horizontal scroll bar.
  2345.  
  2346. MacroVar: variable    The position of the thumb is returned in this variable. To pre-select a thumb position, initialize MacroVar to the desired position. Default: the minimum position.
  2347.  
  2348. Minimum: numeric (optional)    The minimum thumb position (default). If the maximum position is 6 and the minimum position is 1, there are six positions on the scroll bar. If the maximum position is 6 and the minimum position is 2, there are five positions on the scroll bar.
  2349.  
  2350. Maximum: numeric (optional)    The maximum thumb position. See the Minimum parameter.
  2351.  
  2352. Step: numeric (optional)    The distance the scroll bar moves with each click.
  2353.  
  2354. string := DialogAddText
  2355.  
  2356. Example 
  2357.  
  2358. Syntax
  2359.  
  2360. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Style: enumeration]; Text: string)
  2361.  
  2362. Description
  2363.  
  2364. Display a line of text in a dialog box. After DialogShow or DialogLoad, text can be added to a dialog created with the Dialog Editor.
  2365.  
  2366. Note
  2367.  
  2368. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2369.  
  2370. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2371.  
  2372. Examples
  2373.  
  2374. Left! | RecessBox!
  2375.  
  2376. Explanation: Text is left justified in a recess box.
  2377.  
  2378. Center! | ShadowBox!
  2379.  
  2380. Explanation: Text is centered in a shadow box.
  2381.  
  2382. Return Value
  2383.  
  2384. Text added to the dialog box if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2385.  
  2386. Parameters
  2387.  
  2388. Dialog: string    The name or number of the dialog box to contain the text control (see DialogDefine).
  2389.  
  2390. Control: string    A name or number that identifies the text control (the "Named region" of a control created with the Dialog Editor).
  2391.  
  2392. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the text control.
  2393.  
  2394. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the text control.
  2395.  
  2396. Width: numeric (optional)    The width of the text control in dialog units. This parameter determines how much horizontal space the control occupies, not the text width which is fixed by the system.
  2397.  
  2398. Height: numeric (optional)    The height of the text control in dialog units. This parameter determines how much vertical space the control occupies, not the text height which is fixed by the system.
  2399.  
  2400. Style: enumeration (optional)    The text control styles. Type | between enumerations to combine styles. Not all combinations are possible.
  2401.  
  2402. Left! Left justified.
  2403.  
  2404. Right! Right justified unless WPChars! style is set.
  2405.  
  2406. Center! Centered inside Width parameter value unless WPChars! style is set.
  2407.  
  2408. RecessBox! Recessed background.
  2409.  
  2410. ShadowBox! Shadowed background.
  2411.  
  2412. WPChars! Non-keyboard characters are allowed. See the Text parameter.
  2413.  
  2414. Multiline! Text wraps if WPChars! is set.
  2415.  
  2416. Filename! Ellipsis truncate path and filename to the length of the Width parameter.
  2417.  
  2418. NoPrefix! The & character is not interpreted as an accelerator prefix (displays in the text).
  2419.  
  2420. Text: string    The text to display on the dialog box. Use the NToC programming command to display a non-keyboard character. For example,
  2421.  
  2422. Text: "A bullet character " + NToC(4; 0)
  2423.  
  2424. string := DialogAddViewer
  2425.  
  2426. Example 
  2427.  
  2428. Syntax
  2429.  
  2430. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Filename: string])
  2431.  
  2432. Description
  2433.  
  2434. Add a window to a dialog box for viewing files. The contents of the specified file are displayed in the viewer.
  2435.  
  2436. Note
  2437.  
  2438. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2439.  
  2440. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2441.  
  2442. Return Value
  2443.  
  2444. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2445.  
  2446. Parameters
  2447.  
  2448. Dialog: string    The name or number of the dialog box to contain the viewer control (see DialogDefine6109).
  2449.  
  2450. Control: string    A name or number that identifies the viewer control (the "Named region" of a control created with the Dialog Editor).
  2451.  
  2452. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the viewer control.
  2453.  
  2454. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the viewer control.
  2455.  
  2456. Width: numeric (optional)    The width of the viewer control in dialog units.
  2457.  
  2458. Height: numeric (optional)    The height of the viewer control in dialog units.
  2459.  
  2460. Filename: string (optional)    The path and name of a file to view.
  2461.  
  2462. string := DialogAddVLine
  2463.  
  2464. Example 
  2465.  
  2466. Syntax
  2467.  
  2468. (Dialog: string; Control: string; [Left: numeric]; [Top: numeric]; [Length: numeric])
  2469.  
  2470. Description
  2471.  
  2472. Add a vertical line to a dialog box. After DialogShow or DialogLoad, a vertical line can be added to a dialog created with the Dialog Editor.
  2473.  
  2474. Note
  2475.  
  2476. With any of the DialogAdd commands, the user can use the same name for several controls. While this is possible, creating multiple controls with identical names will prevent the macro from properly accessing the controls at a later time, since the macro system cannot determine which control the user is referencing in the macro.  (Using DialogHandle, the first such control is used, while the Region... commands will use the "last" control with that name.)
  2477.  
  2478. If the macro does not need to ever explicitly access one of these controls with the same name (i.e. several static text fields), they can be given the same name, instead of requiring each one to have a unique name. 
  2479.  
  2480. Return Value
  2481.  
  2482. Name of the control if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2483.  
  2484. Parameters
  2485.  
  2486. Dialog: string    The name or number of the dialog box to contain the vertical line control (see DialogDefine6109).
  2487.  
  2488. Control: string    A name or number that identifies the vertical line control (the "Named region" of a control created with the Dialog Editor).
  2489.  
  2490. Left: numeric (optional)    The number of dialog units from the left side of the dialog box to the left side of the vertical line control.
  2491.  
  2492. Top: numeric (optional)    The number of dialog units from the top of the dialog box to the top of the vertical line control.
  2493.  
  2494. Length: numeric (optional)    The length of the vertical line in dialog units.
  2495.  
  2496. boolean := DialogControlQuery
  2497.  
  2498. Syntax
  2499.  
  2500. (Dialog: string; [Control: string]; [MacroVar: variable])
  2501.  
  2502. Description
  2503.  
  2504. Get the value of a control, or of all controls in a dialog.
  2505.  
  2506. Return Value
  2507.  
  2508. True if successful, False if not.
  2509.  
  2510. Parameters
  2511.  
  2512. Dialog: string    The name or number of the dialog box from which to get the value of a control or controls (see DialogDefine).
  2513.  
  2514. Control: string (optional)    A name or number of a control. If missing, the value of all the associated variables are updated.
  2515.  
  2516. MacroVar: variable (optional)    The value of Control is returned in this variable. This variable does not become the associated variable for the control. If missing, the control's associated variable is updated.
  2517.  
  2518. boolean := DialogControlUpdate
  2519.  
  2520. Syntax
  2521.  
  2522. (Dialog: string; [Control: string]; [Value: any])
  2523.  
  2524. Description
  2525.  
  2526. Update a dialog control or controls from a value.
  2527.  
  2528. Return Value
  2529.  
  2530. True if successful, False if not.
  2531.  
  2532. Parameters
  2533.  
  2534. Dialog: string    The name or number of the dialog box in which to update a control (see DialogDefine).
  2535.  
  2536. Control: string (optional)    The name or number of a control to update. If missing, all controls are updated from the variables associated with the controls when they were created.
  2537.  
  2538.             Value: any (optional)    Value used to update a control(s). If missing, Control is updated from the variable associated with it when it was created.
  2539.  
  2540. string := DialogDefine
  2541.  
  2542. Example
  2543.  
  2544. Syntax
  2545.  
  2546. (Dialog: string; Left: numeric; Top: numeric; Width: numeric; Height: numeric; Style: enumeration; Caption: string)
  2547.  
  2548. Description
  2549.  
  2550. Assemble dialog data in memory. Use DialogShow to create and display the dialog box.
  2551.  
  2552. Dialog names are limited to 25 characters.
  2553.  
  2554. Dialog sizes do not include caption and border space (in Windows 95, dialog captions and borders can be sized by the user).
  2555.  
  2556. The value of the control that dismisses a dialog box is returned in an implicit variable named MacroDialogResult: 1 for OK, 2 for Cancel, 2 for Close (system menu box), 2 if you double-click the system menu box, 2 if you press Alt+F4 or Esc. It also returns the value of the Control parameter of a user-defined push button or QuickSpot (see DialogAddPushButton, DialogAddHotSpot).
  2557.  
  2558. MacroDialogResult is replaced or destroyed when you close a dialog box or call DialogDestroy. To save its value, assign it to a variable. For example, vResult := MacroDialogResult.
  2559.  
  2560. Dialog boxes are positioned and sized in dialog units. A vertical unit equals 1/8 of the font height, and a horizontal unit equals 1/4 of the font width.
  2561.  
  2562. Example
  2563.  
  2564. OK! | Percent! | NoTitle!
  2565.  
  2566. Explanation: Creates a modal dialog box without a title, and positions it in the center of the screen.
  2567.  
  2568. Return Value
  2569.  
  2570. Name of the dialog if successful, an empty string ("") if not. The same result is placed into the MacroDialogResult variable.
  2571.  
  2572. Parameters
  2573.  
  2574. Dialog: string    A name or number that identifies the dialog box. This name or number is used by DialogShow and by DIALOGADD commands.
  2575.  
  2576. Left: numeric    The number of dialog units from the left side of the screen to the left side of the dialog box. When used with Percent! (see Style parameter), this number is a percentage of the screen width minus the width of the dialog box.
  2577.  
  2578. Top: numeric    The number of dialog units from the top of the screen to the top of the dialog box. When used with Percent! (see the Style parameter), this number is a percentage of the screen height minus the height of the dialog box.
  2579.  
  2580. Width: numeric    The width of the dialog box in dialog units.
  2581.  
  2582. Height: numeric    The height of the dialog box in dialog units.
  2583.  
  2584. Style: enumeration    The dialog box styles. Type | between enumerations to combine styles. Not all combinations are possible.
  2585.  
  2586. OK! Create an OK button.
  2587.  
  2588. Cancel! Create a Cancel button.
  2589.  
  2590. Percent! Set Top and Left parameters to a percentage of the screen width or height minus the width or height of the dialog box. Use 50 to display the dialog box in the center of the screen.
  2591.  
  2592. NoFrame! Create a dialog box without a frame. Style has no effect in Windows 95.
  2593.  
  2594. Sizeable! Resizing of the dialog box is allowed.
  2595.  
  2596. NoTitle! Remove the caption (title) bar.
  2597.  
  2598. Modeless! Dialog box can lose input focus without closing. The WordPerfect command InhibitInput must be Off!. Default is modal dialog box.
  2599.  
  2600. Enter2HRtn! Press Enter in a multiline edit control (see DialogAddEditBox) to move the insertion point to the next line. This does not cause the default button action (see DialogAddPushButton).
  2601.  
  2602. NoCloseBox!
  2603.  
  2604. Caption: string    The text displayed in the caption (title) bar.
  2605.  
  2606. boolean := DialogDelete
  2607.  
  2608. Example
  2609.  
  2610. Syntax
  2611.  
  2612. (Dialog: string)
  2613.  
  2614. Description
  2615.  
  2616. Delete a (binary form) dialog from the prefix packet area of the current macro file.
  2617.  
  2618. Return Value
  2619.  
  2620. Return True if successful, False if not.
  2621.  
  2622. Parameters
  2623.  
  2624. Dialog: string    Name of the dialog to delete (see DialogDefine).
  2625.  
  2626. boolean := DialogDestroy
  2627.  
  2628. Example
  2629.  
  2630. Syntax
  2631.  
  2632. (Dialog: string)
  2633.  
  2634. Description
  2635.  
  2636. Remove an old-style dialog box from memory.
  2637.  
  2638. Discussion
  2639.  
  2640. A dialog created with the Dialog Editor, without a callback (see DialogShow), is removed from memory when any button is pushed. Subsequent calls to the dialog create an error (the macro system no longer knows anything about the dialog). For example, DialogDismiss in
  2641.  
  2642. DialogShow ("Dialog1"; "PerfectScript")
  2643.  
  2644. DialogDismiss ("Dialog1"; "OKBttn")
  2645.  
  2646. creates an error when OK is pressed (Dialog1).
  2647.  
  2648. The next example, which includes a callback function, displays the dialog, continuously executes instructions (callback function "CallHere"), is dismissed (hidden), and is finally destroyed.
  2649.  
  2650. DialogShow ("Dialog1"; "PerfectScript"; CallHere)
  2651.  
  2652. DialogDismiss ("Dialog1"; "OKBttn")
  2653.  
  2654. DialogDestroy ("Dialog1")
  2655.  
  2656. Quit
  2657.  
  2658.  
  2659.  
  2660. Label (CallHere)
  2661.  
  2662. ...other statements...
  2663.  
  2664. Return
  2665.  
  2666. Return Value
  2667.  
  2668. True if successful, False if not. This same value is placed in MacroDialogResult.
  2669.  
  2670. Parameters
  2671.  
  2672. Dialog: string    The name or number of a dialog box to destroy (see DialogDefine).
  2673.  
  2674. string := DialogDismiss
  2675.  
  2676. Example
  2677.  
  2678. Syntax
  2679.  
  2680. (Dialog: string; Control: string)
  2681.  
  2682. Description
  2683.  
  2684. Hide a dialog box. Use DialogShow to display a hidden dialog box.
  2685.  
  2686. Discussion
  2687.  
  2688. A dialog created with the Dialog Editor, without a callback (see DialogShow), is removed from memory when any button is pushed. Subsequent calls to the dialog create an error (the macro system no longer knows anything about the dialog). For example, DialogDismiss in
  2689.  
  2690. DialogShow ("Dialog1"; "PerfectScript")
  2691.  
  2692. DialogDismiss ("Dialog1"; "OKBttn")
  2693.  
  2694. creates an error when OK is pressed (Dialog1).
  2695.  
  2696. The next example, which includes a callback function, displays the dialog, continuously executes instructions (callback function "CallHere"), is dismissed (hidden), and is finally destroyed.
  2697.  
  2698. DialogShow ("Dialog1"; "PerfectScript"; CallHere)
  2699.  
  2700. DialogDismiss ("Dialog1"; "OKBttn")
  2701.  
  2702. DialogDestroy ("Dialog1")
  2703.  
  2704. Quit
  2705.  
  2706.  
  2707.  
  2708. Label (CallHere)
  2709.  
  2710. ...other statements...
  2711.  
  2712. Return
  2713.  
  2714. Return Value
  2715.  
  2716. Returns the name of the control that was used to dismiss the dialog.
  2717.  
  2718. Parameters
  2719.  
  2720. Dialog: string    The name or number of the dialog box to hide (see DialogShow).
  2721.  
  2722. Control: string    OKBttn or 1 for OK, CancelBttn or 2 for Cancel, or the control value of a user-defined push button or QuickSpot. CancelBttn cancels value assignments to control return variables. For example, an edit control does not return the text entered in the edit box. The value of Control is returned in MacroDialogResult as OKBttn, CancelBttn, or the control value of another push button or QuickSpot.
  2723.  
  2724. numeric := DialogHandle
  2725.  
  2726. Example
  2727.  
  2728. Syntax
  2729.  
  2730. (Dialog: string; [Control: string])
  2731.  
  2732. Description
  2733.  
  2734. Return the handle of a dialog or dialog box control.
  2735.  
  2736. Return Value
  2737.  
  2738. Handle of a dialog or dialog box control.
  2739.  
  2740. Parameters
  2741.  
  2742. Dialog: string    The name or number of a dialog (see DialogDefine).
  2743.  
  2744. Control: string (optional)    The name or number of a dialog box control (see Control parameter of any dialog control). If you omit this parameter, the handle of the dialog box is returned.
  2745.  
  2746. numeric := DialogLoad
  2747.  
  2748. Example
  2749.  
  2750. Syntax
  2751.  
  2752. (Dialog: string; [Parent: string])
  2753.  
  2754. Description
  2755.  
  2756. Load a dialog in memory without displaying it. You can use Region commands on a dialog box that has been loaded. See also DialogShow and Discussion under DialogDismiss.
  2757.  
  2758. Return Value
  2759.  
  2760. The window handle if successful, or 0 if not.
  2761.  
  2762. Parameters
  2763.  
  2764. Dialog: string    The name or number of a dialog box (see DialogDefine).
  2765.  
  2766. Parent: string (optional)    The name of the parent region, such as "Corel PerfectScript," or "WordPerfect" for WordPerfect.
  2767.  
  2768. boolean := DialogSave
  2769.  
  2770. Syntax
  2771.  
  2772. (Dialog: string; [SaveAsName: string])
  2773.  
  2774. Description
  2775.  
  2776. Save the specified dialog as a binary form dialog in the prefix packet area of the current macro file.
  2777.  
  2778. Return Value
  2779.  
  2780. True if saved successfully, False if not.
  2781.  
  2782. Parameters
  2783.  
  2784. Dialog: string    The name of the dialog to save (see DialogDefine).
  2785.  
  2786. SaveAsName: string (optional)    The name to save the dialog under. If missing, the dialog is saved under the current dialog name.
  2787.  
  2788. boolean := DialogSetProperties
  2789.  
  2790. Syntax
  2791.  
  2792. (Dialog: string; [FontName: string]; [FontSize: measurement]; [ClassName: string]; [HelpFile: string]; [HelpString: string])
  2793.  
  2794. Description
  2795.  
  2796. Specify additional properties for a dialog box.
  2797.  
  2798. This command should be used only on dialogs created with DialogDefine. It should be called immediately after DialogDefine.
  2799.  
  2800. Example
  2801.  
  2802. DialogDefine (Dialog:"NewDialog"; Left:45; Top:47; Width:174; Height:43; Style:Percent!; Caption:"Example of DialogSetProperties")
  2803.  
  2804. DialogSetProperties (Dialog:"NewDialog"; FontName:"GoudyOlSt BT"; FontSize:12p)
  2805.  
  2806. DialogAddText (Dialog:"NewDialog"; Control:"Static1"; Left:20; Top:13; Width:130; Height:10; Style:Left!; Text:"Setting properties with DialogSetProperties")
  2807.  
  2808. DialogShow (Dialog:"NewDialog")
  2809.  
  2810. DialogDestroy(Dialog:"NewDialog")
  2811.  
  2812. Return Value
  2813.  
  2814. True if successful, False if not.
  2815.  
  2816. Parameters
  2817.  
  2818. Dialog: string    The name or number of a dialog box (see DialogDefine).
  2819.  
  2820. FontName: string (optional)    The font that dialog text will appear in.
  2821.  
  2822. FontSize: measurement (optional)    Specify the font size using a measurement type, such as 12p. If the measurement type specifier is not used, default units is assumed. See DefaultUnits.
  2823.  
  2824. ClassName: string (optional)    Specify another class name (see Dialog Editor).
  2825.  
  2826. HelpFile: string (optional)    The name of the Help file associated with the dialog.
  2827.  
  2828. HelpString: string (optional)    The part of the Help file to come up along with the dialog.
  2829.  
  2830. numeric or string := DialogShow
  2831.  
  2832. Example
  2833.  
  2834. Syntax
  2835.  
  2836. (Dialog: string; [Parent: string]; [Callback: label]; [Focus: string])
  2837.  
  2838. Description
  2839.  
  2840. Display a dialog box, and, optionally, identify a callback function. The parent of this dialog is maintained by the macro and is initially set to the application that started the macro. The dialog may be attached to a different application or window by setting a new default parent with the SetDefaultParent command.
  2841.  
  2842. Use DialogDismiss to hide a dialog box. See Discussion under DialogDismiss or DialogDestroy.
  2843.  
  2844. A callback function enables a macro to respond immediately and in specific ways to events such as selecting a radio button or check box, without waiting until the dialog box is dismissed. Without a callback function, user input is acted upon only after the dialog box is dismissed and the macro resumes execution.
  2845.  
  2846. To create a callback function, use the Label parameter of DialogShow, and a loop statement after DialogShow. For example,
  2847.  
  2848. DialogShow(1000; "WordPerfect"; Msgs)
  2849.  
  2850. CallbackWait
  2851.  
  2852. Label(Msgs)
  2853.  
  2854. ... other statements ...
  2855.  
  2856. Return
  2857.  
  2858. The value of the control that dismisses a dialog box is returned in an implicit variable named MacroDialogResult: 1 for OK, 2 for Cancel, 2 for Close (system menu box), 2 if you double-click the system menu box, 2 if you press Alt+F4, or the value of the Control parameter of a user-defined push button or QuickSpot (see DialogAddPushButton, DialogAddHotSpot).
  2859.  
  2860. If DialogShow is used with Dialog commands, such as DialogDefine and DialogAddEditBox (old-style dialog box), the first control that can return a value has the input focus.
  2861.  
  2862. If a dialog is preloaded through DialogLoad or a Region command, the Parent parameter of DialogDefine is not used (the dialog is already created or "parented"). Before loading a dialog through a Region command, use DialogLoad to specify the parent.
  2863.  
  2864. Return Value
  2865.  
  2866. Returns the control name used to dismiss the dialog (for non-callback dialogs), or the window handle of the dialog (for callback dialogs). If DialogShow is used to display a callback dialog, the window handle of the dialog is returned (the same value placed into MacroDialogResult), and returned from DialogShow. If an error occurs, 0 is returned.
  2867.  
  2868. Parameters
  2869.  
  2870. Dialog: string    The name of a dialog box to display (see DialogDefine for old-style dialog boxes).
  2871.  
  2872. Parent: string (optional)    When displaying dialogs created by the Macro Dialog Editor, if no parent is specified, the same parent as used in a dialog defined by the DialogDefine statement without a parent. This parent defaults to the window of the application which starts the macro, but can be changed using the SetDefaultParent command 
  2873.  
  2874. Callback: label (optional)    Identify a callback function (Label to call) when the dialog box becomes active, or the user:
  2875.  
  2876. Chooses Close from the system menu.
  2877.  
  2878. Presses Alt+F4.
  2879.  
  2880. Double-clicks the system menu box.
  2881.  
  2882. Chooses a push button, radio button, check box, QuickSpot, or scroll-bar control.
  2883.  
  2884. The Windows messages are:
  2885.  
  2886. WM_ACTIVATE
  2887.  
  2888. WM_COMMAND
  2889.  
  2890. WM_DESTROY
  2891.  
  2892. WM_HSCROLL
  2893.  
  2894. WM_INITDIALOG
  2895.  
  2896. WM_SYSCOMMAND
  2897.  
  2898. WM_VSCROLL
  2899.  
  2900. For more information, see Callback Data Description.
  2901.  
  2902. Focus: string (optional)    Specify the control to receive the initial focus.
  2903.  
  2904. numeric := Dimensions
  2905.  
  2906. Example
  2907.  
  2908. Syntax
  2909.  
  2910. (VariableName: variable; [IndexOption: enumeration])
  2911.  
  2912. Description
  2913.  
  2914. Return dimension information about an array variable.
  2915.  
  2916. Return Value
  2917.  
  2918. Return the number of dimensions or elements, or the index range (see the IndexOption parameter).
  2919.  
  2920. Parameters
  2921.  
  2922. VariableName: variable    Array variable name. Return dimension information about this variable.
  2923.  
  2924. IndexOption: enumeration (optional)    Type of dimension information to return. If missing, DimensionCount! is used. Use 0 to return the total number of array elements. Use a dimension number to return the number of elements in that dimension (the numeric value 2 is equivalent to IndexLimit2!).
  2925.  
  2926. DimensionCount! Return the total number of dimensions in the array.
  2927.  
  2928. ElementCount! Return the total number of elements in the array.
  2929.  
  2930. IndexLimit1! Return the upper limit of the array's first index.
  2931.  
  2932. IndexLimit2! ... 9! Return the upper limit of a specified index (2 through 9).
  2933.  
  2934. IndexLimit10! Return the upper limit of the array's tenth index.
  2935.  
  2936. Discard
  2937.  
  2938. Example
  2939.  
  2940. Syntax
  2941.  
  2942. ({VariableName: variable})
  2943.  
  2944. Description
  2945.  
  2946. Remove Local, Global, or Persist variables from memory, in that order.
  2947.  
  2948. Discard does not specify a variable table. If a variable by the same name exists in all three tables, call Discard three times.
  2949.  
  2950. While(Exists(VariableName))
  2951.  
  2952. Discard(VariableName)
  2953.  
  2954. EndWhile
  2955.  
  2956. Parameters
  2957.  
  2958. VariableName: variable (repeating)    Variable(s) to discard. Variables begin with a letter and can include any other combination of letters or numbers. Separate multiple variables with a semicolon.
  2959.  
  2960. numeric := numeric DIV numeric
  2961.  
  2962. Description
  2963.  
  2964. Operator. Precedence level 3.
  2965.  
  2966. Example
  2967.  
  2968. Type(100 DIV 20)
  2969.  
  2970. // Result = 5
  2971.  
  2972. Return Value
  2973.  
  2974. Return the integer quotient of two numbers.
  2975.  
  2976. DLLCall
  2977.  
  2978. Syntax
  2979.  
  2980. (<ModuleInstance> numeric; <FunctionName> string; [<ReturnVariable> variable]; <ReturnType> enumeration; {[<Parameter> any]})
  2981.  
  2982. Description
  2983.  
  2984. Call a function in a Dynamic Link Library (DLL).
  2985.  
  2986. Do not use this command unless you are familiar with Windows programming. Incorrect DLL calls can damage files and/or reset your computer. Macros using DLLCalls written for Windows 3.x must be rewritten for Windows 95.
  2987.  
  2988. Parameters
  2989.  
  2990. <ModuleInstance> numeric    A DLL handle. DLLLoad returns the handle in a variable.
  2991.  
  2992. <FunctionName> string    A function name. See DLL documentation for function names.
  2993.  
  2994. <ReturnVariable> variable (optional)    The DLL function may return a value in this variable. The ReturnType parameter defines the expected data type.
  2995.  
  2996. <ReturnType> enumeration    The data type to return (see ReturnVariable parameter).
  2997.  
  2998. AnsiString! (Windows type LPSTR)
  2999.  
  3000. Bool! (Windows type BOOL)
  3001.  
  3002. DWord! (Windows type DWord)
  3003.  
  3004. Integer! (Windows type LONG)
  3005.  
  3006. OemString! (Windows type LPSTR)
  3007.  
  3008. Real! (Microsoft C type double)
  3009.  
  3010. String! (Windows type LPSTR)
  3011.  
  3012. Word! (Windows type WORD)
  3013.  
  3014. WPString! (WordPerfect wordstring)
  3015.  
  3016. Void! (Nothing)
  3017.  
  3018. ReturnType must match the data type returned in ReturnVariable (see DLL function documentation for return types). If it does not, an Unrecoverable Application Error or system crash may result.
  3019.  
  3020. <Parameter> any (optional)    Parameter information passed to a DLL function, enclosed in braces and separated by a semicolon. The type of information depends on the function being called (see DLL function documentation for parameter values to pass).
  3021.  
  3022. integer (LONG or Dword)
  3023.  
  3024. string (FAR pointer to an ANSI string)
  3025.  
  3026. boolean (BOOL)
  3027.  
  3028. real (Microsoft c-type double)
  3029.  
  3030. AnsiString (string) (FAR pointer to an ANSI string)
  3031.  
  3032. OemString (string) (FAR pointer to an OEM string)
  3033.  
  3034. WPString (string) (FAR pointer to a WP 6.0 word string)
  3035.  
  3036. ADDRESS (integer) (LPDWord)
  3037.  
  3038. ADDRESS (Dword(integer))
  3039.  
  3040. ADDRESS (boolean) (BOOL FAR*)
  3041.  
  3042. ADDRESS (string) (FAR pointer to an ANSI string)
  3043.  
  3044. ADDRESS (AnsiString(string)) (FAR pointer to an ANSI string)
  3045.  
  3046. ADDRESS (OemString(string)) (FAR pointer to OEM string)
  3047.  
  3048. ADDRESS (WPString(string)) (FAR pointer to a WP 6.0 word string.)
  3049.  
  3050. ADDRESS (real) (FAR pointer to a Microsoft C-type double)
  3051.  
  3052. ADDRESS (Real (real)) (FAR pointer to a Microsoft C-type double)
  3053.  
  3054. Note
  3055.  
  3056.   This command is not available for use on a Linux operating system.
  3057.   
  3058. DLLCall Prototype <Name> label
  3059.  
  3060. Syntax
  3061.  
  3062. (<ModuleFileName> string or variable; [<FunctionName> string]; <ReturnType> enumeration; {[<Parameter> any}])
  3063.  
  3064. Description
  3065.  
  3066. Define the calling format of a DLL routine (see example).
  3067.  
  3068. DLLCall Prototype must occur before calling a DLL function. The DLL library is loaded and freed each time the DLL function is called.
  3069.  
  3070. DLLCall Prototype makes a macro easier to read and provides safer DLL calls (routines can be called only as defined).
  3071.  
  3072. Do not use this command unless you are familiar with Windows programming. Incorrect DLL calls can damage files and/or reset your computer.
  3073.  
  3074. DLLCall is a compile-time only command that allows a variable name (simple variables only, no array elements are allowed), specified as the DllLibraryFile parameter as well as the literal character string that it supports. When a variable name is specified (see ModuleFileName parameter), the contents of the variable specified in the DLLCall Prototype statement is used, which must contain the name of the DLL library file. If the specified variable does not exist when the DLL routine is called, an undefined variable error occurs at runtime. This occurs when the DLL filename or instance handle is loaded in a local variable in a user-defined routine or macro file, and the DLL routine is called from a different file or different user-defined routine in which the variable does not exist. Define the variable containing the DLL name or instance handle as a Global macro variable, which makes it visible throughout the execution of the macro.
  3075.  
  3076. Parameters
  3077.  
  3078. <Name> label    Name used to call the DLL function.
  3079.  
  3080. <ModuleFileName> string or variable    DLL library file containing the DLL function, defined as a literal string, or as a variable that must contain the DLL library module name at runtime. If the variable contains an integer value, this value is assumed to be the instance handle of a DLL that was loaded using the DLLLoad command.
  3081.  
  3082. <FunctionName> string (optional)    A function name. See DLL documentation for function names. If not used, the Name parameter is used.
  3083.  
  3084. <ReturnType> enumeration    The data type returned by the DLL function. See DLLCall.
  3085.  
  3086. AnsiString!
  3087.  
  3088. Bool!
  3089.  
  3090. DWord!
  3091.  
  3092. Integer!
  3093.  
  3094. OemString!
  3095.  
  3096. Real!
  3097.  
  3098. String!
  3099.  
  3100. Word!
  3101.  
  3102. WPString!
  3103.  
  3104. Void!
  3105.  
  3106. <Parameter> any (optional)    Parameter information passed to a DLL function, enclosed in braces and separated by a semicolon. The type of information depends on the function being called (see DLL function documentation for parameter values to pass). See DLLCall.
  3107.  
  3108. Note
  3109.  
  3110.   This command is not available for use on a Linux operating system.
  3111.   
  3112. DLLFree
  3113.  
  3114. Syntax
  3115.  
  3116. (ModuleInstance: numeric)
  3117.  
  3118. Description
  3119.  
  3120. Remove a dynamic link library (DLL) from memory.
  3121.  
  3122. Do not use this command unless you are familiar with Windows programming. Incorrect DLL calls can damage files and/or reset your computer.
  3123.  
  3124. Parameters
  3125.  
  3126. ModuleInstance: numeric    A DLL handle. DLLLoad returns the handle in a variable.
  3127.  
  3128. Note
  3129.  
  3130.   This command is not available for use on a Linux operating system.
  3131.   
  3132. numeric := DLLLoad
  3133.  
  3134. Syntax
  3135.  
  3136. (Filename: string)
  3137.  
  3138. Description
  3139.  
  3140. Load a dynamic link library (DLL) into memory.
  3141.  
  3142. You should respond to error values with code similar to the following (see ModuleInstance parameter):
  3143.  
  3144. Result := DLLLoad(filename)
  3145.  
  3146. Switch(vResult)
  3147.  
  3148. CaseOF 0: ...statement block...
  3149.  
  3150. CaseOF 2: ...statement block...
  3151.  
  3152. EndSwitch
  3153.  
  3154. Do not use this command unless you are familiar with Windows programming. Incorrect DLL calls can damage files and/or reset your computer.
  3155.  
  3156. Return Value
  3157.  
  3158. A DLL handle if the DLL successfully loads, or an error value. For example, 31 means a General Failure occurred; 1157 means the DLL was not found.
  3159.  
  3160. See your Windows documentation for more information.
  3161.  
  3162. Parameters
  3163.  
  3164. Filename: string    DLL path and filename.
  3165.  
  3166. Note
  3167.  
  3168.   This command is not available for use on a Linux operating system.
  3169.   
  3170. boolean := DoesDialogExist
  3171.  
  3172. Example 
  3173.  
  3174. Syntax
  3175.  
  3176. (Dialog: string)
  3177.  
  3178. Description
  3179.  
  3180. Look for a dialog in the current macro, then look through the Use file list for the current macro. See Use.
  3181.  
  3182. Return Value
  3183.  
  3184. True if the dialog is found, False if not.
  3185.  
  3186. Parameters
  3187.  
  3188. Dialog: string    The name or number of a dialog box (see DialogDefine).
  3189.  
  3190. boolean := DoesDirectoryExist
  3191.  
  3192. Example
  3193.  
  3194. Syntax
  3195.  
  3196. (DirectoryName: string)
  3197.  
  3198. Description
  3199.  
  3200. Return True if a directory exists, False if not.
  3201.  
  3202. Return Value
  3203.  
  3204. True/False.
  3205.  
  3206. Parameters
  3207.  
  3208. DirectoryName: string    Include the full path.
  3209.  
  3210. boolean := DoesFileExist
  3211.  
  3212. Example
  3213.  
  3214. Syntax
  3215.  
  3216. (Filename: string)
  3217.  
  3218. Description
  3219.  
  3220. Return True if a file exists, False if not.
  3221.  
  3222. Return Value
  3223.  
  3224. True/False.
  3225.  
  3226. Parameters
  3227.  
  3228. Filename: string    Include the full path.
  3229.  
  3230. boolean := DoesRegionExist
  3231.  
  3232. Example
  3233.  
  3234. Syntax
  3235.  
  3236. (NamedRgn: string)
  3237.  
  3238. Description
  3239.  
  3240. Return whether a named region exists.
  3241.  
  3242. Return Value
  3243.  
  3244. True if the named region exists, False if not.
  3245.  
  3246. Parameters
  3247.  
  3248. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  3249.  
  3250. numeric := DWord
  3251.  
  3252. Syntax
  3253.  
  3254. (<Value> numeric)
  3255.  
  3256. Description
  3257.  
  3258. Pass a value as a DWord (DLL call in-line parameter function). DWord or double word is an unsigned long integer. See DLLCall.
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.