Erratic GDI+ redrawing
-
I have this program I made to do some stuff I wanted. It uses plain win32 (no-MFC) and draws a bitmap in a window. Well, at first I was just using normal GDI and StretchBlt and it worked perfectly, but I wanted bicubic interpolation so I converted it to GDI+. So it basicly works fantastically and looks much more crisp, but for some reason the redrawing is highly erratic. When it needs to redraw (after another window was hiding or something like that), it sometimes work but more often it doesn't work and just displays an empty window. Sometimes, however, you can see the image flicker as the window gets unhidden and then the image immidiately disappears. Also, when you would move the window so some of it is out of the monitor's bounderies and then move it quickly into show again, the image would have empty reigons that do not get redrawn even after letting go of the window. And it's not just the image: If I make it also fill a rect on the whole client area, it would have the same erratic behavior. So, it's not just the image. Is GDI+ known to have these oddities when redrawing? I haven't updated my GDI+ libraries or DLLs; My DLL is just what came in XP and my libraries are just what came with VS.NET 2003. I'm starting up GDI+ and shutting it down all just fine, and I link everything just fine and I don't get any unresolved externals or anything, and it does work, except for this weird redrawing issues. Any help would be much aprreciated. Thanks.
-
I have this program I made to do some stuff I wanted. It uses plain win32 (no-MFC) and draws a bitmap in a window. Well, at first I was just using normal GDI and StretchBlt and it worked perfectly, but I wanted bicubic interpolation so I converted it to GDI+. So it basicly works fantastically and looks much more crisp, but for some reason the redrawing is highly erratic. When it needs to redraw (after another window was hiding or something like that), it sometimes work but more often it doesn't work and just displays an empty window. Sometimes, however, you can see the image flicker as the window gets unhidden and then the image immidiately disappears. Also, when you would move the window so some of it is out of the monitor's bounderies and then move it quickly into show again, the image would have empty reigons that do not get redrawn even after letting go of the window. And it's not just the image: If I make it also fill a rect on the whole client area, it would have the same erratic behavior. So, it's not just the image. Is GDI+ known to have these oddities when redrawing? I haven't updated my GDI+ libraries or DLLs; My DLL is just what came in XP and my libraries are just what came with VS.NET 2003. I'm starting up GDI+ and shutting it down all just fine, and I link everything just fine and I don't get any unresolved externals or anything, and it does work, except for this weird redrawing issues. Any help would be much aprreciated. Thanks.
-
Exactly what I'm doing. The Bitmap object is created in WM_PAINT as well so it does exist. Besides when it doesn't redraw well, if you move a window over it to make it redraw it will sometimes make it redraw well. I doubt it has anything to do with the image file itself, especially seeing how it acts oddly with rect filling too.