初学MFC,想用Cximage在PictureBox上显示一幅BMP格式的图片,不知道哪里有问题.程序如下,高手帮忙啊!!         CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, "所有文件 (*.*)|*.*||", this);
dlg.m_ofn.lpstrInitialDir = "C:\\"; 
dlg.m_ofn.lpstrTitle = "打开";

if(dlg.DoModal() == IDOK)
{
m_strPath = dlg.GetPathName();
    m_strName=dlg.GetFileName();
    CFile file;
    file.Open( m_strName, CFile::modeRead) ;
    char *m_pBMPBuffer;
    int m_nFileLen;
    m_nFileLen = file.GetLength();
    m_pBMPBuffer = new char[m_nFileLen];
    file.Read(m_pBMPBuffer,m_nFileLen);
    HBITMAP m_bitmap = NULL;
    CxImage image((BYTE*)m_pBMPBuffer,m_nFileLen, CXIMAGE_FORMAT_BMP);
        m_bitmap = image.MakeBitmap(m_fishbitmap.GetDC()->m_hDC);  
    m_fishbitmap.SetBitmap(m_bitmap);
if (m_bitmap) 
{
DeleteObject(m_bitmap);
}