Here, try getting rid of the WM_SIZE handler in your subclass proc, and replace your current main window WM_SIZE handler with this code:
Code:
RECT rcTool, rcStatus;
GetWindowRect(GetDlgItem(hwnd, IDC_MAIN_TOOL), &rcTool);
GetWindowRect(GetDlgItem(hwnd, IDC_MAIN_STATUS), &rcStatus);
long iToolHeight = rcStatus.bottom - rcStatus.top;
long iStatusHeight = rcTool.bottom - rcTool.top;
long iEditHeight = HIWORD(lParam) - iToolHeight - iStatusHeight;
SetWindowPos(GetDlgItem(hwnd, IDC_MAIN_EDIT), NULL, 0, iToolHeight, LOWORD(lParam), iEditHeight, SWP_NOZORDER);