wxMSW 2.8.0 - wxImage vs wxBitmap

Alfonso De Prisco adeprisco at almateq.com
Thu Feb 1 01:37:31 PST 2007


Wanting to keep a collection of images to be copied to the display at 
OnPaint() events, I chose to use wxImages instead of wxBitmaps just not 
to have to manage display settings changes done while the application is 
running.

Having had a performance problem (wxImages must be converted into 
wxBitmaps to be drawn to a wxDC), I switched to wxBitmap.
Now, my concern is that using wxBitmaps my application could run into 
problems if the user changes display settings (color depth mainly) with 
my app in background.

I tested that condition on my dual display system with all combinations: 
the app window in one display, change color depth there (16 bpp), move 
the window to the other display (32 bpp), change settings there also, 
move the window so that it is partially visible on both displays...

The application works in all cases.

Now I'm wondering if my video adapter is doing some work for me or if 
Windows XP internally always works at 32bpp, or even if wxWidgets 
someway detects a difference between wxBitmap and display color depths 
doing the required conversion by fly.

I'm missing the wxBitmap device dependence if I can change the display 
settings and still be able to copy the same wxBitmap with no problems.


Somebody with more information or advices?


Regards,
Alfonso De Prisco






More information about the wx-users mailing list