mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 02:19:39 +02:00
LCLIntf: add helper functions to extract Lo and Hi words of LPARAM type.
This commit is contained in:
parent
935e7edaff
commit
c70e6b3297
@ -1515,6 +1515,24 @@ function MakeWParam(l, h: Word): WPARAM; inline;
|
||||
begin
|
||||
Result := MakeLong(l, h);
|
||||
end;
|
||||
{
|
||||
Does the reverse of the MakeLParam function
|
||||
}
|
||||
procedure LParamExtractLoHiWord(const aParam: LPARAM; out LoWord, HiWord: Word);
|
||||
begin
|
||||
LoWord := aParam and $FFFF;
|
||||
HiWord := (aParam and $FFFF0000) shr 16;
|
||||
end;
|
||||
|
||||
function LParamHiWord(const aParam: LPARAM): Word;
|
||||
begin
|
||||
Result := (aParam and $FFFF0000) shr 16;
|
||||
end;
|
||||
|
||||
function LParamLoWord(const aParam: LPARAM): Word;
|
||||
begin
|
||||
Result := aParam and $FFFF;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: OffsetRect
|
||||
|
@ -336,6 +336,10 @@ function MakeWParam(l, h: Word): WPARAM; inline;
|
||||
function MakeLParam(l, h: Word): LPARAM; inline;
|
||||
function MakeLResult(l, h: Word): LRESULT; inline;
|
||||
|
||||
procedure LParamExtractLoHiWord(const aParam: LPARAM; out LoWord, HiWord: Word);
|
||||
function LParamHiWord(const aParam: LPARAM): Word; inline;
|
||||
function LParamLoWord(const aParam: LPARAM): Word; inline;
|
||||
|
||||
// Deprecated in version 2.3, 2023-06.
|
||||
function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean; deprecated 'Use Types.OffsetRect instead';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user