473,657 Members | 2,499 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RECt Structure Problem

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
9 2028
* 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
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
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

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.publi c.vc.mfc.

Any way Scroll bar's max range is 32767.

-- Murali Krishna.

Jul 6 '06 #5
"bunty" <Di************ ***@gmail.comwr ote in message
news:11******** **************@ p79g2000cwp.goo glegroups.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
In article <Ht************ *@fe02.lga>, ta*******@rocke tmail.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
"Jerry Coffin" <jc*****@taeus. comwrote in message
news:MP******** *************** *@news.sunsite. dk...
In article <Ht************ *@fe02.lga>, ta*******@rocke tmail.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
Jim Langston posted:
"Jerry Coffin" <jc*****@taeus. comwrote in message
news:MP******** *************** *@news.sunsite. dk...
>In article <Ht************ *@fe02.lga>, ta*******@rocke tmail.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
In article <5N**********@f e04.lga>, ta*******@rocke tmail.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_stuf f". :-)

--
Later,
Jerry.

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6436
by: Alex NSB | last post by:
Hi all. Consider the following page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD><TITLE>Test</TITLE> <STYLE TYPE="text/css"> <!-- #mylayerDiv {position:absolute;left:50px;top:50px;clip:rect(0px, 50px, 50px,
3
2392
by: Muhammad Farooq-i-Azam | last post by:
Hi, I am trying to define an arp structure but having problem doing so. I think I have define the correct arp structure but I find myself in a strange problem. The size of structure that I have defined is 28 bytes, but it is reported to be 32 bytes by the sizeof() call. Interestingly, sum of individuals members of the sturcture is 28. However, the sizeof() the entire structure is returned to be 32.
2
1526
by: Kay L. | last post by:
Hi, when I draw a long text inside a rect, it will go outside, I want to know which charactor is the last one which is inside the rect. I know I can do like below, but it's not efficient, is there any better way to do this, thanks. CString str = "a long text"; // if it's too long, I want to draw "a long t..."; CRect rc(0,0,100,100); char c; for(int i=0; i<str.GetLength(); i++)
6
23046
by: Mythran | last post by:
I have a question regarding the RECT structure required for PInvoke calls. I was reviewing the Rectangle structure (System.Drawing.Rectangle) and it occurred to me that I may be able to use this structure in place of defining a RECT structure. I would create the RECT structure definition the same as the Rectangle structure is defined. Is there any problems with using Rectangle in place of RECT for the API functions? Thanks, Mythran
1
2180
by: osmarjunior | last post by:
I override the OnShown event of a form and call both methods Select() and Focus() of a RadioButton. The RadioButton is selected, but the focus rect is not visible. If I press Tab key to exit the RadioButton, and press Shift+Tab to back to the control, then the focus rect is visible... But I wanna make the focus rect visible as soon as the form is shown. How can I ensure this? Thanks.
2
1342
by: yinglcs | last post by:
Hi, I have a class called 'A', and it has a method called 'Rect(int x, int y, int w, int h)' And I have another class called 'Rect'. When I called 'Rect* in other method of A, I get this compiler error: void A::aMethod() { Rect* lastRect;
4
1717
by: eBob.com | last post by:
In my class which contains the code for my worker thread I have ... Public MustInherit Class Base_Miner #Region " Delegates for accessing main UI form " Delegate Sub DelegAddProgressBar(ByVal uiform As Form1, ByRef si As MTCC02.Form1.SiteRunOpts, _ ByVal numitems As Integer) #End Region
1
1424
by: globalrev | last post by:
http://www.pygame.org/docs/ref/rect.html#Rect.move well i need to put my rect ina specific place and i donw know from where i will move it so i need a function rect.moveTo(x,y). how do i do that?
29
4071
by: Chris Riesbeck | last post by:
I have an image with a class and the class defines a clip rectangle. In Firefox 2 and 3, and Opera 9, I can access the rectangle with document.defaultView.getComputedStyle(). But that doesn't seem to work in Safari for Windows 3, nor when I use image.currentStyle.clip in IE 7. Is there a way to do this in those browsers? Am I doing something stupid?
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.