how about this?

PHP Code:

HBRUSH    hBrush1
=NULL;

LRESULT CALLBACK DlgProc(HWND hWndUINT messageWPARAM wParamLPARAM lParam)
{
    switch (
message
    {
        case 
WM_INITDIALOG:
            
// Create a red color solid brush for the dialouge use
            
hBrush1 CreateSolidBrush(RGB(25500));
            return 
true;
        case 
WM_CTLCOLORDLG:
            
// Change the dialog box background color
            // Ref.
            // wParam - handle to DC (HDC)
            // lParam - handle to dialog box (HWND)

            // Return the new craeted brush
            
return (long)hBrush1;
        case 
WM_CLOSE:
        case 
WM_DESTROY:
            
// Destroy the created brush
            
DeleteObject(hBrush1);
            
//
            
PostQuitMessage(0);
            break;
   }
   return 
0;