Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text in a DIB
Message
From
18/12/2000 06:12:12
 
 
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00454517
Message ID:
00454608
Views:
22
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...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform