By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,332 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,332 IT Pros & Developers. It's quick & easy.

RECt Structure Problem

P: n/a
Hi all,

I am working on 16 bit app on windows. My problem is I am using
windows RECT structure. on 16 bit windows it 's all member are declared

as short which allows max 32767 max value. and i require more valus to
be stored for the Rect.
So i created my own rect structure with long members. but when i do
this call windows API GetWindowRect() fails. it does fill the rect
structure with appropriate values. can any one help.
Thanks in advance.

Jul 6 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
* bunty:
>
I am working on 16 bit app on windows. My problem is I am using
windows RECT structure. on 16 bit windows it 's all member are declared
as short which allows max 32767 max value. and i require more valus to
be stored for the Rect.
So i created my own rect structure with long members. but when i do
this call windows API GetWindowRect() fails. it does fill the rect
structure with appropriate values. can any one help.
You can not change the nature of a function that you don't control.

You can call that function with the argument type(s) it expects.

You can then copy the data to whatever structure you want.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 6 '06 #2

P: n/a
TB
bunty skrev:
Hi all,

I am working on 16 bit app on windows. My problem is I am using
windows RECT structure. on 16 bit windows it 's all member are declared

as short which allows max 32767 max value. and i require more valus to
be stored for the Rect.
So i created my own rect structure with long members. but when i do
this call windows API GetWindowRect() fails. it does fill the rect
structure with appropriate values. can any one help.

Hm, do you really have a resolution which can't be expressed with
16-bit values? What kind of super screen do you have?

--
TB @ SWEDEN
Jul 6 '06 #3

P: n/a
Hi TB,

I am not using any super screen. I am simply writing in a window and
need to set the max value of ScrollBar by unsing windows API
SetScrollRange(). for that i am calculating the size of window. which
is more than the short value on 16 bit windows.

Jul 6 '06 #4

P: n/a

bunty wrote:
Hi TB,

I am not using any super screen. I am simply writing in a window and
need to set the max value of ScrollBar by unsing windows API
SetScrollRange(). for that i am calculating the size of window. which
is more than the short value on 16 bit windows.
you can get better answers in microsoft.public.vc.mfc.

Any way Scroll bar's max range is 32767.

-- Murali Krishna.

Jul 6 '06 #5

P: n/a
"bunty" <Di***************@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hi TB,

I am not using any super screen. I am simply writing in a window and
need to set the max value of ScrollBar by unsing windows API
SetScrollRange(). for that i am calculating the size of window. which
is more than the short value on 16 bit windows.
You have a "size of window" greater than 32767? Or the total window size?
Regardless, as someone stated the max value for a scroll bar is 32767
anyway. You can't fit 5 pounds of... stuff in a 10 pound bag.
Jul 7 '06 #6

P: n/a
In article <Ht*************@fe02.lga>, ta*******@rocketmail.com
says...

[ ... ]
You can't fit 5 pounds of... stuff in a 10 pound bag.
At least to me, that sounds like it's not only possible, but pretty
easy to handle.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 7 '06 #7

P: n/a
"Jerry Coffin" <jc*****@taeus.comwrote in message
news:MP************************@news.sunsite.dk...
In article <Ht*************@fe02.lga>, ta*******@rocketmail.com
says...

[ ... ]
>You can't fit 5 pounds of... stuff in a 10 pound bag.

At least to me, that sounds like it's not only possible, but pretty
easy to handle.
Well, drat. Meant to say can't fit 10 pounds of stuff in a 5 pound bag.
*blush*
Jul 13 '06 #8

P: n/a
Jim Langston posted:
"Jerry Coffin" <jc*****@taeus.comwrote in message
news:MP************************@news.sunsite.dk...
>In article <Ht*************@fe02.lga>, ta*******@rocketmail.com
says...

[ ... ]
>>You can't fit 5 pounds of... stuff in a 10 pound bag.

At least to me, that sounds like it's not only possible, but pretty
easy to handle.

Well, drat. Meant to say can't fit 10 pounds of stuff in a 5 pound bag.
*blush*

Depends if:

(1) Gravity is the same inside the bag as outside (because the pound is
a unit of force rather than mass).
(2) Pressure is the same inside the bag as outside (because pressure
can reduce volume).
Plenty more things to consider...
--

Frederick Gotham
Jul 13 '06 #9

P: n/a
In article <5N**********@fe04.lga>, ta*******@rocketmail.com says...

[ ... ]
Well, drat. Meant to say can't fit 10 pounds of stuff in a 5 pound bag.
Obviously you inverted the sense of operator< for class
"pounds_of_stuff". :-)

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 14 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.