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

Finding the width of a window title



In my system, we need to be able to put up several different types of
window (some which have close boxes and some that don't). The routine takes
the text to be displayed in the window and then calculates the size that
the window needs to be.

The problem I have is in finding out how wide the window needs to be to
cater for the title. If the text in the body of the window isn't very long
but the title is, I get the end chopped off.

I've tried horrible hacks like having a fudge factor that allows for the
zoom box and the amount of border that always surrounds the title, but I
can't find a generic way of discovering if a window has a close-box and a
zoom-box.

The most elegant would be a way of asking the system how wide it needs to
be... 

Any pointers?

Thanks
Denis

------------------------------------------------------------------------------
|Denis Howlett                             |Email denis@logcam.co.uk       
 |
|Logica Cambridge Ltd                      |Tel: +44 223 66343             
 |
|104 Hills Road, Cambridge CB2 1LQ, UK     |Fax: +44 223 322315            
 |
------------------------------------------------------------------------------