This is the main encoding part
Code:
int i,j;
char enctab[256] = { 0,1,2,3,4,5,
/* omitted several lines of identity here */
"@48CD3FGH1JKLMN0PQ257UVWXYZ" \ /* @ABCDEFGHIJKLMNOPQRSTUVWXYZ -> @48CD3FGH1JKLMN0PQ257UVWXYZ */
91,92,93,94,95,96, \
/* abcdefghijklmnopqrstuvwxyz -> 48cd3fgh1jk1mn0pq257uvwxyz */
"48cd3fgh1jk1mn0pq257uvwxyz"
/* more identity coding follows */
/* ... */
250,251,252,253,254,255 };
j=strlen(str);
for(i=0;i<j;i++) str[i] = enctab[str[i]]; /* this single line does the encoding */
...
The rest of the code just manages the window and the two editcontrols, which I assume you know how to do...