[comp.os.os2] OS/2 PM Programming

rhv3pcs@mergvax (Richard Haasnoot) (11/09/89)

While working on a simple bitmap display program I wanted to disable the
size border.  However, upon investigation I found no method in which to do
such a thing.  I suppose I could simply ignore the WM_SIZE messages but I
think their ought to be a way to do what I want to do.  It occured to me 
also to call the function WinEnableWindow but I don't know the
handle for the border and WinWindowFromID can't be used because there
exists no FID_SIZEBORDER defined in 1.10.  Is it possible that the bordering
mechanism is a function of the frame window?  If so, how do I disable it
without imparing the function of the rest of the window? 
I'd really appreciate some insight into this matter.

	Thanx,
	Richie

slh@fred.cs.washington.edu (Scott Heyano) (11/15/89)

I think this will work:
	oldStyle = WinQueryWindowULong (hwndFrame, QWL_STYLE);
	WinSetWindowULong (hwndFrame, QWL_STYLE, oldStyle&~FS_SIZEBORDER);
where hwndFrame is the frame window of the your client.
This or something close to it should work.
Or maybe not.

cs169054@brunix (Peter Golde) (11/18/89)

In article <12642@mergvax> rhv3pcs@mergvax (Richard Haasnoot) writes:
>
>While working on a simple bitmap display program I wanted to disable the
>size border.  However, upon investigation I found no method in which to do
>such a thing.  I suppose I could simply ignore the WM_SIZE messages but I
>think their ought to be a way to do what I want to do.  It occured to me 

I think what you want to do is to just create the frame window with the
FCF_BORDER flag, not the FCF_SIZEBORDER flag.  The will prevent the window
from ever being resized.  You will probably not want the FCF_MAXIMIZE button
so that your window is never maximized.

paulb@minster.york.ac.uk (12/06/89)

Hi!  As there are a number of people in this newsgroup who obviously
seriously program OS/2 PM, I thought I'd ask about how people find it as
a programming environment.  Certainly, before I started using and
programming PM, I was very put off by the adverse publicity in the
computer press.  When I finally had a crack at an OS/2 machine, I
expected something slow, complex, arcane and unreliable.  In truth, I
found that I was very impressed by the system, and especially by the
ease of writing PM programs.  Sure they're more complex than straight
command-line style programs, but what wouldn't be?

On reflection, I feel that OS/2 has been given a very raw deal by the
press, which it doesn't deserve at all.

What does anyone else think?

Paul Butcher
JANET:paulb@uk.ac.york.minster

cs169054@cs.brown.edu (Peter Golde) (12/10/89)

In article <628894921.26415@minster.york.ac.uk> paulb@minster.york.ac.uk writes:
>On reflection, I feel that OS/2 has been given a very raw deal by the
>press, which it doesn't deserve at all.
>
>What does anyone else think?
>
>Paul Butcher
>JANET:paulb@uk.ac.york.minster

Of course it has.  As have most things that are pretty good.  It is
far easier and more exiting to report failures than successes.  Especially
when the reporter porbably knows diddly-squat about what he/she is writing.
If they really knew computers, they wouldn't be writing for
some magazine, they'd be working for some computer company.  
--PeterG

golding@saturn.ucsc.edu (Richard A. Golding) (12/10/89)

In article <628894921.26415@minster.york.ac.uk>, paulb@minster.york.ac.uk writes:
> Hi!  As there are a number of people in this newsgroup who obviously
> seriously program OS/2 PM, I thought I'd ask about how people find it as
> a programming environment.  
> ...  In truth, I
> found that I was very impressed by the system, and especially by the
> ease of writing PM programs.  Sure they're more complex than straight
> command-line style programs, but what wouldn't be?
> 

I suspect that the general observation is accurate that PM programming
has been trashed in the press because it's more complicated than
straight-line programming.  However, PM programming is far more painful
than it need be.  Having worked in four different windowing
environments -- PM, OpenView, X11 Xlib, and X11 toolkit (Xt), I have a
definite preference for Xt.  Several critical components of Xt are
simply far better designed than the equivalent parts of PM --
presumably the result of MIT and Stanford having iterated on the
problem of writing windowing applications for several years, then
having a significant fraction of workstation manufacturers provide input
before settling on any particular design.

For example, X uses a `translation manager' to govern the mapping
between external events and widget actions; a user or programmer can
reconfigure the event-to-action bindings as needed for any particular
application.  PM has no such facility.  Xt gets by with far fewer basic
kinds of widgets than PM does controls, because the widgets are
customisable.  Some of the Xt widgets are much better designed than
their PM counterparts -- the textWidget family, for example, is an
extremely flexible set of tools that can be composed to yield a number
of different kinds of multiple- and single-line text entry widgets,
whereas PM has the rather clunky MLE which has no composability.
(Concrete example:  if you want to edit a text file, with Xt you use an
asciiDiskWidget, which creates a `text source' of the file and uses a
standard `text sink' to display the information.  With PM you have to
handle loading the text into the control yourself.)

In summary, I'd say that PM programming probably isn't as bad as 
many people say it is.  But it's a lot more painful than it needs to
be.

-richard
-----------
Richard A. Golding, Crucible and  UC Santa Cruz CIS Board 
Internet:  golding@saturn.ucsc.edu 	
Work: {uunet | ucscc.ucsc.edu}!cruc!golding

yozzo@larouch.uucp (Ralph Yozzo) (12/10/89)

I'm biased, but here goes anyway...
 

PM is fine programming environment.  PM provides a lot 
of functions that each programmer would have had to 
roll his own version of.  For example, listboxes , menus, 
windows, scroll bars, and much more. 
 
The advantage of using PM is that programs can 
present a common user interface to the user.

I find that the combination of PM and codeview
make OS/2 1.1 and above a good programming environment.

------------------------------------------------------------------------------

| Ralph E. Yozzo                     | DISCLAIMER: The above message is from |

| IBM Thomas J. Watson Research Ctr. | me and is not from my employer.  IBM  |

| Arpanet: yozzo@ibm.com             | might completely disagree with me.    |

| Bitnet: yozzo@yktvmx.bitnet        \---------------------------------------|

| Home: ..!uunet!bywater!acheron!larouch!yozzo  | Phone: (914) 945-3634 work |

|                                               | Phone: (914) 564-4731 home |

------------------------------------------------------------------------------

horstman@sjsumcs.sjsu.edu (Cay Horstmann) (12/11/89)

In article <628894921.26415@minster.york.ac.uk> paulb@minster.york.ac.uk writes:
>....  Certainly, before I started using and
>programming PM, I was very put off by the adverse publicity in the
>computer press.  When I finally had a crack at an OS/2 machine, I
>expected something slow, complex, arcane and unreliable.  In truth, I
>found that I was very impressed by the system, and especially by the
>ease of writing PM programs....
>
>On reflection, I feel that OS/2 has been given a very raw deal by the
>press, which it doesn't deserve at all.
>
I must say I'd go along with that. There is nothing outrageously confusing
about PM, and it is certainly better than Windows. Of course, you can't
expect the scribes at InfoWorld to know anything about that, and people
like Duncan and Petzold of PC Magazine have extolled the praise of OS/2
consistently.

I do think MS is partially to blame, though.
(1) This waffling about Windows vs. OS/2 is extremely damaging. If they
    want to make Windows 3 with 16MB memory utilization, fine. BUT MAKE
    THE API THE SAME AS OS/2.
(2) Believe me, NOBODY is going to buy an OS without an HP LaserJet driver.
    Why do they keep delaying the thing?
(3) Ok, MS took the big companies to the cleaners by charging 3K for the SDK.
    Now it is time to TAKE OUT FULL-PAGE ADS in Computer Language, PJ etc
    with a one-stop-shopping offer for all you need to know to start writing
    an OS/2 PM program for $195. Like, send us the cover page of your C 
    compiler and a check. 
	 They have such a promotion for CD-ROMs. I guess Bill G. cares more
    about CD-ROMS than OS/2.
	 Yeah, I know MS claimed they lost money on the SDKs, but so what. 
    They'll win big only if OS/2 catches on. And while they can rely on the
    Unix folks to make a mess of things for a while, UI and OSF just MIGHT
    agree on a common graphics API, and I for one wouldn't mind developing
    for that instead. So, as my lawyer says, "time is of the essence."

Cay

wayne@dsndata.uucp (Wayne Schlitt) (12/13/89)

In article <628894921.26415@minster.york.ac.uk> paulb@minster.york.ac.uk writes:
> [ ... ]
> 
> On reflection, I feel that OS/2 has been given a very raw deal by the
> press, which it doesn't deserve at all.
> 
> What does anyone else think?
> 
> Paul Butcher
> JANET:paulb@uk.ac.york.minster


actually, i would say just the opposite.  considering the fact that
OS/2 has been hyped for 2 years now with for all practical purposes
_no_ applications or users, i would say that OS/2 has been given a
really good deal by the PC press.  yes, i know, OS/2 _does_ have users
and some applications now, but i doubt that it has as many as the atari
ST does.  how often do you see many page articles on the ST in the
press? 

basically, i think the _consumer_ has been/will be given a raw deal by
OS/2.  if ibm, microsoft and the pc press had put as much thought,
work and hype into unix, we would have a much nice, easier to use and
popular unix around today.  unix can do for the entire computer
industry, from micros to mainframes to supercomputers, what msdos did
for the pc market: one standard platform that you can develop software
for.

yes, unix does have problems.  lots of them.  but so dos OS/2, msdos,
vms, mvs/xa and every other operating system.  as i see it, OS/2
offers the same advantages and disadvantages and unix, or any other
"real" operating system.  it's just that OS/2 only runs on the intel
80x86 processors.  yeah, i know.  microsoft is re-writing OS/2 into C
so that it can be portable, but as i said, if they had put as much
effort into unix has they have into os/2...

basically, i can see real advantages for microsoft and ibm to get
people to use os/2 instead of unix, but i dont see many advantages for
the consumer.  

-wayne