1. David or Bernie

When I use the following

        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTSIZE})
        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZSIZE})

I get return values of 127 and 169 respectively! How come?

These functions are supposed to return the physical dimensions of the screen
in millimeters,
and my 14" screen hasn't suddenly shrunk to 5" x 6.5"......

...or is my thinking to logical for micro$oft?


btw Bernie, your Win32API will provide a very useful reference tool, as
David's Win32Lib already does.

Great work fellas.


Totally bemused, confused and dazed

Terry

new topic     » topic index » view message » categorize

2. Re: David or Bernie

Terry wrote:

> GetDeviceCaps

From Petzold:

"Of course, the Windows driver doesn't really know the exact size of the
display you have attached to your video adaptor. These dimensions are based
on standard display sizes for the adaptors."

The screenshot above that paragraph shows a listing of his DEVCAPS1 program,
and the values are the same as yours.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

3. Re: David or Bernie

On Wed, 29 Sep 1999 16:38:03 -0400, Terry <terry at EDERNEY.IDPS.CO.UK> wrote:

>When I use the following
>
>        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTSIZE})
>        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZSIZE})

Terry
  The value maybe what your video driver is telling windows.

  Did you try to see what these return
        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTRES})
        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZRES})


>btw Bernie, your Win32API will provide a very useful reference tool, as
>David's Win32Lib already does.

  My library is more than a reference, it also a complete self contained

  enviorment that can be used to write windows programs that took 2500

  hours of work to write :)

Bernie

new topic     » goto parent     » topic index » view message » categorize

4. Re: David or Bernie

On Wed, 29 Sep 1999 18:42:48 -0400, Bernie Ryan <bwryan at PCOM.NET> wrote:

>Terry wrote:
>
>>When I use the following
>>
>>        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTSIZE})
>>        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZSIZE})
>
>Terry
>  The value maybe what your video driver is telling windows.

>  Did you try to see what these return
>        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTRES})
>        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZRES})

Yes, they correctly return the screen size in pixels.

>>btw Bernie, your Win32API will provide a very useful reference tool, as
>>David's Win32Lib already does.
>
>  My library is more than a reference, it also a complete self contained
>
>  enviorment that can be used to write windows programs that took 2500
>
>  hours of work to write :)
>
>Bernie

Oops, sorry if my comment sounded belittleing (how do you spell that?)
it certainly wasn't meant to :(


Thanks also to David C.

David wrote:
>"Of course, the Windows driver doesn't really know the exact size of the
>display you have attached to your video adaptor. These dimensions are based
>on standard display sizes for the adaptors."

If it doesn't return the correct values what is it's use?
With reference to your EzCreateFont function, how can the wrong value
provide useful info?


Soon to be back with another silly Q

Terry

new topic     » goto parent     » topic index » view message » categorize

5. Re: David or Bernie

Terry wrote:

> On Wed, 29 Sep 1999 18:42:48 -0400, Bernie Ryan <bwryan at PCOM.NET> wrote:
>
> >Terry wrote:
> >
> >>When I use the following
> >>
> >>        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTSIZE})
> >>        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZSIZE})
> >
> >Terry
> >  The value maybe what your video driver is telling windows.
>
> >  Did you try to see what these return
> >        phys_height = c_func(GetDeviceCaps, {win1_dc, VERTRES})
> >        phy_width = c_func(GetDeviceCaps, {win1_dc, HORZRES})
>
> Yes, they correctly return the screen size in pixels.
>
> >>btw Bernie, your Win32API will provide a very useful reference tool, as
> >>David's Win32Lib already does.
> >
> >  My library is more than a reference, it also a complete self contained
> >
> >  enviorment that can be used to write windows programs that took 2500
> >
> >  hours of work to write :)
> >

2500 hours? that's 104 days, working non stop, 24 hours a day, or more than two
years, working on it 3 hours a day, every day.

I do hope you're exaggerating =)

Regards,
Greg Phillips

> >Bernie
>
> Oops, sorry if my comment sounded belittleing (how do you spell that?)
> it certainly wasn't meant to :(
>
> Thanks also to David C.
>
> David wrote:
> >"Of course, the Windows driver doesn't really know the exact size of the
> >display you have attached to your video adaptor. These dimensions are based
> >on standard display sizes for the adaptors."
>
> If it doesn't return the correct values what is it's use?
> With reference to your EzCreateFont function, how can the wrong value
> provide useful info?
>
> Soon to be back with another silly Q
>
> Terry

--
The Euphoria CD Project:
"Only $9.95, and comes with this juicer absolutely free!"
http://www.redrival.com/euphoria/doslinux.html

new topic     » goto parent     » topic index » view message » categorize

6. Re: David or Bernie

Terry wrote:

> If it doesn't return the correct values what is it's use?

What can I say? I didn't write the function.

> With reference to your EzCreateFont function, how can
> the wrong value provide useful info?

Well, I took the EzCreateFont function from Charles Petzold.

If you are trying to show something in the exact size, it's not. But the
only thing I want is to be able to create a font in a given font size
relative to all the other applications. If every Windows program generates a
10 point character as 3 feet high, that's fine - as long as mine do as well.

Keep in mind that the metrics are relative to the device, as well - a 20
pixel high font may be visible on the screen, but not on the printer.

X Windows has this same sort of problem. It has no idea what the physical
size of the screen is, so it can have some very unreadable displays.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

7. Re: David or Bernie

Greg
   12 hours a day 7 days a week is 84 hours
   84 hours x 30 days is 2520 hours
Bernie

new topic     » goto parent     » topic index » view message » categorize

8. Re: David or Bernie

David
  If you used logical units then wouldn't it be the same from one
  context to another ?
Bernie

new topic     » goto parent     » topic index » view message » categorize

9. Re: David or Bernie

Bernie Ryan wrote:

> Greg
>    12 hours a day 7 days a week is 84 hours

Yes...

>
>    84 hours x 30 days is 2520 hours

but:
2520 / 84 hours = 30 *weeks*

Keep in ming there are only 720 hours in a month.

>
> Bernie

Greg Phillips

new topic     » goto parent     » topic index » view message » categorize

10. Re: David or Bernie

Greg
   No matter how long it took to write and debug, it was a waste of time
   because nobody seems interested in trying to use it.
Bernie

new topic     » goto parent     » topic index » view message » categorize

11. Re: David or Bernie

Do we have to repeat the saga of VEL x times in this space. There is a
concept called mindshare. It basically means that people have limited
bandwidth and usually won't look at something new until what they are using
has failed them in some critical way. Bernie, what I saw from you was a very
short announcement of your lib. There wasn't near enough
information/advertising in it too even tell for sure what it was capable of.
Just saying that it wraps up everything about windows probably doesn't mean
a lot to many of the programmers on this beat. First, that sounds more like
boast than reality. Second, it wasn't followed by a "for example" list of
things that your lib does that nobody else's does. Even if yours was the
best thing since sliced bread, it would take a while for people to discover
and use it effectively. A lesson might be learned from the VEL mixup.
Apparently VEL was simple and straightforward enough to use and sufficiently
bugfree to excite little comment from those that were using it. And not
everybody monitors this little patch of Euphoria excitement. IF you want
applause, you have to get up on the stage and do something. If you want your
library to be used and commented on, tell us about it, upgrade it and make
an announcement, something. I wouldn't comment, but it seems that there are
a large number of people doing exciting things with this language in areas
that one wouldn't believe for a language that is even close to interpretive
status and it would be a shame to lose any of them because of unrealistic
expectations.

Everett L.(Rett) Williams
rett at gvtc.com

new topic     » goto parent     » topic index » view message » categorize

12. Re: David or Bernie

Bernie Ryan wrote:
> Greg
>    No matter how long it took to write and debug, it was a waste of t=
ime
>    because nobody seems interested in trying to use it.
> Bernie
>

Oh no, Bernie, we've heard such complaints before. I have used it
and certainly will be using it in the future, as a sort of tutorial
in a sense. Although I can't spend 12 hours a day on it, I'm trying
to become more 'fluent' in Win32 programming. And your program and
documentation is a great help.

Thanks!
--
 ^  |
/-\<|

-----

 | Gratis e-mail en meer: http://www.dolfijn.nl/
 | Een product van Ilse: http://www.ilse.nl/

new topic     » goto parent     » topic index » view message » categorize

13. Re: David or Bernie

Bernie-

wouldn't you base what you multiply 84 hours by how many weeks, not by
days...

Mike Hurley
----- Original Message -----
From: Bernie Ryan <bwryan at PCOM.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Wednesday, September 29, 1999 9:39 PM
Subject: Re: David or Bernie


> Greg
>    12 hours a day 7 days a week is 84 hours
>    84 hours x 30 days is 2520 hours
> Bernie
>

________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

new topic     » goto parent     » topic index » view message » categorize

14. Re: David or Bernie

Bernie Ryan wrote:

> Greg
>    No matter how long it took to write and debug, it was a waste of time
>    because nobody seems interested in trying to use it.
> Bernie

For what it's worth, I did download it, and gave it a spin.
I was quite impressed, it's already quite full-featured.  Unfortunately, it
just requires too darned much coding for most of the applications I write.
Win32lib works fine for most things...but, in the event I need the maximum
amount of control over my program, your lib may come in very handy.

Regards,
Greg Phillips

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu