Erreur sur l'utilisation de DrawText
J'essaie d'utiliser la fonction DrawText pour imprimer une chaine de caracteres mais j'ai une erreur que je n'arrive pas a resoudre :aie:
Code:
1 2 3 4 5 6 7 8 9 10
|
String S;
TRect R;
R.left = 10;
R.top = 10;
S = "Calcul rectangle avec DrawText";
DrawText(Printer()->Handle, S.c_str(), S.Length(), R, DT_CALCRECT); |
Citation:
[C++ Error] Unit1.cpp(30): E2034 Cannot convert 'TRect' to 'tagRECT *'
[C++ Error] Unit1.cpp(30): E2342 Type mismatch in parameter 'lpRect' (wanted 'tagRECT *', got 'TRect')
L'erreur est sur TREct mais la je seche :?