subcalls.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MouGetEventMask (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_MOU
 
USHORT MouGetEventMask(pfsEvents, hmou)
PUSHORT pfsEvents;    /* address of buffer for event mask */
HMOU hmou;            /* mouse handle                     */
 
The MouGetEventMask function retrieves the event mask for the specified
mouse. The event mask specifies the user actions that cause MS OS/2 to
generate mouse events. MS OS/2 responds to a user action by copying a mouse
event to the event queue.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pfsEvents  Points to the variable that receives the event mask. It can be
           any combination of the following values:
 
           Value                       Meaning
           ─────────────────────────────────────────────────────────────────
           MOUSE_MOTION                Mouse motion.
 
           MOUSE_MOTION_WITH_BN1_DOWN  Mouse motion with button-1-down
                                       event.
 
           MOUSE_BN1_DOWN              Button-1-down event.
 
           MOUSE_MOTION_WITH_BN2_DOWN  Mouse motion with button-2-down
                                       event.
 
           MOUSE_BN2_DOWN              Button-2-down event.
 
           MOUSE_MOTION_WITH_BN3_DOWN  Mouse motion with button-3-down
                                       event.
 
           MOUSE_BN3_DOWN              Button-3-down event.
 
hmou       Identifies the mouse. The handle must have been created
           previously by using the MouOpen function.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
 
     ERROR_MOUSE_NO_DEVICE
 
Comments
 
Button 1 is the left button on the mouse.
 
Example
 
This example creates a mouse handle, calls the MouGetEventMask function, and
checks the event mask to see if events are accepted from a third button on
the mouse:
 
HMOU hmou;
USHORT fsEvents;
MouOpen(0L, &hmou);
MouGetEventMask(&fsEvents, hmou);
if(fsEvents & (MOUSE_MOTION_WITH_BN3_DOWN | MOUSE_BN3_DOWN)
    VioWrtTTY("Three buttons enabled\n\r", 23, 0);
 
See Also
 
MouOpen, MouReadEventQue, MouSetEventMask
 
                                      ♦