home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
- 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
-