WndProc (Part 14).
By SalimMeghani
- 199 reads
// Called when resizing the worksheet.
case WM_SIZE:
cxClient=LOWORD(lParam);
cyClient=HIWORD(lParam);
hdc=GetDC(hWnd);
SelectObject(hdc, GetStockObject(SYSTEM_FIXED_FONT));
GetTextMetrics(hdc, &tm);
cxChar=tm.tmAveCharWidth;
cyChar=tm.tmHeight;
ReleaseDC(hWnd,hdc);
NUMCHARS=(cxClient/cxChar);
NUMCHARS=(NUMCHARS/9)*8;
NUMLINES=(cyClient/cyChar)-2;
NUMCOLS=NUMCHARS/9;
MAXROW=NUMLINES-3;
column=1;
row=1;
cval=0;
rval=0;
hredraw=1;
vredraw=1;
credraw=1;
stxpos=1;
endxpos=NUMCOLS;
stypos=1;
endypos=MAXROW;
ctxpos=1;
ctypos=1;
curxpos=1;
curypos=1;
olrxpos=1;
olrypos=1;
cvalx=0;
c_input=0;
scroll=0;
dscroll=5;
cvaly=0;
nVscrollPos=1;
nHscrollPos=1;
scrlval=0;
SetScrollPos(hWnd, SB_VERT, nVscrollPos, TRUE);
SetScrollPos(hWnd, SB_HORZ, nHscrollPos, TRUE);
break;
- Log in to post comments