Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 25th, 2012  |  syntax: C++  |  size: 0.41 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void SystemClass::ResizeWindow(unsigned int width, unsigned int height)
  2. {
  3.         RECT rcClient, rcWindow;
  4.         POINT ptDiff;
  5.         GetClientRect(window, &rcClient);
  6.         GetWindowRect(window, &rcWindow);
  7.         ptDiff.x = (rcWindow.right - rcWindow.left) - rcClient.right;
  8.         ptDiff.y = (rcWindow.bottom - rcWindow.top) - rcClient.bottom;
  9.         ::MoveWindow(window, rcWindow.left, rcWindow.top, width + ptDiff.x, height + ptDiff.y, TRUE);
  10. }