text in UI objects

mail's icon

Hello

I am having problems porting a UI object from Mac to Windows. I
followed closely the qtxgui example that comes with the developer SDK
and everything works fine, apart from displaying text.

When I use "drawstr", I get my string printed in correct size and
font face but not at the right place. In fact, it is displayed
somewhere else on the screen and it keeps on writing until it reaches
the edge of the window. In other words: "MoveTo" has no effect at all.

TextSize(x->fontsize );
TextFont(x->fontnum);
MoveTo(x, y);
drawstr(c);

When I use "MacDrawText" instead, my text appears at the right
location (i.e. MoveTo works as usual) but I get the wrong font size
(too large) and the wrong font face (not corresponding with the font
chosen from the menu).

TextSize(x->fontsize);
TextFont(x->fontnum);
MoveTo(x, y);
MacDrawText(c, 0, strlen(c));

I hope this is a well known problem and somebody can help me out.

Philippe

------------------------------------------------------------ ------------
-------------------
Philippe Kocher /// Rohrhaldenstrasse 45 /// CH - 8712 Staefa
phone: +41 79 204 75 22 /// mail@philigree.ch /// www.philigree.ch
------------------------------------------------------------ ------------
-------------------