June 28, 2024, 02:18:18 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Text length

Started by Andy, February 18, 2015, 11:26:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

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.



Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

ckoehn

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

LarryMc

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.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

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
When all else fails, get a bigger hammer.

Andy

Thanks Bill and Larry,

I will check out your suggestions.

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

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.