void DrawBitmap(CDC& dc, CBitmap* pbm)
CDC dcMem;
CString data;
CRect r;
dcMem.CreateCompatibleDC(&dc);
CBitmap* pOldBitmap = dcMem.SelectObject(pbm);
r = (CRect*) malloc( sizeof(CRect) );
r.left = 10;
r.top = 10;
r.bottom = 100;
r.right = 100;
data = "test";
CDC::DrawText( data, -1, r, DT_CENTER );
//: error C2352: 'CDC::DrawTextA'
//: illegal call of non-static member function
//: see declaration of 'DrawTextA'
dcMem.SelectObject(pOldBitmap);
}
Do you know what is going wrong here ?
have a look at the comment lines please.
============================================================
'C' is shorthand for Confusion, 'C++' much more confusion...