Pixel Format
vBOOL SetupPixelFormat( CDC * pDC )
v{
v    static PIXELFORMATDESCRIPTOR pfd =
v {
v     … omissis …
v    };
v    int pixelformat;
v
v    if ( (pixelformat = ChoosePixelFormat(pDC->GetSafeHdc(), &pfd)) == 0 )
v    {
v        AfxMessageBox("ChoosePixelFormat failed");
v     return FALSE;
v    }
v
v    if (SetPixelFormat(pDC->GetSafeHdc(), pixelformat, &pfd) == FALSE)
v    {
v        AfxMessageBox("SetPixelFormat failed");
v     return FALSE;
v    }
v
v    return TRUE;
v}
v