2 //this unit contains varions functions and types to make it easier to write
\r
3 //code that works with both real windows messages and lmessages
\r
6 uses windows,messages,pgtypes;
\r
11 //according to MS you are supposed to use get/setwindowlongptr to get/set
\r
12 //pointers in extra window memory so your program can be built for win64, this
\r
13 //is also the only interface to window memory that lmessages offers but delphi
\r
14 //doesn't define it so alias it to getwindowlong here for win32.
\r
15 {$ifndef win64} //future proofing ;)
\r
16 function getwindowlongptr(ahwnd:hwnd;nindex:integer) : taddrint;
\r
17 procedure setwindowlongptr(ahwnd:hwnd;nindex:integer;dwNewLong : taddrint);
\r
19 function WaitForSingleEvent(hHandle: THandle; dwMilliseconds: DWORD): DWORD; stdcall;
\r
22 function getwindowlongptr(ahwnd:hwnd;nindex:integer) : taddrint;
\r
24 result := getwindowlong(ahwnd,nindex);
\r
26 procedure setwindowlongptr(ahwnd:hwnd;nindex:integer;dwNewLong : taddrint);
\r
28 setwindowlong(ahwnd,nindex,dwnewlong);
\r
31 function WaitForSingleEvent(hHandle: THandle; dwMilliseconds: DWORD): DWORD; stdcall;
\r
33 result := waitforsingleobject(hhandle,dwmilliseconds);
\r