home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / c / cwl30 / cwl3demo / cwlfunc6.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-12  |  623 b   |  23 lines

  1. #include "cwldemo.h"
  2.  
  3. int WinMove(POPUP_MENU_PTR p, int sel)
  4. {
  5.   int i,j,k;
  6.   WPOINTER cw;
  7.   cw = WindowInitialize(DESKTOP_WINDOW,
  8.                         BORDER,0,0,40,2,
  9.                         BLACKONCYAN,BLACKONCYAN,SINGLEBOX);
  10.   WindowWriteCenterString(cw,"You can move windows to any location...",0);
  11.   WindowCenter(cw,VERTCENTER | HORIZCENTER);
  12.   WindowDisplay(cw,1,NOEFFECT);
  13.   for (i =0; i < 10; i++)
  14.   {
  15.     j = rand()  % (CWLscreen_rows - 1);
  16.     k = rand() % (CWLscreen_cols - 1);
  17.     delay_approx(1000);
  18.     WindowMove(cw,j,k);
  19.   }
  20.   WindowClose(cw,NOEFFECT);
  21.   return POPUP_CONTINUE;
  22. }
  23.