File Select dialog Extender

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

File Select dialog Extender

Postby siavoshkc » 04 Jun 2010 09:46

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.
Attachments
DlgSelect.cpp
(2.82 KiB) Downloaded 107 times
siavoshkc
 
Posts: 347
Joined: 02 Nov 2009 09:37

Re: File Select dialog Extender

Postby raspopov » 05 Jun 2010 07:41

You can use DrawText() or TextOut() to get text metrics.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: File Select dialog Extender

Postby siavoshkc » 05 Jun 2010 21:42

Used GetTextExtent.

This one is better.
Attachments
DlgSelect.cpp
(2.94 KiB) Downloaded 111 times
siavoshkc
 
Posts: 347
Joined: 02 Nov 2009 09:37

Re: File Select dialog Extender

Postby raspopov » 07 Jun 2010 18:39

Not better. I fixed this in right way.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: File Select dialog Extender

Postby siavoshkc » 08 Jun 2010 18:13

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.
Attachments
DlgSel.JPG
siavoshkc
 
Posts: 347
Joined: 02 Nov 2009 09:37

Re: File Select dialog Extender

Postby raspopov » 08 Jun 2010 21:13

Items in drop-down list are not clipped.
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30


Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest

cron