10 int cur, do_change =
FALSE;
28 size.X = (SHORT) ncols;
38 size.Y = (SHORT) nrows;
41 cur = size.X | (size.Y << 16);
43 if( do_change ==
FALSE )
47 rect.Left = rect.Top = 0;
48 rect.Right = size.X - 1;
49 if( rect.Right > max.X )
52 rect.Bottom = rect.Top + size.Y - 1;
53 if( rect.Bottom > max.Y )
58 int do_resize =
FALSE;
60 if( rect.Bottom < (nrows-1) )
63 memcpy( &rectRes, &rect,
sizeof(SMALL_RECT) );
64 if( rectRes.Right >= ncols )
65 rectRes.Right = ncols - 1;
67 else if( rect.Right < (ncols-1) )
70 memcpy( &rectRes, &rect,
sizeof(SMALL_RECT) );
71 if( rectRes.Bottom >= nrows )
72 rectRes.Bottom = nrows - 1;