SetClassLong(hDlg, GCL_HBRBACKGROUND, hNewBrush);

You must first create the new brush somehow.