I've started learning Visual C++ and I've been trying to make a window with a gradient background like the ones in setup applications. Here I provide the relevant code of the creation of the window from CFrameWnd, the code compiles fine but upon execution it doesn't draw the gradient, it only shows the default white background. Can anyone tell me what's wrong, or give me a code snipet that would accomplish the same. Thanks!.<br><br>////////////////////////////////////////////////////////////<br>CAnaColWindow::CAnaColWindow()<br>{<br> Create(NULL,<br> "AnaCol v2.0",<br> WS_MINIMIZEBOX¦WS_SYSMENU,<br> CRect(0,0,500,500),<br> NULL,<br> MAKEINTRESOURCE(100));<br> CDC *hDC = GetDC();<br> RECT rectFill;<br> RECT rectClient;<br> float fStep;<br> HBRUSH hBrush;<br> int iOnBand;<br> GetClientRect(&rectClient);<br> fStep = (float)rectClient.bottom / 256.0f;<br> for (iOnBand = 0; iOnBand < 256; iOnBand++)<br> {<br> SetRect(&rectFill,<br> 0,<br> (int)(iOnBand * fStep),<br> rectClient.right+1,<br> (int)((iOnBand+1) * fStep));<br> hBrush = CreateSolidBrush(RGB(0, 0, (255 -iOnBand)));<br> FillRect(*hDC, &rectFill, hBrush);<br> DeleteObject(hBrush);<br> };<br> ReleaseDC(hDC);<br>}