2012年8月21日星期二

转:Delphi中MakeWord、MakeLong的定义

Delphi中MakeWord、MakeLong的定义  

function MakeWord(A, B: Byte): Word;
begin
  Result := A or B shl 8;
end;

function MakeLong(A, B: Word): Longint;
begin
  Result := A or B shl 16;
end;

function MakeWParam(l, h: Word): WPARAM;
begin
  Result := MakeLong(l, h);
end;

function MakeLParam(l, h: Word): LPARAM;
begin
  Result := MakeLong(l, h);
end;

function MakeLResult(l, h: Word): LRESULT;
begin
  Result := MakeLong(l, h);
end;

摘自:http://lotyong.blog.163.com/blog/static/9830690720109964452875/

没有评论: