关于实时显示中位图的有关问题

关于实时显示中位图的问题
在实现了相机拍摄和存储问题后,想要在MFC上实现实时显示的功能,但是对于内存中位图这一块不是很明白。现在的思路是将每次内存中获取的一帧图像转化为位图再显示到图像控件中。不知是否可行,具体转化过程如何?求解答。

获取图像的代码如下(程序代码比较多,贴出获取图像及写入文件部分):
        error = flycaptureLockNext(g_arContext[uiCamera], &g_arImageplus[uiCamera]);
        //锁定下一帧,获取图像
        
    // Start timer
    QueryPerformanceCounter( (LARGE_INTEGER*)&nStartTime );

    // Calculate the size of the image to be written
    int iImageSize = 0;  
    int iRowInc = g_arImageplus[uiCamera].image.iRowInc;
    int iRows = g_arImageplus[uiCamera].image.iRows;
    iImageSize = iRowInc * iRows;
 

    // Write to the file,写入文件
    bSuccess = WriteFile(
       arhFile[uiCamera], 
       g_arImageplus[ uiCamera ].image.pData, 
       iImageSize,
       &ardwBytesWritten[uiCamera], 
       NULL );

        // End timer
    QueryPerformanceCounter( (LARGE_INTEGER*)&nEndTime ); 

            error = flycaptureUnlock( 
            g_arContext[uiCamera], g_arImageplus[uiCamera].uiBufferIndex );

------解决方案--------------------
写位图不是这个样子的,要定义位图头,除非你在照相机直接存储为位图格式。不然就要先建头后保存

看看位图文档结构和保存方法
位图文档

------解决方案--------------------
那你就自己建立一个位图,把头全部填充好,然后数据区用g_arImageplus[ uiCamera ].image.pData填充。应该就可以了