+ added the win16api drawing support functions

git-svn-id: trunk@31740 -
This commit is contained in:
nickysn 2015-09-17 15:03:57 +00:00
parent 051c8e74ce
commit 12cd32ec18
3 changed files with 45 additions and 0 deletions

View File

@ -551,6 +551,23 @@ type
end;
TWindowPos = WINDOWPOS;
const
{ Window drawing support }
DCX_WINDOW = $00000001;
DCX_CACHE = $00000002;
DCX_CLIPCHILDREN = $00000008;
DCX_CLIPSIBLINGS = $00000010;
DCX_PARENTCLIP = $00000020;
DCX_EXCLUDERGN = $00000040;
DCX_INTERSECTRGN = $00000080;
DCX_LOCKWINDOWUPDATE = $00000400;
DCX_USESTYLE = $00010000;
function GetFreeSystemResources(SysResource: UINT): UINT; external 'USER';
procedure LogError(err: UINT; lpInfo: FarPointer); external 'KERNEL';
@ -713,6 +730,15 @@ procedure MapWindowPoints(hwndFrom, hwndTo: HWND; lppt: LPPOINT; cpt: UINT); ext
procedure MapWindowPoints(hwndFrom, hwndTo: HWND; var pt: POINT; cpt: UINT); external 'USER';
{$endif}
{ Window drawing support }
{ note: the first parameter in this function is declared 'register' in windows.h, even though
the calling convention of the function is 'pascal'
todo: figure out whether the first parameter really needs to be passed in register, or
whether the 'register' modifier is ignored by 16-bit C compilers, when the calling
convention is 'pascal'.
}
function GetDCEx({register} hwnd: HWND; hrgnClip: HRGN; flags: DWORD): HDC; external 'USER';
implementation
end.

View File

@ -923,3 +923,18 @@ function GetTopWindow(hwnd: HWND): HWND; external 'USER';
function GetWindow(hwnd: HWND; fuRel: UINT): HWND; external 'USER';
function GetNextWindow(hwnd: HWND; uFlag: UINT): HWND; external 'USER';
{ Window property support }
function SetProp(hwnd: HWND; lpsz: LPCSTR; hData: HANDLE): BOOL; external 'USER';
function GetProp(hwnd: HWND; lpsz: LPCSTR): HANDLE; external 'USER';
function RemoveProp(hwnd: HWND; lpsz: LPCSTR): HANDLE; external 'USER';
function EnumProps(hwnd: HWND; prpenmprc: PROPENUMPROC): SmallInt; external 'USER';
{ Window drawing support }
function GetDC(hwnd: HWND): HDC; external 'USER';
function ReleaseDC(hwnd: HWND; hdc: HDC): SmallInt; external 'USER';
function GetWindowDC(hwnd: HWND): HDC; external 'USER';

View File

@ -1630,3 +1630,7 @@ const
GW_HWNDPREV = 3;
GW_OWNER = 4;
GW_CHILD = 5;
type
{ Window property support }
PROPENUMPROC = function(hwnd: HWND; lpsz: LPCSTR; hData: HANDLE): BOOL; far;