Article View: comp.os.os2.programmer
Article #516Re: Button Press..HELP!!!!
From: Andrew Berg
Date: Tue, 28 Jul 1992 03:59
Date: Tue, 28 Jul 1992 03:59
26 lines
1553 bytes
1553 bytes
In C/Set there is a macro that casts from &msg to a *_COMMANDMSG structure.
A version that works with GCC is as follows:
/* pmgnu.h - macros not found in the distribution */
typedef struct __COMMANDMSG {
USHORT msg; /* the WM_COMMAND msg */
USHORT fill1; /* args are 32 bit aligned */
USHORT cmd; /* the subcommand */
} _COMMANDMSG, *_pCOMMANDMSG;
#define COMMANDMSG( msg ) ((_pCOMMANDMSG) (msg))
typedef struct __CHARMSG {
USHORT msg; /* the WM_CHAR msg */
USHORT fill1; /* allingment */
USHORT fs; /* the modifier flags (is Vkey, isCTRL, etc... ) */
USHORT fill2; /* never saw this */
USHORT chr; /* the keycode */
USHORT vkey; /* the virtual keycode */
} _CHARMSG, *_pCHARMSG;
#define CHARMSG( msg ) ((_pCHARMSG) (msg))
/* also you may find it usefull to define */
#define CALLBACK EXPENTRY
I got this code from 'urbas@RZ-Berlin.MPG.DE', so if you use it, you might
drop a note and thank him. He did the hard work
Technical Details
Message-ID:
<1992Jul28.035952.27328@beaver.cs.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!uw-beaver!lynx.cs.washington.edu!andrewbReferences:
<1992Jul22.020524.17316@panix.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!uw-beaver!lynx.cs.washington.edu!andrewb From: andrewb@lynx.cs.washington.edu (Andrew Berg) Newsgroups: comp.os.os2.programmer Subject: Re: Button Press..HELP!!!! Message-ID: <1992Jul28.035952.27328@beaver.cs.washington.edu> Date: 28 Jul 92 03:59:52 GMT References: <1992Jul22.020524.17316@panix.com> Sender: news@beaver.cs.washington.edu (USENET News System) Organization: Computer Science & Engineering Dept., Univ. of Washington, Seattle Lines: 26 X-Newsreader: Tin 1.1 PL3