win32: still fencing with the resizing

This commit is contained in:
zeromus 2009-12-19 19:23:37 +00:00
parent ab429334f4
commit 8adec34759
1 changed files with 8 additions and 4 deletions

View File

@ -475,10 +475,14 @@ void WINCLASS::sizingMsg(WPARAM wParam, LPARAM lParam, LONG keepRatio)
void WINCLASS::setClientSize(int width, int height)
{
//yep, do it twice, once in case the menu wraps, and once to accomodate that wrap
for(int i=0;i<2;i++)
{
RECT rect;
SetRect(&rect,0,0,width,height);
AdjustWindowRectEx(&rect,GetWindowStyle(hwnd),TRUE,GetWindowExStyle(hwnd));
MyAdjustWindowRectEx(&rect,hwnd);
SetWindowPos(hwnd,0,0,0,rect.right-rect.left,rect.bottom-rect.top,SWP_NOMOVE|SWP_NOZORDER);
}
}
//========================================================= Thread class