The dwEvent member of the MIDIEVENT structure describes the MIDI event that is to take place. Short events fit entirely into this member. Long events require one or more doubleword values in addition to the dwEvent member to store the event descriptions.
The high byte of the dwEvent member contains information about whether the event is long or short and about whether a callback is generated along with the event. In addition, this byte is used to describe the event type. The remaining 24 bits of the dwEvent member are used either to contain the event parameters (for short messages) or to contain the length of the event parameters (for long messages). To extract information from the dwEvent member, use the MEVT_EVENTTYPE and MEVT_EVENTPARM macros.
For a description of the predefined event types, see the reference material for the MIDIEVENT structure.