Another option is to handle the WM_ERASEBKGND and draw the dialog's background, eg:
Code:
case WM_ERASEBKGND:
{
RECT rcDlg,rcTop,rcBottom;
HBRUSH hbrTop,hbrBottom;
HDC hdc;
hdc=(HDC)wParam;
GetClientRect(hDlg,&rcDlg);
SetRect(&rcTop,0,0,rcDlg.right,rcDlg.bottom-60);
SetRect(&rcBottom,0,rcDlg.bottom-60,rcDlg.right,rcDlg.bottom);
//create a black and a purple brush...
hbrTop=CreateSolidBrush(RGB(0,0,0));
hbrBottom=CreateSolidBrush(RGB(200,0,200));
//...and use them to paint designated areas
FillRect(hdc,&rcTop,hbrTop);
FillRect(hdc,&rcBottom,hbrBottom);
//free gdi resources
DeleteObject(hbrTop);
DeleteObject(hbrBottom);
return TRUE;
}
Where hDlg is the handle of your dialog box. If you intend resizing your dialog you should handle the WM_SIZE and InvalidateRect(hDlg,0,1); to ensure proper drawing of the background. Adjust proportions to suit and it's probably better to initialise the background brushes when your app starts and delete them when your app finishes.
Hope that helps.
edit: typos