3

I have a static control which has SS_OWNERDRAW and SS_NOTIFY flag when it is crated. Its parent window has WS_EX_COMPOSITED flag.

Under Windows XP, it is not drawn correctly, as the picture below showed (The right-top rectangle):

enter image description here

But under Windows 7, it is drawn correctly, as the picture below showed (The corss "X" on right-top):

enter image description here

How to fix this problem in XP? Furthermore, what causes this problem (in XP)?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
user565739
  • 1,302
  • 4
  • 23
  • 46

1 Answers1

1

MSDN for CreateWindowEx() says this:

With WS_EX_COMPOSITED set, all descendants of a window get bottom-to-top painting order using double-buffering. Bottom-to-top painting order allows a descendent window to have translucency (alpha) and transparency (color-key) effects, but only if the descendent window also has the WS_EX_TRANSPARENT bit set. Double-buffering allows the window and its descendents to be painted without flicker.

I.e. the child STATIC control should have WS_EX_TRANSPARENT set.

mity
  • 2,299
  • 17
  • 20