home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / WINCLIP / EXAM56.C < prev    next >
C/C++ Source or Header  |  1993-12-01  |  797b  |  24 lines

  1.       #include "window.h"
  2.  
  3.       #define NORM  CREATE_VIDEO_ATTRIBUTE(black,white)
  4.       #define DATEMASK "__/__/__"
  5.       char buf1[] = "123456";
  6.       char buf2[9];
  7.       WPOINTER w;
  8.  
  9.       main()
  10.       {
  11.         WindowInitializeSystem();
  12.         WindowSaveInitial(0);
  13.         w = WindowInitialize(BORDER,1,1,40,10,NORM,NORM,SINGLEBOX);
  14.         WindowOpen(w);
  15.         WindowDisplay(w,1,NOEFFECT);
  16.         TranslateStringToMaskString(buf1,DATEMASK,buf2,'_',0);
  17.         WindowPrintf(w,
  18.             "The original string is %s\nThe translated string is %s\n",
  19.              buf1,buf2);
  20.         TranslateStringToMaskString(buf1,DATEMASK,buf2,'_',1);
  21.         WindowPrintf(w,
  22.             "The original string is %s\nThe translated string is %s\n",
  23.              buf1,buf2);
  24.       }