MenuItemState := GetMenuState(GetMenu(Wnd), IDM_EXCLUDE, MF_BYCOMMAND);
case MenuItemState <> 0 of
true :
begin
{ menu item is checked, exclude the bottom of the client area }
GetClientRect(Wnd, ClientRect);
ClientRect.Bottom := ClientRect.Bottom - Exclude;
InvalidateRect(Wnd, @ClientRect, TRUE);
end;