Post by FarnsworthPost by Deanna EarleyPost by -mhdAre the values represented by Right and Bottom supposed to be absolute or
relative to Left and Top?
They are the absolute right and bottom coordinates*. If they were
relative, they would be called width and height.
* exclusive. 10,10 to 20,20 will give you a 10x10 box from 10,10 to 19,19.
http://blogs.msdn.com/b/oldnewthing/archive/2004/02/18/75652.aspx
You probably were thinking of something else. Right and Bottom are always
relative to Left and Top.
No they're not.
If what you say is true, it makes that entire article rubbish, and this
Post by FarnsworthThe structure specifies the coordinates of two points: the upper left and lower right corners of the rectangle.
The coordinate value of a rectangle's right side must be greater than that of its left side.
Some functions always set Left and Top to 0, such
as GetClientRect(), but not GetWindowRect(), so subtracting from Left and
Top always gets you the correct numbers.
You've just contradicted yourself there. subtracting makes no sense if
they're relative anyway (Only addition would be necessary).
Having said all that, A RECT is purely a container so it's entirely down
to the creator and consumer to agree on how to interpret it. Accepted
practice says top left inclusive to bottom right exclusive.
--
Deanna Earley (***@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk/icatcher/
iCode Systems
(Replies direct to my email address will be ignored. Please reply to the
group.)