I want to write method which assing to CPaintDC member a CDC object.
This is sample method:
void CToradexEkg1View::setDCPaint(CDC dcmem)
{
dcPaint = dcmem;
}
Below is calling this metod:
void CToradexEkg1View::updateBitmap()
{
PrintingObject * printingObject = getPrintingSet();
Bitmap.LoadBitmapW(IDB_BITMAP1);
GetObject(Bitmap, sizeof(bmpInfo), &bmpInfo);
cdc.CreateDC(L"DISPLAY", NULL, NULL, NULL);
dcMemory.CreateCompatibleDC(&cdc);
dcMem.CreateCompatibleDC(NULL);
dcMem.SelectObject(&Bitmap);
hbmpMem.CreateCompatibleBitmap(&cdc, bmpInfo.bmWidth, bmpInfo.bmHeight);
dcMemory.SelectObject(&hbmpMem);
dcMemory.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMem, 0, 0, SRCCOPY);
m_pSignalDisplay->DrawECG(&dcMemory, printingObject->samples[0], 3, 9000);
test = cdc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory, 0, 0, SRCCOPY);
cdc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory, 0, 0, SRCCOPY);
setDCPaint(dcMemory);
}
This is snippet from header file:
BOOL test;
CBitmap Bitmap2;
CBitmap hbmpMem;
CBitmap Bitmap;
CDC dcPaint;
BITMAP bmpInfo;
HBITMAP hbmObraz;
CDC cdc;
CDC dcMemory;
CDC dcMem;
When I am calling the function setDCPaint(dcMemory)
I get error:
Error 39 error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject' C:\Program Files (x86)\Windows CE Tools\SDKs\Toradex_CE800\sdk\atlmfc\Include\afxwin.h 1137 1 ToradexEkg1
How I can solve this problem?