home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FSGFX.ZIP / G_MSGBOX.C < prev    next >
C/C++ Source or Header  |  1990-03-06  |  581b  |  28 lines

  1. /* g_msgbox.c */
  2. /* draw a box with text messages */
  3.  
  4. #include "mygraph.h"
  5.  
  6. g_msgbox(int x,int y, int width, int height, char message1[], char message2[])
  7. {
  8.     struct rect outer;
  9.     struct rect inner;
  10.  
  11.     g_puts(x + (width/2) - ((strlen(message1)+
  12.         strlen(message2))*8/2), y - 10,    message1);
  13.     g_puts(-1, -1, message2);
  14.  
  15.     outer.pt1.x = x;
  16.     outer.pt1.y = y;
  17.     outer.pt2.x = x+width;
  18.     outer.pt2.y = y+height;
  19.     g_rect(outer);
  20.  
  21.     inner.pt1.x = x+2;
  22.     inner.pt1.y = y+1;
  23.      inner.pt2.x = inner.pt1.x+width    - 4;
  24.     inner.pt2.y = inner.pt1.y+height - 2;
  25.     g_rect(inner);
  26. }
  27.  
  28.