void show(CMFCApplication1Dlg * pThis, UINT ID,unsigned char * datam , int nBitCount) {
HWND g_hwnd = GetDlgItem(pThis->m_hWnd,ID);
CDC * m_cdc = pThis->GetDlgItem(ID)->GetDC();
HDC hdc = m_cdc->GetSafeHdc();
CRect rc;
GetClientRect(g_hwnd, &rc);
HDC hdcBmp = CreateCompatibleDC(hdc);
int sz= sizeof(BITMAPINFOHEADER);
BITMAPINFO *bitInfo = (BITMAPINFO*)new BYTE[sz];
bitInfo->bmiHeader.biBitCount = 8 * nBitCount; //单通道 8*1 3通道 8*3
bitInfo->bmiHeader.biWidth = pThis->Image_Parm->width; //宽
bitInfo->bmiHeader.biHeight = -pThis->Image_Parm->height; //高
bitInfo->bmiHeader.biPlanes = 1;
bitInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bitInfo->bmiHeader.biCompression = BI_RGB;
HBITMAP hbmp = ::CreateDIBitmap(hdc, &bitInfo->bmiHeader, CBM_INIT, datam, bitInfo, DIB_RGB_COLORS);
SelectObject(hdcBmp, hbmp);
SetStretchBltMode(hdc, HALFTONE);
StretchBlt(hdc, 0, 0, rc.right, rc.bottom, hdcBmp, 0, 0, pThis->Image_Parm->width, pThis->Image_Parm->height, SRCCOPY);
DeleteObject(hbmp);
DeleteDC(hdcBmp);
ReleaseDC(g_hwnd, hdc);
}