----------------------------------------------------------------------------
| 181 | |
| 182 | // ---------------------------------------------------------------------------- |
| 183 | void vtkWin32HardwareWindow::SetSize(int x, int y) |
| 184 | { |
| 185 | static bool resizing = false; |
| 186 | if ((this->Size[0] != x) || (this->Size[1] != y)) |
| 187 | { |
| 188 | this->Superclass::SetSize(x, y); |
| 189 | |
| 190 | if (!this->UseOffScreenBuffers) |
| 191 | { |
| 192 | if (!resizing) |
| 193 | { |
| 194 | resizing = true; |
| 195 | |
| 196 | if (this->ParentId) |
| 197 | { |
| 198 | SetWindowExtEx(GetDC(this->WindowId), x, y, nullptr); |
| 199 | SetViewportExtEx(GetDC(this->WindowId), x, y, nullptr); |
| 200 | SetWindowPos(this->WindowId, HWND_TOP, 0, 0, x, y, SWP_NOMOVE | SWP_NOZORDER); |
| 201 | } |
| 202 | else |
| 203 | { |
| 204 | RECT r; |
| 205 | AdjustWindowRectForBorders(this->WindowId, 0, 0, 0, x, y, r); |
| 206 | SetWindowPos(this->WindowId, HWND_TOP, 0, 0, r.right - r.left, r.bottom - r.top, |
| 207 | SWP_NOMOVE | SWP_NOZORDER); |
| 208 | } |
| 209 | resizing = false; |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | void vtkWin32HardwareWindow::SetPosition(int x, int y) |
| 216 | { |
no test coverage detected