I need to build a window designed to look exactly like this (it has controls inside the white area, but that's not relevant for now):
http://dl.dropbox.com/u/3432167/example.png
My problem is defining those two separate "areas" with different backgrounds.
The closest I've got to the expected look was representing the white area with an empty ListBox, but the result is not the same (and it is a lousy hack).
Any ideas on how achieve this?
After some digging, I've discovered that a good way to do this is overriding the OnPaint function.
Below is an example used for the dialog pictured on the question above. The rectangle dimensions are hard-coded because this particular dialog is not resizeable.
Don't forget to add ON_WM_PAINT() to the message map.
The solution ended up being quite simple, but I guess useful to share anyway.