MFC种Cimage.Draw只显示三通道图像,显示不了单通道图像

    UpdateWindow();//刷新窗口
    CRect rect;//定义矩形类  
    CWnd *pWnd = GetDlgItem(ID_ShowPi2);//获取控件句柄  
    pWnd->GetClientRect(&rect); //获取句柄指向控件区域的大小  
    CDC *pDc = pWnd->GetDC();//获取picture的DC  
    //int win_w = rect.Width(), win_h = rect.Height();//获取窗口宽高
    CImage imgae;
    Mat temp;
    resize(img, temp, Size(rect.Width(), rect.Height()));
    MatToCImage(temp, imgae);
    pDc->SetStretchBltMode(COLORONCOLOR);
    imgae.Draw(pDc->m_hDC, 0, 0, rect.Width(), rect.Height(), 0, 0, rect.Width(), rect.Height());//画出图片
    ReleaseDC(pDc);

https://www.csdn.net/gather_15/MtjaYg4sMjQ0NTktZG93bmxvYWQO0O0O.html