Вопрос

I want to make a page in the installer when the setup move's the mouse in the setup window, here is the SendMessage documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx The problem is I need the MAKELPARAM implementation to set the x,y positions. Can somebody help me to do that ?

Это было полезно?

Решение

In Inno Setup Pascal Script the macros for message parameters according to SDK could be written as:

[Code]
type
  LONG_PTR = LongInt;
  LRESULT = LONG_PTR;  
  WPARAM = UINT_PTR;
  LPARAM = LONG_PTR;

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

function MakeWParam(L, H: Word): WPARAM;
begin
  Result := WPARAM(DWORD(MakeLong(L, H)));
end;

function MakeLParam(L, H: Word): LPARAM;
begin
  Result := LPARAM(DWORD(MakeLong(L, H)));
end;

function MakeLResult(L, H: Word): LRESULT;
begin
  Result := LRESULT(DWORD(MakeLong(L, H)));
end;

But I would like to suggest you to not use message sending to simulate user's input. I would personally use a more reliable way by using SendInput function. I've made some basic example in this post.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top