irtheman Posted May 9, 2007 Posted May 9, 2007 Is it possible to determine the display width of a string before it is displayed? I am thinking of something similar to TextWidth in VB6 where you can get the graphic width of a text string as it relates to the current font. Ideas? Thanks! Matthew
evilertoaster Posted May 9, 2007 Posted May 9, 2007 I guess some implmentation of GetCharWidth32() or GetCharWidthFloat() (GDI32) could do this. You can get a general idea for a specific font by trying it out and getting some averages...
erebus Posted May 9, 2007 Posted May 9, 2007 I don't know if this is what you are looking for but have a look anyway:http://www.autoitscript.com/forum/index.php?showtopic=41315
evilertoaster Posted May 9, 2007 Posted May 9, 2007 Also this UDF on the forums-http://www.autoitscript.com/forum/index.ph...st&p=200715
irtheman Posted May 10, 2007 Author Posted May 10, 2007 Also this UDF on the forums-http://www.autoitscript.com/forum/index.ph...st&p=200715Nice solution. With a few tweaks it works perfectly for me. Thanks!
irtheman Posted May 10, 2007 Author Posted May 10, 2007 I don't know if this is what you are looking for but have a look anyway:http://www.autoitscript.com/forum/index.php?showtopic=41315This looks really awesome. I really need to play around with the Auto3Lib some time. I bet it works far more elegantly than what I am using now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now