Show: Delphi C++
Display Preferences

Winapi.Messages.TWMMouse

From XE2 API Documentation
Jump to: navigation, search

Delphi

  TWMMouse = record
    Msg: Cardinal;
    MsgFiller: TDWordFiller;
    Keys: Longint;
    KeysFiller: TDWordFiller;
    case Integer of
      0: (
        XPos: Smallint;
        YPos: Smallint;
        XYPosFiller: TDWordFiller;);
      1: (
        Pos: TSmallPoint;
        PosFiller: TDWordFiller;
        Result: LRESULT);
  end;

C++

struct DECLSPEC_DRECORD TWMMouse{
public:
unsigned Msg;
int Keys;
#pragma pack(push,1)
union
{
struct
{
System::Types::TSmallPoint Pos;
int Result;
};
struct
{
short XPos;
short YPos;
};
};
#pragma pack(pop)
};

Properties

Type Visibility Source Unit Parent
struct
class
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

Personal tools
Previous Versions
Translations