1 { Copyright (C) 2005 Bas Steendijk and Peter Green
\r
2 For conditions of distribution and use, see copyright notice in zlib_license.txt
\r
3 which is included in the package
\r
4 ----------------------------------------------------------------------------- }
\r
7 //this unit contains various functions and types to make it easier to write
\r
8 //code that works with both real windows messages and lcoremessages
\r
11 uses windows,messages,pgtypes;
\r
16 //according to MS you are supposed to use get/setwindowlongptr to get/set
\r
17 //pointers in extra window memory so your program can be built for win64, this
\r
18 //is also the only interface to window memory that lcoremessages offers but delphi
\r
19 //doesn't define it so alias it to getwindowlong here for win32.
\r
20 {$ifndef win64} //future proofing ;)
\r
21 function getwindowlongptr(ahwnd:hwnd;nindex:integer) : taddrint;
\r
22 procedure setwindowlongptr(ahwnd:hwnd;nindex:integer;dwNewLong : taddrint);
\r
24 function WaitForSingleEvent(hHandle: THandle; dwMilliseconds: DWORD): DWORD; stdcall;
\r
27 function getwindowlongptr(ahwnd:hwnd;nindex:integer) : taddrint;
\r
29 result := getwindowlong(ahwnd,nindex);
\r
31 procedure setwindowlongptr(ahwnd:hwnd;nindex:integer;dwNewLong : taddrint);
\r
33 setwindowlong(ahwnd,nindex,dwnewlong);
\r
36 function WaitForSingleEvent(hHandle: THandle; dwMilliseconds: DWORD): DWORD; stdcall;
\r
38 result := waitforsingleobject(hhandle,dwmilliseconds);
\r