calculate toolbar height instead of use the hardcoded value 35

svn path=/trunk/; revision=39175
This commit is contained in:
Christoph von Wittich 2009-01-28 12:28:11 +00:00
parent c1628a99dd
commit 13b4ba7cc6

View file

@ -379,10 +379,11 @@ ImageView_WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ROT_CLOCKW); lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ROT_CLOCKW);
break; break;
} }
}
}
return TRUE; return TRUE;
} }
}
break;
}
case WM_SIZING: case WM_SIZING:
{ {
LPRECT pRect = (LPRECT)lParam; LPRECT pRect = (LPRECT)lParam;
@ -395,8 +396,10 @@ ImageView_WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
} }
case WM_SIZE: case WM_SIZE:
{ {
MoveWindow(hDispWnd, 1, 1, LOWORD(lParam)-1, HIWORD(lParam)-35, TRUE); RECT rc;
SendMessage(hToolBar, TB_AUTOSIZE, 0, 0); SendMessage(hToolBar, TB_AUTOSIZE, 0, 0);
SendMessage(hToolBar, TB_GETITEMRECT, 1, (LPARAM)&rc);
MoveWindow(hDispWnd, 1, 1, LOWORD(lParam)-1, HIWORD(lParam)-rc.bottom, TRUE);
return 0L; return 0L;
} }
case WM_DESTROY: case WM_DESTROY: