diff options
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 20b9a2b00..734e6a60a 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1976,12 +1976,15 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset) win->show(); Fl::check(); win->make_current(); + HDC save_gc = fl_gc; + fl_gc = GetDC(NULL); // get the screen device context // capture the 4 window sides from screen - // use negative 4th argument to allow negative 2nd or 3rd arguments - uchar *top_image = fl_read_image(NULL, -bx, - bt - by, -ww, bt + by); - uchar *left_image = fl_read_image(NULL, -bx, - bt - by, -bx, wh); - uchar *right_image = fl_read_image(NULL, win->w(), - bt - by, -bx, wh); - uchar *bottom_image = fl_read_image(NULL, -bx, win->h(), -ww, by); + RECT r; GetWindowRect(fl_window, &r); + uchar *top_image = fl_read_image(NULL, r.left, r.top, ww, bt + by); + uchar *left_image = fl_read_image(NULL, r.left, r.top, bx, wh); + uchar *right_image = fl_read_image(NULL, r.right - bx, r.top, bx, wh); + uchar *bottom_image = fl_read_image(NULL, r.left, r.bottom-by, ww, by); + ReleaseDC(NULL, fl_gc); fl_gc = save_gc; this->set_current(); // print the 4 window sides fl_draw_image(top_image, x_offset, y_offset, ww, bt + by, 3); |
