Using GLEW can not find and set the best matched pixel format

I using glew-2.1.0 getDC(NULL),then set the best matched pixel format is fail.we don’t known that 's why,Please help with this question,Thanks.
bool OpenglRender::setPixelFormat(int colorBits, int depthBits, int stencilBits)
{
PIXELFORMATDESCRIPTOR pfd;

// find out the best matched pixel format
int pixelFormat = findPixelFormat(colorBits, depthBits, stencilBits);
if (pixelFormat == 0)
	return false;

// set members of PIXELFORMATDESCRIPTOR with given mode ID
::DescribePixelFormat(m_Hdc, pixelFormat, sizeof(pfd), &pfd);

// set the fixel format
if (!::SetPixelFormat(m_Hdc, pixelFormat, &pfd))
	return false;

return true;

}