[Prev][Next][Index][Thread]

<text-field>, size, GDI context...



I'd like to set a <text-field> width in terms of a particular string,
not pixels. To do this I have to have a valid GDI context handle, and
the font of the text field, then make the call to get the string width,
and set the width of the text field accordingly.

I've tried this, and somehow I haven't gotten a valid context, I think,
because I always get 0 for the width.

To do this, I need to have the context and info, preferably before the
layout is all calculated so I don't have to re-layout. If the DUIM
doesn't accomodate that sequence, and I have to create a global scratch
GDI for my calculations so that I can get the width info earlier in the
sequence, that would be OK.

Any suggestions as to how to approach this?



Follow-Ups: