home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / dflt20.zip / BOX.C < prev    next >
C/C++ Source or Header  |  1994-01-30  |  781b  |  29 lines

  1. /* ----------- box.c ------------ */
  2.  
  3. #include "dflat.h"
  4.  
  5. int BoxProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  6. {
  7.     int rtn;
  8.     CTLWINDOW *ct = GetControl(wnd);
  9.     if (ct != NULL)    {
  10.         switch (msg)    {
  11.             case SETFOCUS:
  12.             case PAINT:
  13.                 return FALSE;
  14.             case LEFT_BUTTON:
  15.             case BUTTON_RELEASED:
  16.                 return SendMessage(GetParent(wnd), msg, p1, p2);
  17.             case BORDER:
  18.                 rtn = BaseWndProc(BOX, wnd, msg, p1, p2);
  19.                 if (ct != NULL && ct->itext != NULL)
  20.                     writeline(wnd, ct->itext, 1, 0, FALSE);
  21.                 return rtn;
  22.             default:
  23.                 break;
  24.         }
  25.     }
  26.     return BaseWndProc(BOX, wnd, msg, p1, p2);
  27. }
  28.  
  29.