From c0a63ea0ab52d686aee261f4823c1d8612938846 Mon Sep 17 00:00:00 2001 From: nickysn Date: Sat, 12 Sep 2015 12:27:54 +0000 Subject: [PATCH] + added the win16api pen support functions git-svn-id: trunk@31616 - --- rtl/win16/winprocsh.inc | 8 ++++++++ rtl/win16/wintypes.inc | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/rtl/win16/winprocsh.inc b/rtl/win16/winprocsh.inc index 889112185e..fd99242880 100644 --- a/rtl/win16/winprocsh.inc +++ b/rtl/win16/winprocsh.inc @@ -370,3 +370,11 @@ function UnrealizeObject(hgdiobj: HGDIOBJ): BOOL; external 'GDI'; function EnumObjects(hdc: HDC; fnObjectType: SmallInt; goenmprc: GOBJENUMPROC; lParam: LPARAM): SmallInt; external 'GDI'; function EnumObjects(hdc: HDC; fnObjectType: SmallInt; goenmprc: FARPROC; lParam: LPARAM): SmallInt; external 'GDI'; + +{ Pen support } + +function CreatePen(fnPenStyle, nWidth: SmallInt; clrref: COLORREF): HPEN; external 'GDI'; +function CreatePenIndirect(lplgpn: LPLOGPEN): HPEN; external 'GDI'; +{$ifdef VAR_PARAMS_ARE_FAR} +function CreatePenIndirect(var lgpn: LOGPEN): HPEN; external 'GDI'; +{$endif} diff --git a/rtl/win16/wintypes.inc b/rtl/win16/wintypes.inc index 9fda0a3b69..5bf5f7d752 100644 --- a/rtl/win16/wintypes.inc +++ b/rtl/win16/wintypes.inc @@ -540,3 +540,32 @@ const { Object types for EnumObjects() } OBJ_PEN = 1; OBJ_BRUSH = 2; + +{ Pen support } + +{ Logical Pen } +type + PLOGPEN = ^LOGPEN; + NPLOGPEN = ^LOGPEN; near; + LPLOGPEN = ^LOGPEN; far; + LOGPEN = record + lopnStyle: UINT; + lopnWidth: POINT; + lopnColor: COLORREF; + end; + TLogPen = LOGPEN; + +{ Pen Styles } +const + PS_SOLID = 0; + PS_DASH = 1; + PS_DOT = 2; + PS_DASHDOT = 3; + PS_DASHDOTDOT = 4; + PS_NULL = 5; + PS_INSIDEFRAME = 6; + +{ Stock pens for use with GetStockObject(); } + WHITE_PEN = 6; + BLACK_PEN = 7; + NULL_PEN = 8;