Window Macros

Window Macros
•	GET_X_LPARAM
•	GET_Y_LPARAM
•	HIBYTE
•	HIWORD
•	LOBYTE
•	LOWORD
•	MAKELONG
•	MAKELPARAM
•	MAKELRESULT
•	MAKEWORD
•	MAKEWPARAM
 
 
 
 
GET_X_LPARAM macro
Retrieves the signed x-coordinate from the specified LPARAM value.

int GET_X_LPARAM(
  LPARAM lParam
);

Parameters:
lParam
The value to be converted.

Return value:
The return value is the low-order int of the specified value.

GET_Y_LPARAM macro
Retrieves the signed y-coordinate from the given LPARAM value.

int GET_Y_LPARAM(
  LPARAM lParam
);

Parameters
lParam
The value to be converted.
Return value
The return value is the high-order int of the specified value.
HIBYTE macro
Retrieves the high-order byte from the given 16-bit value.

BYTE HIBYTE(
  WORD wValue
);

Parameters
wValue
The value to be converted.

Return value
The return value is the high-order byte of the specified value.

HIWORD macro
Retrieves the high-order word from the specified 32-bit value.

WORD HIWORD(
  DWORD dwValue
);

Parameters
dwValue
The value to be converted.

Return value
The return value is the high-order word of the specified value.

LOBYTE macro
Retrieves the low-order byte from the specified value.


BYTE LOBYTE(
  WORD wValue
);

Parameters
wValue
The value to be converted.

Return value
The return value is the low-order byte of the specified value.


LOWORD macro
Retrieves the low-order word from the specified value.

WORD LOWORD(
  DWORD dwValue
);

Parameters
dwValue
The value to be converted.

Return value

The return value is the low-order word of the specified value.

MAKELONG macro
Creates a LONG value by concatenating the specified values.

DWORD MAKELONG(
  WORD wLow,
  WORD wHigh
);

Parameters
wLow
The low-order word of the new value.
wHigh
The high-order word of the new value.

Return value
The return value is a LONG value.

MAKELPARAM macro
Creates a value for use as an lParam parameter in a message. The macro concatenates the specified values.


LPARAM WINAPI MAKELPARAM(
  WORD wLow,
  WORD wHigh
);

Parameters
wLow
The low-order word of the new value.
wHigh
The high-order word of the new value.

Return value
The return value is an LPARAM value.

MAKELRESULT macro
Creates a value for use as a return value from a window procedure. The macro concatenates the specified values.

LRESULT MAKELRESULT(
  WORD wLow,
  WORD wHigh
);

Parameters
wLow
The low-order word of the new value.
wHigh
The high-order word of the new value.

Return value
The return value is an LRESULT value.

MAKEWORD macro
Creates a WORD value by concatenating the specified values.

WORD MAKEWORD(
  BYTE bLow,
  BYTE bHigh
);

Parameters
bLow
The low-order byte of the new value.
bHigh
The high-order byte of the new value.

Return value
The return value is a WORD value.



MAKEWPARAM macro
Creates a value for use as a wParam parameter in a message. The macro concatenates the specified values.

WPARAM MAKEWPARAM(
  WORD wLow,
  WORD wHigh
);

Parameters
wLow
The low-order word of the new value.
wHigh
The high-order word of the new value.

Return value
The return value is a WPARAM value.


你可能感兴趣的:(Window Macros)