Winapi.Messages.TWMMouse

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TWMMouse = record

C++

struct DECLSPEC_DRECORD TWMMouse
{
public:
    unsigned Msg;
    int Keys;
public:
    union
    {
        struct
        {
            System::Types::TSmallPoint Pos;
            NativeInt Result;
        };
        struct
        {
            short XPos;
            short YPos;
        };
    };
};

Properties

Type Visibility Source Unit Parent
record
struct
public
Winapi.Messages.pas
Winapi.Messages.hpp
Winapi.Messages Winapi.Messages

Description

TWMMouse represents a Windows mouse message.

TWMMouse is the data structure used for all Windows mouse messages. The Msg field is the Windows message code. The Keys field indicates whether various keys are down. It is a combination of the values listed in the following table.



Value Meaning

MK_CONTROL

The Control key is down.

MK_LBUTTON

The left mouse button is down.

MK_MBUTTON

The middle mouse button is down.

MK_RBUTTON

The right mouse button is down.

MK_SHIFT

The Shift key is down.



The Pos field (or the XPos and YPos fields) indicates the global coordinates of the mouse pointer. The Result field holds the value returned by the application processing the message.

See Also