Page 1 of 1

File Select dialog Extender

PostPosted: 04 Jun 2010 09:46
by siavoshkc
To view longer text in combo box.

There was a TODO there that seemed to be an alternative.

I don't know a way to count a displayed text chars.

Re: File Select dialog Extender

PostPosted: 05 Jun 2010 07:41
by raspopov
You can use DrawText() or TextOut() to get text metrics.

Re: File Select dialog Extender

PostPosted: 05 Jun 2010 21:42
by siavoshkc
Used GetTextExtent.

This one is better.

Re: File Select dialog Extender

PostPosted: 07 Jun 2010 18:39
by raspopov
Not better. I fixed this in right way.

Re: File Select dialog Extender

PostPosted: 08 Jun 2010 18:13
by siavoshkc
This is your fixation in XP SP2. As you see item is still cliped and its not pretty.
BTW call to GetSystemMetrics() adds unneeded extra overhead.

Re: File Select dialog Extender

PostPosted: 08 Jun 2010 21:13
by raspopov
Items in drop-down list are not clipped.