home *** CD-ROM | disk | FTP | other *** search
/ NetComm Communications 5 / NetComm.iso / resource / netcomm / wcomm / disk3 / sview.c_ / sview.bin
Encoding:
Text File  |  1994-10-24  |  1.2 KB  |  45 lines

  1. /* This program, sview.c, created by Delrina and assigned to the Layout */
  2. /* button, cycles the Phonebook between various layouts, as if you selected */
  3. /* View|[Icon][Session Details][Call Statistics]. */
  4.  
  5. /* $Revision:   1.2  $ */
  6. /* $Date:   06 Apr 1993 17:04:44  $ */
  7.  
  8. /* Define main function, which is always the starting point of C programs. */
  9. /* (The term "void" indicates that the function returns no value.) */
  10. void main ()
  11.     {
  12.     /* Declares a variable and initializes it to zero. */
  13.     long ScriptHandle = 0;
  14.     int DisplayMode;
  15.  
  16.     /* Establish a link between this script program and Delrina WinComm PRO */
  17.     ScriptHandle = dcInitialize(0, 0, 0, 0);
  18.  
  19.     /* Exit if intialization of link with Delrina WinComm PRO failed */
  20.     if (ScriptHandle == 0) exit();
  21.     
  22.     /* Check current phonebook display */
  23.     DisplayMode = dcGetDisplay(ScriptHandle);
  24.  
  25.     /* Cycle through display modes */
  26.     switch (DisplayMode)
  27.         {
  28.         case 1:
  29.             DisplayMode = 2;
  30.             break;
  31.         case 2:
  32.             DisplayMode = 3;
  33.             break;
  34.         default:
  35.             DisplayMode = 1;
  36.             break;
  37.         }
  38.  
  39.     /* Change phonebook display */
  40.     dcSetDisplay(ScriptHandle, DisplayMode);
  41.  
  42.     /* Terminate link between Delrina WinComm PRO and script program */
  43.     dcTerminate(ScriptHandle, 0);
  44.     }
  45.