| 71 | namespace |
| 72 | { |
| 73 | void AdjustWindowRectForBorders( |
| 74 | HWND hwnd, DWORD style, const int x, const int y, const int width, const int height, RECT& r) |
| 75 | { |
| 76 | if (!style && hwnd) |
| 77 | { |
| 78 | style = GetWindowLong(hwnd, GWL_STYLE); |
| 79 | } |
| 80 | r.left = x; |
| 81 | r.top = y; |
| 82 | r.right = r.left + width; |
| 83 | r.bottom = r.top + height; |
| 84 | BOOL result = AdjustWindowRect(&r, style, FALSE); |
| 85 | if (!result) |
| 86 | { |
| 87 | vtkGenericWarningMacro("AdjustWindowRect failed, error: " << GetLastError()); |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | void vtkWin32HardwareWindow::Create() |