
Untitled
By: a guest on
May 25th, 2012 | syntax:
C++ | size: 0.41 KB | hits: 18 | expires: Never
void SystemClass::ResizeWindow(unsigned int width, unsigned int height)
{
RECT rcClient, rcWindow;
POINT ptDiff;
GetClientRect(window, &rcClient);
GetWindowRect(window, &rcWindow);
ptDiff.x = (rcWindow.right - rcWindow.left) - rcClient.right;
ptDiff.y = (rcWindow.bottom - rcWindow.top) - rcClient.bottom;
::MoveWindow(window, rcWindow.left, rcWindow.top, width + ptDiff.x, height + ptDiff.y, TRUE);
}