merci beaucoup,
j'ai trouvé : j'avais mis avant SetTextAlign(CENTER)
youdontcare
quand je disais ça c'était pour que tu lises la doc en fait ...
DT_CALCRECT Determines the width and height of the rectangle. If there are multiple lines of text, DrawTextA uses the width of the rectangle pointed to by the pRect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, DrawTextA modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawTextA returns the height of the formatted text but does not draw the text.
antsite
Avec DT_CALCRECT, il affiche plus rien du tout. J'ai aussi remarqué que mon texte est coupé en deux, une partie non visible (gauche) et une partie visible (droite).
youdontcare
non. apparemment il clippe le texte au rectangle que tu lui files. essaye le paramètre DT_CALCRECT pour chopper la taille de ton rectangle.
antsite
Quelqu'un a-t-il déjà utilisé cette fonction ?
up :)
antsite
A chaque fois que j'utilise cette fonction celà me coupe le bord gauche de mon texte.
Voici mon code :
RECT cadr;
cadr.left = 50;
cadr.top = 50;
cadr.right = 200;
cadr.bottom = 200;
DrawText(hdc,"bonjour à vous les amis\ncomment vous allez ?\0",-1,&cadr,DT_BOTTOM);