diff --git a/rtl/win16/win31.pp b/rtl/win16/win31.pp index f0a251904e..85c8d148f5 100644 --- a/rtl/win16/win31.pp +++ b/rtl/win16/win31.pp @@ -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. diff --git a/rtl/win16/winprocsh.inc b/rtl/win16/winprocsh.inc index 6bbc93b4b9..785cfd65df 100644 --- a/rtl/win16/winprocsh.inc +++ b/rtl/win16/winprocsh.inc @@ -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'; diff --git a/rtl/win16/wintypes.inc b/rtl/win16/wintypes.inc index 7df4668014..6f697107bf 100644 --- a/rtl/win16/wintypes.inc +++ b/rtl/win16/wintypes.inc @@ -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;