Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text in a DIB
Message
De
18/12/2000 06:12:12
 
 
À
18/12/2000 04:22:13
Information générale
Forum:
Visual C++
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00454517
Message ID:
00454608
Vues:
23
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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform