IonicWind Software

IWBasic => General Questions => Topic started by: Andy on February 18, 2015, 11:26:58 PM

Title: Text length
Post by: Andy on February 18, 2015, 11:26:58 PM
Hi,

Me again, sorry.

I have a program with several checkboxes, along side them each is a combo box and finally static text.

The person I wrote this for says not all the text is being displayed before the combo box.

In other words, on my machines a checkbox says:

"Warn me if the computer has not been backed up in" - and then a combo box to select the number of days.

They are seeing:
"Warn me if the computer has not been bac" - and then a combo box to select the number of days.

I'm told there screen resolution is 2550x1440, my maximum is 1280x1024.

Is there a way to "calculate" or work out on a machine the position of the combo box so that whatever screen resolution they have the text in the checkbox will not be truncated, is that possible?

I've tried the program on XP, Win7 & 8.1 on different machines and it's always fine (not truncated) for me as the attached screenshot shows.

Thanks,
Andy.



Title: Re: Text length
Post by: ckoehn on February 19, 2015, 06:38:56 AM
I know what you are talking about.

Would "GETTEXTSIZE window, string, varWidth, varHeight" work for you?  Compare the varWidth with your control width?

Later,
Clint
Title: Re: Text length
Post by: LarryMc on February 19, 2015, 08:02:28 AM
Wish it was that easy.
Suggest you read this:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd371771(v=vs.85).aspx

It discusses writing writing high DPI aware applications.
Title: Re: Text length
Post by: billhsln on February 19, 2015, 09:20:11 AM
Actually, you might want to check to see if the FONT you are using is available on their machine.  That could explain why it looks ok on your PC, but cuts off on theirs.  They might not have the font you are using and the font it picked to use is larger than you are allowing space for.

Bill
Title: Re: Text length
Post by: Andy on February 19, 2015, 11:01:59 PM
Thanks Bill and Larry,

I will check out your suggestions.

The Font being used is Arial, so nothing strange there.

Andy.