Article View: comp.os.os2.programmer
Article #336A question or three.
From: Kaleb Keithley
Date: Mon, 10 Aug 1992 16:27
Date: Mon, 10 Aug 1992 16:27
71 lines
3599 bytes
3599 bytes
I'm trying to get up to speed on PM programming, so I dragged out my
old issues of Micros*ft Journal and started typing in Charles Petzold's
Checkers program. I'm using the non-EMX gcc, if that makes a difference.
Question 1: Given the following code fragment...
MRESULT EXPENTRY ClientWndProc (
HWND hwnd,
USHORT msg,
MPARAM mp1,
MPARAM mp2)
{
...
switch (COMMANDMSG (&msg)->cmd) {
...
the compiler complains vociferously about the above line of code. I
regret that I can't supply the actual error text, it was at home, and
late at night. I was unable to find the prototype declaration or macro
definition for COMMANDMSG. The above is exactly as it appears in the
article, but I suspect that I might actually need '(COMMANDMSG (&cmd))->cmd'.
Would someone be so kind as to confirm this, or tell me wherein COMMANDMSG
is defined (I looked, but didn't find it), or tell me that COMMANDMSG is
the wrong way to be doing this in 2.0 and tell me what the right way is?
Question 2: 99% of my GUI experience is with the X Window System. The
Petzold article touches on window classes, and being able to subclass
windows. Furthermore, the main() function in his example program bears
a strong resemblance to the main() functions of the Xt based applications
that I write.
By contrast, when I examined the M's*ft Windows 3.0 SDK, my impression was
that programming Windows was akin to programming X at the Xlib level,
leading me to believe that programming for PM may be more like programming
in Xt with a Widget set. Would anyone care to confirm or deny that
assessment?
Question 3: What's the name of a good book on PM programming? Bookstar
(large, well stocked, discount retailer) had zillions of Wind*ws 3.1 books,
and only three titles on OS/2 -- none on programming. Anyone know of any
books in the works?
Question 4: If you're listening IBM, start putting some *real* tools into
OS/2. FIND.EXE is so *very* dated. I'd think after all these years it
could at least handle wild cards in the file name! After three years of
working on UNIX, I'd forgotten how much I relied on third party development
tools to do development under D*S. I guess some things never change. Last
night was like a trip through a black hole back into time.
And, while we're on the subject, how to I jump directly to a line by the
line number in the enhanced editor, I'd hate to think what I'd have to do
with some of these multi-thousand line source files some people like to
write. What's the magic incantation to set CAPS_LOCK (it's not the
CAPS_LOCK key, that's for certain), and why doesn't my CAPS_LOCK light
on my keyboard toggle on and off when I press the CAPS_LOCK key? No, it's
not burnt out. And lastly, why does the enhanced editor seem to freeze
up for two or three seconds at a time for no apparent reason?
Okay, I don't really expect any real answers to these last couple of
questions, I'm just venting my spleen, but if you happen to know...
--
Kaleb Keithley kaleb@thyme.jpl.nasa.gov
Not authorized, in any way, shape, or form, to speak for anyone.
Technical Details
Message-ID:
<1992Aug10.162757.13720@thyme.jpl.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!mahendo!thyme!kalebShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer,comp.os.os2.advocacy Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!mahendo!thyme!kaleb From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) Subject: A question or three. Message-ID: <1992Aug10.162757.13720@thyme.jpl.nasa.gov> Organization: Jet Propulsion Lab, Pasadena, CA Distribution: na Date: Mon, 10 Aug 92 16:27:57 GMT Lines: 71