RECt Structure Problem

B

bunty

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.
 
A

Alf P. Steinbach

* 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.
 
T

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?
 
B

bunty

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.
 
M

Murali Krishna

bunty said:
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.
 
J

Jim Langston

bunty said:
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.
 
J

Jerry Coffin

[ ... ]
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.
 
J

Jim Langston

Jerry Coffin said:
[ ... ]
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*
 
F

Frederick Gotham

Jim Langston posted:
Jerry Coffin said:
[ ... ]
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top