WndProc (Part 7)
By SalimMeghani
- 2210 reads
doitselect :
if (hredraw)
{
cval=nHscrollPos;
sprintf(szBuffer," ");
TextOut(hdc,cxChar*1,cyChar*4,szBuffer,3);
a=4;
for(i=1;i<=NUMCOLS;i++)
{
sprintf(szBuffer," ");
TextOut(hdc,cxChar*a,cyChar*4,szBuffer,6);
a+=6;
current_column(&fch, &sch, cval);
sprintf(szBuffer,"%2c%c",fch,sch);
TextOut(hdc,cxChar*a,cyChar*4, szBuffer,3);
a+=3;
cval++;
}
sprintf(szBuffer," ");
TextOut(hdc,cxChar*a, cyChar*4, szBuffer,1);
hredraw=0;
}
if (vredraw)
{
cval=nVscrollPos;
for (i=4;i<=NUMLINES;i++)
{
sprintf(szBuffer," ");
TextOut(hdc,0, cyChar*(1+i),szBuffer,4);
sprintf(szBuffer,"%3d",cval);
TextOut(hdc,0,cyChar*(1+i),szBuffer,3);
cval++;
}
vredraw=0;
}
if (dscroll==5)
{
SetTextColor(hdc, RGB(0,0,0));
SetBkColor(hdc, RGB(255,255,255));
rval=nVscrollPos;
cval=nHscrollPos;
for(i=1;i<=MAXROW;i++)
{
cvaly=cyChar*(4+i);
for (a=1; a<=NUMCOLS;a++)
{
int pvalue=0;
pvalue=((cval-1)*100)+rval;
type=stype+pvalue;
cvalx=5+((a-1)*9);
evaluate_cell(cval,rval,(char)*type,szBuffer,'D',genetic);
//
TextOut(hdc, 0.25+cxChar*cvalx, cvaly,szBuffer,9);
cval++;
}
cval=nHscrollPos;
rval++;
}
dscroll=0;
}
if (credraw)
{
int pvalue=0;
pvalue=((column-1)*100)+row;
type=stype+pvalue;
cvalx=5+((curxpos-1)*9);
cvaly=cyChar*(4+curypos);
SetTextColor(hdc, RGB(255,255,255));
SetBkColor(hdc, RGB(0,0,200));
evaluate_cell(column,row,(char)*type,szBuffer,'D',genetic);
TextOut(hdc, 0.25+cxChar*cvalx, cvaly, szBuff
- Log in to post comments