Holy cow, I wrote a book!
If you specify one of the static control styles which draw a frame
the control will be drawn with the corresponding color
(which, as we saw last time,
isn't actually black, gray, or white).
If you try to customize the color by handling the
you'll find that it has no effect.
Well, yeah, because you said you wanted a black rectangle.
If you want some other color, you could set the style to
SS_OWNERDRAW then draw the solid color in your
Or you can just use a text static control with no text.
In that case, you can respond to
WM_CTLCOLORSTATIC in the usual way.
Since you specified no text, all that will be drawn is the background