>>495
WM_LBUTTONUP:
for(i=rct[rct_num].top; i < rct[rct_num].bottom; ++i)
{
  for(j=rct[rct_num].top; j < rct[rct_num].right; ++j)
  {
    graphic_info.mapdat[i][j] = 1;
  }
}
内側のループ.topになってる。

WM_PAINT:
hBrush = CreateHatchBrush(HS_FDIAGONAL, RGB(128, 128, 128));
SelectObject(hdc, hBrush);
DeleteObject(hBrush);

これはちょっといただけない。
hOld = SelectObject(hdc, hBrush);
// 描画
SelectObject(hdc, hOld);
DeleteObject(hBrush);
とすること。