home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
C
/
WINCLIP
/
EXAM51.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-01
|
1KB
|
29 lines
#include "window.h"
#include <string.h>
#define NORM CREATE_VIDEO_ATTRIBUTE(black,white)
#define REVERSE CREATE_VIDEO_ATTRIBUTE(white,black)
#define TELMASK "(___)___-____ ext:____"
#define SSMASK "___-__-____"
WPOINTER w;
char buffer[80];
main()
{
int i,row,col;
buffer[0] = 0; /* Make sure first character is null */
WindowInitializeSystem();
WindowSaveInitial(0);
w = WindowInitialize(BORDER,1,1,40,10,NORM,NORM,SINGLEBOX);
WindowOpen(w);
WindowDisplay(w,1,NOEFFECT);
buffer[0] = 0; /* Make sure first character is null */
WindowWriteString(w,"Enter Your Telephone No.",1,1);
WindowGetMaskStringAttr(w,2,1,buffer,TELMASK,' ',0,40,0,REVERSE,"40.");
WindowWriteString(w,"You entered the following phone no:",3,1);
WindowWriteString(w,buffer,4,1);
GET_KEY();
memset(buffer,0,sizeof(buffer));
WindowWriteString(w,"Now Enter your Soc. Sec. Number:",6,1);
WindowGetMaskStringAttr(w,7,1,buffer,SSMASK,' ',0,40,0,REVERSE,"40.");
WindowWriteString(w,"You entered the following:",8,1);
WindowWriteString(w,buffer,9,1);
}