home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_01 / wbuttonm.c < prev    next >
C/C++ Source or Header  |  1991-03-17  |  672b  |  52 lines

  1. /* WBUTTONM.C
  2.  *
  3.  *    contains  wbutton_mark ()
  4.  *
  5.  *    function to place a tickmark onscreen next to a button.
  6.  *
  7.  */
  8. #include "wsys.h"
  9.  
  10.  
  11.  
  12. void wbutton_mark ( int uval, char mark )
  13.     {
  14.     unsigned char ux, uy;
  15.     WBUTTON *Bptr;
  16.  
  17.     int true_y;
  18.  
  19.  
  20.     Bptr = wbutton_getptr ( uval );
  21.  
  22.  
  23.     if ( Bptr )
  24.         {
  25.         true_y = Bptr->By;
  26.  
  27.         if ( Bptr->Bstyle & WBTN_BOX )
  28.             {
  29.             /* 2 lines for this button;
  30.              */
  31.             ++true_y;
  32.             }
  33.         ux = wherex();         /* save caller text position*/
  34.         uy = wherey();
  35.         wgoto ( (Bptr-> Bx) -1, true_y);
  36.         wputc (mark);
  37.  
  38.         wgoto ( ux,uy );    /* restore caller text pos. */
  39.  
  40.  
  41.         }
  42.  
  43.  
  44.  
  45.  
  46.  
  47.     return;    /* wbutton_mark () */
  48.     }
  49.  
  50.  
  51.  
  52.