What error message do you get?

Anyway, you're not doing things right.
Code:
HBRUSH hBrush;
LOGBRUSH logBrush; //You have to declare the variable, not a pointer
logBrush.lbStyle = BS_SOLID;
logBrush.lbColor = RGB(233,233,233);
logBrush.lbHatch= NULL; //You have to make sure this member is NULL if you're not using it

hBrush=CreateBrushIndirect(&logBrush);

//Now fill the WNDCLASSEX members
There you go.