Sign in Join
FPDoc Onlineexperiment

LCLIntf unit

Contains WinAPI-like functions for Delphi compatibility.

This unit was created for Delphi compatibility. It contains selected functions from the Delphi Windows unit, which finally are implemented in the widgetsets.

For LCL users:

The functions can be used to make porting of Delphi applications easier, and are not 100% emulating WinAPI functions, not even under windows. They were implemented and tested with some common Delphi libraries. The LCL contains many extra functions that the Delphi VCL does not have.

Some functions are not exactly Delphi or WinAPI compatible.

For example: Instead of using the common Windows functions SaveDC and RestoreDC use the Canvas.SaveHandleState and Canvas.RestoreHandleState.

Procedures and functions

AddEventHandlerfunction
AddPipeEventHandlerfunction
AddProcessEventHandlerfunction
AdjustWindowRectExfunction
AllocateHWndfunction
AngleChordfunctionDraws a filled Chord described by two angles.
ArcfunctionDraws an elliptical curve.
AskUserfunction
BeginPaintfunctionStart painting in a window.
BitBltfunctionCopies a section of a Canvas to another one, performing a raster operation (ROP).
CallDefaultWndHandlerprocedure
CallNextHookExfunctionCalls the next procedure in the hook chain.
CallWindowProcfunctionCalls another Window procedure, to handle a message.
CharLowerfunction
CharLowerBufffunction
CharUpperfunction
CharUpperBufffunction
ClientToScreenfunctionConverts (relative) Client coordinates into absolute Screen coordinates.
ClipboardFormatNeedsNullBytefunction
ClipboardFormatToMimeTypefunction
ClipboardGetDatafunction
ClipboardGetFormatsfunction
ClipboardGetOwnerShipfunction
ClipboardRegisterFormatfunction
CombineRgnfunctionCombines two regions.
CopyRectfunction
CreateBitmapfunctionCreates a bitmap object.
CreateBrushIndirectfunctionCreates a brush object (bitmap).
CreateBrushWithRadialGradientfunction
CreateCaretfunctionCreates the Caret (text cursor) for the specified windowed control.
CreateCompatibleBitmapfunctionCreates a bitmap that is compatible with the given DC.
CreateCompatibleDCfunctionCreates an memory Device Context, compatible with the device of the given DC.
CreateDIBitmapfunctionCreates a Device Dependent Bitmap (DDB) from a Device Independent Bitmap (DIB).
CreateDIBSectionfunctionCreates a bitmap into which the application can write.
CreateEllipticRgnfunctionCreates an elliptic region.
CreateEllipticRgnIndirectfunction
CreateEmptyRegionfunction
CreateFontfunction
CreateFontIndirectfunctionCreates a logical font, selectable into any DC.
CreateFontIndirectExfunctionCreates a logical font, selectable into any DC. Allows for a long font name.
CreateIconIndirectfunctionCreates an icon or cursor.
CreatePalettefunctionCreates a logical palette, selectable into any DC.
CreatePatternBrushfunctionCreates a logical brush, selectable into any DC.
CreatePenfunction
CreatePenIndirectfunctionCreates a logical Pen, selectable into any DC.
CreatePixmapIndirectfunction
CreatePolygonRgnfunctionCreates a polygonal region.
CreateRectRgnfunctionCreates a rectangular region.
CreateRectRgnIndirectfunction
CreateRegionCopyfunction
CreateRoundRectRgnfunctionCreates a rectangular region with rounded corners.
CreateRubberBandfunction
CreateSolidBrushfunction
CreateStandardCursorfunction
DCClipRegionValidfunction
DeallocateHWndprocedure
DeleteCriticalSectionprocedureDeletes an un-owned critical section.
DeleteDCfunctionDeletes a device context created by CreateDC.
DeleteObjectfunctionFrees a GDI object.
DestroyCaretfunctionDestroys the caret but does not free the bitmap.
DestroyCursorfunctionDestroys a mouse cursor.
DestroyIconfunctionDestroys an icon.
DestroyRubberBandprocedure
DPtoLPfunctionConverts an array of Device Points (coordinates) into Logical Points.
DrawDefaultDockImageprocedure
DrawEdgefunctionDraws one or more edges for a rectangle.
DrawFocusRectfunctionDraws a focus rectangle on the specified device context.
DrawFrameControlfunctionDraws a window frame for a control of the specified type in a given state.
DrawGridprocedureDraws the grid separator lines between columns and rows with the specified width and height.
DrawTextfunctionDraws formatted text on the specified device context.
EllipsefunctionDraws a filled circle or ellipse, bounded by a rectangle.
EnableScrollBarfunctionEnables or disables the arrows of a scroll bar control, or of the scroll bars of a window.
EnableWindowfunctionEnables or disables mouse and keyboard input to the specified window or control.
EndPaintfunctionEnds painting a window, started with BeginPaint.
EnterCriticalSectionprocedureEnters a critical section.
EnumDisplayMonitorsfunctionInvokes a callback function for every available display monitor.
EnumFontFamiliesfunctionInvokes a callback function for every font available on a specified device.
EnumFontFamiliesExfunctionInvokes a callback function for every available font that matches certain criteria.
EqualRectfunctionReturns True when the rectangles are identical.
EqualRgnfunction
ExcludeClipRectfunctionExcludes a rectangle from the clipping region, i.e. allows one to paint within the rectangle.
ExcludeClipRgnfunction
ExtCreatePenfunctionCreates a logical pen, selectable into any DC.
ExtSelectClipRGNfunctionCombines the passed Region with the current clipping region.
ExtTextOutfunctionDraws an string without formatting (single line).
ExtUTF8Outfunction
FillRectfunctionFills a rectangle by using the specified brush.
FillRgnfunctionFills a region using the specified brush.
FindDefaultBrowserfunctionGets the qualified path to the default browser application and its parameters.
FloodFillfunctionFills an area of the display surface with the current brush.
FontIsMonoSpacefunctionIndicates whether the specified font handle represents a fixed-pitch typeface.
Frame3dfunction
FrameRectfunctionDraws a border around a rectangle.
GetAcceleratorStringfunction
GetActiveWindowfunctionReturns the Handle of the active window of the calling thread.
GetAvailableNativeCanvasTypesfunction
GetAvailableNativeHandleTypesfunction
GetBitmapBitsfunctionFills an buffer with the bitmap bits.
GetBkColorfunctionReturns the background color of an device context.
GetBValuefunctionExtracts the blue color value from a COLORREF.
GetCapturefunctionReturns the window that captures mouse messages.
GetCaretPosfunctionReturns the caret position, in client coordinates.
GetCaretRespondToFocusfunction
GetCharABCWidthsfunctionReturns the ABC widths of an range of character codes.
GetClientBoundsfunction
GetClientRectfunctionReturns the client rectangle of a control. Left and Top are always 0.
GetClipBoxfunctionReturns the smallest rectangle which includes the entire clipping region of an device context.
GetClipRGNfunctionReturns the clipping region of an device context.
GetCmdLineParamDescForInterfacefunction
GetCompositorExtendedBorderfunctionGets extended border information added by the compositor for the Desktop Window Manager.
GetControlConstraintsfunction
GetCurrentObjectfunctionReturns an currently selected object in an device context.
GetCursorPosfunction
GetDCfunctionReturns the handle of an Device Context (DC) for the client area of a window.
GetDCOpacityfunction
GetDCOriginRelativeToWindowfunction
GetDesignerDCfunction
GetDeviceCapsfunctionReturns various device specific information.
GetDeviceSizefunction
GetDIBitsfunctionFill an buffer with the bitmap bits.
GetDoubleClickTimefunctionReturns the double-click time, in milliseconds.
GetDpiForMonitorfunction
GetFocusfunctionReturns the handle of the window that has the focus in the current thread.
GetFontLanguageInfofunctionReturns language information about the currently selected font.
GetForegroundWindowfunctionReturns the window that the user is currently working with, session wide.
GetGValuefunctionExtracts the green color value from a COLORREF.
GetIconInfofunctionReturns information about an Icon or Cursor.
GetKeyStatefunctionThe status of a virtual key.
GetLCLOwnerObjectfunction
GetMapModefunctionReturns the mapping mode of an device context.
GetMonitorInfofunctionReturns information about an display monitor.
GetNativeCanvasfunction
GetNativeHandlefunction
GetObjectfunctionReturns information about a graphics object.
GetPaletteEntriesfunctionRetrieves an range of color entries from a logical palette.
GetParentfunctionReturns the parent window of a window.
GetPropfunctionRetrieves an property value for a window.
GetRGBIntValuesprocedureExtracts the red, green and blue color values from a COLORREF.
GetRGBValuesprocedureExtracts the red, green and blue color values from a COLORREF.
GetRgnBoxfunctionReturns the bounding rectangle of a region, containing the entire region.
GetROP2functionThe current Foreground Mixing Mode in an device context.
GetRValuefunctionExtracts the red color value from a COLORREF.
GetScrollBarSizefunction
GetScrollbarVisiblefunction
GetScrollInfofunctionReturns all or selected information about a Scroll Bar.
GetScrollPosfunctionReturns the scroll bar position.
GetScrollRangefunctionReturns the minimum and maximum Position values of a Scroll Bar.
GetStockObjectfunctionRetrieves a handle to one of the predefined graphic objects.
GetSysColorfunctionRetrieves the system color for standard display elements.
GetSysColorBrushfunctionRetrieves a system brush for standard display elements.
GetSystemMetricsfunctionRetrieves various system metrics.
GetSystemPaletteEntriesfunctionRetrieves an range of color entries from the system palette for a device.
GetTextColorfunctionThe current text color in an device context.
GetTextExtentExPointfunctionCalculates the number of characters, that fit into some horizontal space.
GetTextExtentPointfunctionComputes the display width and height of an string.
GetTextExtentPoint32functionComputes the display width and height of an string.
GetTextMetricsfunctionRetrieves the metrics for the currently selected font.
GetTickCountfunctionNumber of ticks (milliseconds) elapsed since the computer was started.
GetTickCount64functionNumber of ticks (milliseconds) elapsed since the computer was started.
GetViewPortExtExfunctionReturns the size of the viewport of an device context.
GetViewPortOrgExfunctionReturns the origin of the viewport of an device context.
GetWindowExtExfunctionReturns the extent of a window, in logical units.
GetWindowLongfunctionReturns attributes for the specified window handle.
GetWindowOrgExfunctionRetrieves the window origin of an device context, in logical units.
GetWindowRectfunctionRetrieves the bounding rectangle for a window, including the window decoration in screen coordinates.
GetWindowRelativePositionfunction
GetWindowSizefunctionReturns the Width and Height of a window, including the window decoration.
GradientFillfunctionFills rectangle or triangle areas with gradient colors.
HideCaretfunctionRemoves the caret from the screen.
IndexToOverlayMaskfunctionConverts an imagelist index into an overlay index.
InflateRectfunctionInflates the rectangle in all directions.
InitializeCriticalSectionprocedureInitializes a Critical Section object.
IntersectClipRectfunctionShrinks the clipping region of an Device Context to a rectangular boundary, e.g. a text area.
IntersectRectfunctionIntersects SrcRect1 and SrcRect2 into DestRect.
InvalidateFramefunction
InvalidateRectfunctionMarks a display area for repaint.
InvalidateRgnfunctionMarks a display area for repaint.
IsCDIntfControlfunction
IsCharAlphaNumericfunctionChecks for ASCII letter or digit characters.
IsDBCSLeadBytefunction
IsDesignerDCfunction
IsIconicfunctionTrue when the window is minimized.
IsMobilePlatformfunction
IsRectEmptyfunctionReturns True if the rectangle is empty.
IsWindowfunctionChecks whether a handle refers to a window.
IsWindowEnabledfunctionDetermines whether a window can receive mouse and keyboard input.
IsWindowVisiblefunctionThe definite Visible state of a window.
IsZoomedfunctionTrue when the window is maximized.
KillTimerfunctionRemoves an timer.
LeaveCriticalSectionprocedureReleases a critical section, for use by other threads.
LineTofunctionDraws a line from the current position up to, but not including, the specified point.
LoadBitmapfunction
LoadCursorfunction
LoadIconfunction
LParamExtractLoHiWordprocedureConverts an Integer parameter value into low-order and high-order Word values.
LParamHiWordfunctionGets the high-order Word value stored in the specified Integer pointer.
LParamLoWordfunctionGets the low-order Word value stored in the specified Integer pointer.
LPtoDPfunctionConverts logical coordinates into device coordinates.
MakeLongfunctionCopies two words into a double word.
MakeLParamfunctionCopies two words into a double word, usable as a message lParam.
MakeLResultfunctionCopies two words into a double word, usable as a message Result.
MakeROP4function
MakeWordfunctionCopies two bytes into a word.
MakeWParamfunctionCopies two words into a double word, usable as a message wParam.
MaskBltfunctionCopies part of an source DC into an destination DC, using the specified foreground and background raster operations.
MessageBoxfunctionDisplays a modal dialog with the given text, caption, icon and buttons.
MonitorFromPointfunctionFinds an monitor from screen coordinates.
MonitorFromRectfunction
MonitorFromWindowfunctionFinds the monitor which contains most of the specified window.
MoveToExfunctionMoves the current position to the specified point.
MoveWindowOrgExfunction
MsgKeyDataToShiftStatefunction
NotifyUserprocedure
NotifyUserAtXYprocedure
OffsetRgnfunctionMoves a region by the specified relative offset.
OpenDocumentfunctionOpens the document using the default application associated with the specified file.
OpenURLfunctionOpens a given URL with the default browser for the system.
PaintRgnfunction
PeekMessagefunction
PiefunctionDraws a filled pie-shaped wedge, from an ellipse and two radials.
PointToSmallPointfunction
PointToSmallPointNoChecksfunction
PolyBezierfunctionDraws Bézier curves.
PolygonfunctionDraws a Polygon.
PolylinefunctionDraws a sequence of lines.
PostMessagefunctionSends a message to a window.
PredefinedClipboardFormatfunction
PromptUserfunction
PromptUserAtXYfunction
PtInRectfunctionChecks whether a Point is within a Rect.
PtInRegionfunctionDetermines whether the specified coordinates are within the given region handle.
RadialArcfunction
RadialChordfunction
RadialPiefunction
RawImage_CreateBitmapsfunction
RawImage_DescriptionFromBitmapfunction
RawImage_DescriptionFromDevicefunction
RawImage_FromBitmapfunction
RawImage_FromDevicefunction
RawImage_QueryDescriptionfunction
RealizePalettefunction
Rectanglefunction
RectInRegionfunction
RectVisiblefunctionIndicates whether the specified rectangle in visible in the clipping region for the device context.
RedrawWindowfunctionRedraws (part of) a window.
RegroupMenuItemfunction
ReleaseCapturefunctionRestores normal mouse input processing, after .
ReleaseDCfunctionReleases an Device Context obtained by GetDC.
ReleaseDesignerDCfunction
RemoveEventHandlerprocedure
RemovePipeEventHandlerprocedure
RemoveProcessEventHandlerprocedure
RemovePropfunctionRemoves a named property from a window.
RequestInputfunction
RestoreDCfunctionRestores a Device Context (DC) to an previously saved state.
RGBfunctionCombines Red, Green and Blue values into an TColorRef value.
RoundRectfunctionDraws a rectangle with rounded corners to the specified device context.
SaveDCfunctionSaves the state of a Device Context in the context stack.
ScreenToClientfunctionConverts absolute Screen coordinates into Client relative coordinates.
ScrollWindowfunctionScrolls the content of a window, by a number of pixels.
ScrollWindowExfunction
SelectClipRGNfunctionSets the ClipRegion of an DeviceContext.
SelectInFolderfunctionOpens a system file manager, displays a directory, and optionally selects the given file.
SelectObjectfunctionSelects an object into an device context.
SelectPalettefunction
SendCachedLCLMessagesprocedure
SendMessagefunctionSends a message directed to a specific window to the message pool for the application.
SetActiveWindowfunctionSets focus to the specified window, if the application is on top.
SetBkColorfunctionSets the current background color of an device context.
SetBkModefunctionSets the background mix mode (transparency) of an device context.
SetCanvasScaleFactorprocedure
SetCapturefunctionSets the mouse capture to the specified window.
SetCaretPosfunctionMoves the Caret to the specified coordinates.
SetCaretPosExfunctionMoves the Caret into a window.
SetCaretRespondToFocusfunction
SetComboMinDropDownSizefunction
SetCursorfunctionChanges the shape of the mouse cursor.
SetCursorPosfunctionChanges the position of the mouse cursor.
SetDCOpacityprocedure
SetEventHandlerFlagsprocedure
SetFocusfunctionSets the keyboard input focus to the specified window handle.
SetForegroundWindowfunctionMoves a window in front of all other windows, and activates it.
SetMapModefunctionSets the mapping mode of an device context.
SetMenufunctionAssigns a menu to a window.
SetParentfunctionChanges the parent of a window.
SetPropfunctionAdds a property to a window.
SetRectfunctionCopies coordinates into a rectangle.
SetRectEmptyfunctionClears the rectangle to all zero coordinates.
SetRectRgnfunction
SetROP2functionSets the Foreground Mixing Mode in an device context.
SetRubberBandRectprocedure
SetScrollInfofunction
SetScrollPosfunctionChanges the Position of an Scroll Bar slider.
SetScrollRangefunctionSets the minimum and maximum position values for a scroll bar.
SetStretchBltModefunctionSets the StrechBlt mode for an device context.
SetSysColorsfunctionSets the colors for one or more display elements of window borders and desktop.
SetTextCharacterExtrafunctionSets extra inter-character spacing in text output.
SetTextColorfunctionSets the text color on a device context.
SetTimerfunctionCreates or resets an timer for the given time interval.
SetViewPortExtExfunctionSets the extent of the viewport for a device context.
SetViewPortOrgExfunctionSets the device origin corresponding to the window origin (0,0) in an device context.
SetWindowExtExfunctionSets the extent of the window for an device context.
SetWindowLongfunctionSets an attribute of a window.
SetWindowOrgExfunctionSpecifies which window point maps to the viewport origin (0,0).
SetWindowPosfunctionChanges the size, position, and Z order of a window.
SetWindowRgnfunctionDefines the visible region of a window or control.
ShowCaretfunctionShows the Caret (text cursor).
ShowScrollBarfunctionShows or hides a Scroll Bar.
ShowSelectItemDialogfunction
ShowWindowfunctionShows a window in an specific state.
SmallPointToPointfunctionConverts a TSmallPoint value to a TPoint value.
StretchBltfunctionCopies a rectangular region into an device context, shrinking or stretching it as required.
StretchDIBitsfunctionCopies a rectangular region from a DIB into an device context, shrinking or stretching it as required.
StretchMaskBltfunction
SubtractRectfunctionComputes the bounding box with the geometric difference between two rectangles.
SystemParametersInfofunctionRetrieves or sets one of the system-wide parameters.
TextOutfunctionDraws an string without formatting (single line).
TextUTF8Outfunction
UnionRectfunctionComputes the bounding box of the union of two rectangles.
UpdateWindowfunctionForces an immediate repaint of a window, if required.
WindowFromPointfunctionFinds the window containing the specified point.

Types

TOpenParamStringProcprocedure type

Variables

OnListViewDialogResultvariable
OnShowSelectItemDialogResultvariable
OpenDocumentWidgetsetImplementationvariable
OpenURLWidgetsetImplementationvariable

Uses

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.