WndProc (Part 15).
By SalimMeghani
- 208 reads
// Called when inputting information.
case WM_CHAR:
if ((wParam!='\r') && (istat==0))
{
szInputStr[0]=wParam;
szInputStr[1]='\0';
//
//
input=1;
istat=1;
credraw=1;
DialogBox(hInst, (LPCTSTR)IDD_DIALOG1, hWnd, (DLGPROC)Input);
cleanup(szBuffer,szOutputStr);
}
setcursor=0;
if (istat==1)
{
c_input=strlen(szBuffer);
istat=0;
switch(szBuffer[0])
{
case '=':
case '$':
{
int pvalue=0;
pvalue=((column-1)*100)+row;
cell=scell+pvalue;
rtype=srtype+pvalue;
*rtype='F';
*cell=(char *) calloc((unsigned long) strlen(szBuffer)+4, sizeof(char));
strncpy(*cell, szBuffer+1, strlen(szBuffer));
if (szBuffer[0]=='=') strcat(*cell, "#");
type=stype+pvalue;
if (szBuffer[0]=='$')
*type='S';
else
*type='F';
dscroll=5;
//
break;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '-':
case '+':
case '.':
case '(':
case '*':
case '/':
{
int pvalue=0;
pvalue=((column-1)*100)+row;
rtype=srtype+pvalue;
*rtype='F';
if ((moreops(szBuffer)) || (strlen(szBuffer)==1) && ((isoperator(szBuffer[0])) || (szBuffer[0]=='.') || (szBuffer[0]=='(') || (szBuffer[0]==')')))
{
cell=scell+pvalue;
*cell=(char *) calloc((unsigned long) strlen(szBuffer)+4, sizeof(char));
strncpy(*cell, szBuffer+0, strlen(szBuffer));
strcat(*cell, "#");
- Log in to post comments