diff options
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx index 7f655e291..6795fb06b 100644 --- a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx @@ -29,8 +29,8 @@ Fl_GDI_Image_Surface_Driver::Fl_GDI_Image_Surface_Driver(int w, int h, int high_ h = int(h*d); } HDC gc = (HDC)Fl_Graphics_Driver::default_driver().gc(); - offscreen = off ? off : CreateCompatibleBitmap( (gc ? gc : fl_GetDC(0) ) , w, h); - if (!offscreen) offscreen = CreateCompatibleBitmap(fl_GetDC(0), w, h); + offscreen = off ? off : (Fl_Offscreen)CreateCompatibleBitmap( (gc ? gc : fl_GetDC(0) ) , w, h); + if (!offscreen) offscreen = (Fl_Offscreen)CreateCompatibleBitmap(fl_GetDC(0), w, h); driver(Fl_Graphics_Driver::newMainGraphicsDriver()); if (d != 1 && high_res) ((Fl_GDI_Graphics_Driver*)driver())->scale(d); origin.x = origin.y = 0; @@ -38,13 +38,13 @@ Fl_GDI_Image_Surface_Driver::Fl_GDI_Image_Surface_Driver(int w, int h, int high_ Fl_GDI_Image_Surface_Driver::~Fl_GDI_Image_Surface_Driver() { - if (offscreen && !external_offscreen) DeleteObject(offscreen); + if (offscreen && !external_offscreen) DeleteObject((HBITMAP)offscreen); delete driver(); } void Fl_GDI_Image_Surface_Driver::set_current() { - HDC gc = fl_makeDC(offscreen); + HDC gc = fl_makeDC((HBITMAP)offscreen); driver()->gc(gc); SetWindowOrgEx(gc, origin.x, origin.y, NULL); Fl_Surface_Device::set_current(); |
