I want to put the image captured by the camera into a picture control.
The code I used is this : errno_t memcpy_s(void *dest,size_t destSize,const void *src,size_t count);
I guess I need to define dest, destSize, src, and count separately here.
so I’d like to know how to do that.
this is whole context :
#include "stdafx.h"
#include "BaslerCode.h"
#include <pylon/PylonIncludes.h>
#include <iostream>
#include "resource.h"
#include "CImageEventHandler.h"
void BaslerCode::OnImageGrabbed(CInstantCamera& camera, const CGrabResultPtr& ptrGrabResult)
{
if (ptrGrabResult->GrabSucceeded())
{
formatConverter.OutputPixelFormat = PixelType_Mono8;
formatConverter.Convert(imageRGB, ptrGrabResult);
CImage img;
img.Create(imageRGB.GetWidth(),imageRGB.GetHeight(), 8);
errno_t memcpy_s (void *dest,size_t destSize,const void *src,size_t count);
// dest =
// destSize =
// src =
// count =
CWnd* pPictureBox = AfxGetApp()->GetMainWnd();
CDC* pDC = pPictureBox->GetDC();
CRect rect;
pPictureBox->GetClientRect(&rect);
img.StretchBlt(pDC->m_hDC,0,0,rect.Width(),rect.Height(),SRCCOPY);
pPictureBox->ReleaseDC(pDC);
}
When debugging with this code, the entire screen goes black beyond the picture control.
Any help would be appreciated.
8