home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / Libraries / Icon / c / SetInteger < prev    next >
Encoding:
Text File  |  1994-05-29  |  415 b   |  20 lines

  1. #include "Wimp.h"
  2. #include "WimpSWIs.h"
  3. #include "Icon.h"
  4.  
  5. #include <stdio.h>
  6. #include "string.h"
  7.  
  8.  
  9. extern void Icon_SetInteger(window_handle w, icon_handle i, int value)
  10. /*
  11.  * Sets the given icon's text to hold the number in "value". (and redraws icon)
  12.  * If unable to set the text (incorrect icon type), it returns quietly
  13.  */
  14. {
  15.   char       text[16];
  16.  
  17.   sprintf(text, "%d", value);
  18.   Icon_SetText(w, i, text);
  19. }
  20.