Paint a dialog

This question concerns BPW 7.0 - Windows 3.1 target.

Hi,

I would like to know how to properly paint controls in a dialog.
I have a dialog with some static controls (rectangles, ...) registered
with CTL3DV2.DLL to give them 3D appearence. This works fine except
that the backgrounds of these rectangles are grey and for drawing text
on them (when selecting lines in a listbox for example), I want a
white background displayed when the dialog is created.

How to paint this background. I tried to trap Wm_CTLColor message (see
below) but it seems (using De{*word*81}) that this message is not sent for
all controls in my dialog and moreover, it is sent before actual
drawing of the dialog so I have to use a tricky code to have my
background painted.

Ex :

Procedure TMyDialog.WMCtlColor(var Msg : TMessage)
Begin
     If Hiword(Msg.LParam) = CtlColor_Static then
     Begin
                        { I Draw my stuff here.}
     End;
End;

Is there a better solution ?