Here is the case creating status, tool, and edit bars:
Code:
case WM_SIZE:
{
HWND hTool, hEdit, hStatus;
RECT rcTool;
int iToolHeight;
RECT rcStatus;
int iStatusHeight;
int iEditHeight;
RECT rcClient;
hTool = GetDlgItem(hwnd, ID_MAIN_TOOL);
SendMessage(hTool, TB_AUTOSIZE, 0, 0);
GetWindowRect(hTool, &rcTool);
iToolHeight = rcTool.bottom - rcTool.top;
hStatus = GetDlgItem(hwnd, ID_MAIN_STATUS);
SendMessage(hStatus, WM_SIZE, 0, 0);
GetWindowRect(hStatus, &rcStatus);
iStatusHeight = rcStatus.bottom - rcStatus.top;
GetClientRect(hwnd, &rcClient);
iEditHeight = rcClient.bottom - iToolHeight - iStatusHeight;
hEdit = GetDlgItem(hwnd, ID_MAIN_EDIT);
SetWindowPos(hEdit, NULL, 0, iToolHeight, rcClient.right, iEditHeight, SWP_NOZORDER);
}
break;
using a MsgBox to test now...