Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Wrong Size problem..
Wrong Size problem.. [message #7494] Mon, 01 January 2007 22:15 Go to next message
yoco is currently offline  yoco
Messages: 25
Registered: June 2006
Location: Taiwan
Promising Member
I found there is a problem about the size of controls.

I layout a control with size 360x360 (in pixel),
but I found that, the "real size" is about 400x400,
which is bigger than I expected.

Therefor I put another control with size 20x20,
and I counted the size of this control pixel by pixel,
the result is 22x22!

The actrul size of all controls (and windows) are about 11% bigger than I designed.
And I can't figure out how to fix this problem @@"
What can I do now?

Thank you ^_^

---
Environment:
OS:XP SP1
Compiler:VC++7
UppVer:612 dev3
(I'm not sure does previous version has this problem too.)
Re: Wrong Size problem.. [message #7498 is a reply to message #7494] Tue, 02 January 2007 00:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13974
Registered: November 2005
Ultimate Member
Well, dialogs are zoomed because the size of font is different (Everything is defined relative to choosen base font, then scaled up for actual font).

The right thing to do is to design your widgets so that they do not care.

Mirek
Re: Wrong Size problem.. [message #7500 is a reply to message #7498] Tue, 02 January 2007 07:05 Go to previous messageGo to next message
yoco is currently offline  yoco
Messages: 25
Registered: June 2006
Location: Taiwan
Promising Member
luzr wrote on Mon, 01 January 2007 18:18

Well, dialogs are zoomed because the size of font is different (Everything is defined relative to choosen base font, then scaled up for actual font).

The right thing to do is to design your widgets so that they do not care.

Mirek



Yes, I know the real size is determined by the system default font.
I havd read it in document "Logical positions."
Quote:


Zoom factor is determined by ratio of text "OK Cancel Exit Retry" in runtime standard font size to Size(99, 13) - size of this text using standard font.



However, in the layout tool of TheIDE,
the size of controls are assigned in
LeftPosZ(16, 108).TopPosZ(20, 36)

There are "Z" postfix in there functions,
which means the size of there controls are "Zoomed".

Is it possible that, the wrong size is caused by the numerical error of the integer divide operation?
Re: Wrong Size problem.. [message #7501 is a reply to message #7500] Tue, 02 January 2007 07:26 Go to previous message
mirek is currently offline  mirek
Messages: 13974
Registered: November 2005
Ultimate Member
Quote:



However, in the layout tool of TheIDE,
the size of controls are assigned in
LeftPosZ(16, 108).TopPosZ(20, 36)

There are "Z" postfix in there functions,
which means the size of there controls are "Zoomed".




Well, I guess that is a little misunderstanding. It actually means that they "have to be Zoomed".

BTW, remove Z and they will be pixel-exact.

Mirek
Previous Topic: Drawing Backgroud
Next Topic: Create my own Rect for clipping?
Goto Forum:
  


Current Time: Tue Mar 19 12:46:28 CET 2024

Total time taken to generate the page: 0.00919 seconds