xp-style manifest and HBITMAP 'flickering' (vc++ 6)

hi, i'm new here. hope someone can help.

i'm using vc++ 6 for lots of projects.. mostly dialog based tools and apps.

a problem i've had for a long time is, if i add an xp-style 'manifest' sheet for my dialog controls, the app displays the new style controls ok, but my bitmaps are 'flickering' whenever i use redrawwindow(). yet if i remove the xp style again, the problem doesn't occur.

the problem is happening with applications that use HBITMAP handles that are redrawn around every 1/25th of a second with a timer.. for special effects, etc.

the flickering looks like interlaced frames.. making large parts of the bitmap 'transparent'

like i say.. there's no problem without the xp-style manifest.. so what's causing it?

Who is Participating?
mico20Connect With a Mentor Commented:
try catching wm_erazebkgnd (or wm_erasebackground) message and mark it as processed - this might work
snypAuthor Commented:
i can't believe noone else has had this and/or noone can be bothered to answer =(
snypAuthor Commented:
thanks for your suggestion mico20..

i tried to derive a class from CStatic and override the WM_ERASEBKGND message;

BOOL CAnimStatic::OnEraseBkgnd(CDC* pDC)
      return TRUE;

but it made no difference..

if it makes things any clearer.. a typical example of how the bitmaps are handled and drawn is;

OnInitDialog() {

HBITMAP zoomBmp = m_zoom.GetBitmap(); // m_zoom being a CStatic member of the dialog class



unsigned long zoomArrray[ZOOM_X * ZOOM_Y];

someTimerFunction(HBITMAP *hBmp) {


SetBitmapBits(*hBmp, (ZOOM_X * ZOOM_Y * 4), zoomArray);


still stuck with the problem.. it appears to be with redrawwindow().. any help appreciated

snypAuthor Commented:
mico20 you can have the points.

after too much messing around i decided to redo large chunks of code with a method i wanted to avoid, because of things i was doing with my DC in other places.

my two cents is, microsoft are disgustingly lax in their documentation of visual themes and the new xp shell.

link for anyone else having the same kinds of problems.

snypAuthor Commented:
also http://msdn.microsoft.com/library/en-us/dngdi/html/msdn_flicker.asp?frame=true

there's no support for the uxtheme interface, even with visual studio 6's most recent service pack (which is now quite unreasonably old).
quite bad.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.