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.
For example: Instead of using the common Windows functions SaveDC and RestoreDC use the Canvas.SaveHandleState and Canvas.RestoreHandleState.
Procedures and functions
AddEventHandler | function | |
AddPipeEventHandler | function | |
AddProcessEventHandler | function | |
AdjustWindowRectEx | function | |
AllocateHWnd | function | |
AngleChord | function | Draws a filled Chord described by two angles. |
Arc | function | Draws an elliptical curve. |
AskUser | function | |
BeginPaint | function | Start painting in a window. |
BitBlt | function | Copies a section of a Canvas to another one, performing a raster operation (ROP). |
CallDefaultWndHandler | procedure | |
CallNextHookEx | function | Calls the next procedure in the hook chain. |
CallWindowProc | function | Calls another Window procedure, to handle a message. |
CharLower | function | |
CharLowerBuff | function | |
CharUpper | function | |
CharUpperBuff | function | |
ClientToScreen | function | Converts (relative) Client coordinates into absolute Screen coordinates. |
ClipboardFormatNeedsNullByte | function | |
ClipboardFormatToMimeType | function | |
ClipboardGetData | function | |
ClipboardGetFormats | function | |
ClipboardGetOwnerShip | function | |
ClipboardRegisterFormat | function | |
CombineRgn | function | Combines two regions. |
CopyRect | function | |
CreateBitmap | function | Creates a bitmap object. |
CreateBrushIndirect | function | Creates a brush object (bitmap). |
CreateBrushWithRadialGradient | function | |
CreateCaret | function | Creates the Caret (text cursor) for the specified windowed control. |
CreateCompatibleBitmap | function | Creates a bitmap that is compatible with the given DC. |
CreateCompatibleDC | function | Creates an memory Device Context, compatible with the device of the given DC. |
CreateDIBitmap | function | Creates a Device Dependent Bitmap (DDB) from a Device Independent Bitmap (DIB). |
CreateDIBSection | function | Creates a bitmap into which the application can write. |
CreateEllipticRgn | function | Creates an elliptic region. |
CreateEllipticRgnIndirect | function | |
CreateEmptyRegion | function | |
CreateFont | function | |
CreateFontIndirect | function | Creates a logical font, selectable into any DC. |
CreateFontIndirectEx | function | Creates a logical font, selectable into any DC. Allows for a long font name. |
CreateIconIndirect | function | Creates an icon or cursor. |
CreatePalette | function | Creates a logical palette, selectable into any DC. |
CreatePatternBrush | function | Creates a logical brush, selectable into any DC. |
CreatePen | function | |
CreatePenIndirect | function | Creates a logical Pen, selectable into any DC. |
CreatePixmapIndirect | function | |
CreatePolygonRgn | function | Creates a polygonal region. |
CreateRectRgn | function | Creates a rectangular region. |
CreateRectRgnIndirect | function | |
CreateRegionCopy | function | |
CreateRoundRectRgn | function | Creates a rectangular region with rounded corners. |
CreateRubberBand | function | |
CreateSolidBrush | function | |
CreateStandardCursor | function | |
DCClipRegionValid | function | |
DeallocateHWnd | procedure | |
DeleteCriticalSection | procedure | Deletes an un-owned critical section. |
DeleteDC | function | Deletes a device context created by CreateDC. |
DeleteObject | function | Frees a GDI object. |
DestroyCaret | function | Destroys the caret but does not free the bitmap. |
DestroyCursor | function | Destroys a mouse cursor. |
DestroyIcon | function | Destroys an icon. |
DestroyRubberBand | procedure | |
DPtoLP | function | Converts an array of Device Points (coordinates) into Logical Points. |
DrawDefaultDockImage | procedure | |
DrawEdge | function | Draws one or more edges for a rectangle. |
DrawFocusRect | function | Draws a focus rectangle on the specified device context. |
DrawFrameControl | function | Draws a window frame for a control of the specified type in a given state. |
DrawGrid | procedure | Draws the grid separator lines between columns and rows with the specified width and height. |
DrawText | function | Draws formatted text on the specified device context. |
Ellipse | function | Draws a filled circle or ellipse, bounded by a rectangle. |
EnableScrollBar | function | Enables or disables the arrows of a scroll bar control, or of the scroll bars of a window. |
EnableWindow | function | Enables or disables mouse and keyboard input to the specified window or control. |
EndPaint | function | Ends painting a window, started with BeginPaint. |
EnterCriticalSection | procedure | Enters a critical section. |
EnumDisplayMonitors | function | Invokes a callback function for every available display monitor. |
EnumFontFamilies | function | Invokes a callback function for every font available on a specified device. |
EnumFontFamiliesEx | function | Invokes a callback function for every available font that matches certain criteria. |
EqualRect | function | Returns True when the rectangles are identical. |
EqualRgn | function | |
ExcludeClipRect | function | Excludes a rectangle from the clipping region, i.e. allows one to paint within the rectangle. |
ExcludeClipRgn | function | |
ExtCreatePen | function | Creates a logical pen, selectable into any DC. |
ExtSelectClipRGN | function | Combines the passed Region with the current clipping region. |
ExtTextOut | function | Draws an string without formatting (single line). |
ExtUTF8Out | function | |
FillRect | function | Fills a rectangle by using the specified brush. |
FillRgn | function | Fills a region using the specified brush. |
FindDefaultBrowser | function | Gets the qualified path to the default browser application and its parameters. |
FloodFill | function | Fills an area of the display surface with the current brush. |
FontIsMonoSpace | function | Indicates whether the specified font handle represents a fixed-pitch typeface. |
Frame3d | function | |
FrameRect | function | Draws a border around a rectangle. |
GetAcceleratorString | function | |
GetActiveWindow | function | Returns the Handle of the active window of the calling thread. |
GetAvailableNativeCanvasTypes | function | |
GetAvailableNativeHandleTypes | function | |
GetBitmapBits | function | Fills an buffer with the bitmap bits. |
GetBkColor | function | Returns the background color of an device context. |
GetBValue | function | Extracts the blue color value from a COLORREF. |
GetCapture | function | Returns the window that captures mouse messages. |
GetCaretPos | function | Returns the caret position, in client coordinates. |
GetCaretRespondToFocus | function | |
GetCharABCWidths | function | Returns the ABC widths of an range of character codes. |
GetClientBounds | function | |
GetClientRect | function | Returns the client rectangle of a control. Left and Top are always 0. |
GetClipBox | function | Returns the smallest rectangle which includes the entire clipping region of an device context. |
GetClipRGN | function | Returns the clipping region of an device context. |
GetCmdLineParamDescForInterface | function | |
GetCompositorExtendedBorder | function | Gets extended border information added by the compositor for the Desktop Window Manager. |
GetControlConstraints | function | |
GetCurrentObject | function | Returns an currently selected object in an device context. |
GetCursorPos | function | |
GetDC | function | Returns the handle of an Device Context (DC) for the client area of a window. |
GetDCOpacity | function | |
GetDCOriginRelativeToWindow | function | |
GetDesignerDC | function | |
GetDeviceCaps | function | Returns various device specific information. |
GetDeviceSize | function | |
GetDIBits | function | Fill an buffer with the bitmap bits. |
GetDoubleClickTime | function | Returns the double-click time, in milliseconds. |
GetDpiForMonitor | function | |
GetFocus | function | Returns the handle of the window that has the focus in the current thread. |
GetFontLanguageInfo | function | Returns language information about the currently selected font. |
GetForegroundWindow | function | Returns the window that the user is currently working with, session wide. |
GetGValue | function | Extracts the green color value from a COLORREF. |
GetIconInfo | function | Returns information about an Icon or Cursor. |
GetKeyState | function | The status of a virtual key. |
GetLCLOwnerObject | function | |
GetMapMode | function | Returns the mapping mode of an device context. |
GetMonitorInfo | function | Returns information about an display monitor. |
GetNativeCanvas | function | |
GetNativeHandle | function | |
GetObject | function | Returns information about a graphics object. |
GetPaletteEntries | function | Retrieves an range of color entries from a logical palette. |
GetParent | function | Returns the parent window of a window. |
GetProp | function | Retrieves an property value for a window. |
GetRGBIntValues | procedure | Extracts the red, green and blue color values from a COLORREF. |
GetRGBValues | procedure | Extracts the red, green and blue color values from a COLORREF. |
GetRgnBox | function | Returns the bounding rectangle of a region, containing the entire region. |
GetROP2 | function | The current Foreground Mixing Mode in an device context. |
GetRValue | function | Extracts the red color value from a COLORREF. |
GetScrollBarSize | function | |
GetScrollbarVisible | function | |
GetScrollInfo | function | Returns all or selected information about a Scroll Bar. |
GetScrollPos | function | Returns the scroll bar position. |
GetScrollRange | function | Returns the minimum and maximum Position values of a Scroll Bar. |
GetStockObject | function | Retrieves a handle to one of the predefined graphic objects. |
GetSysColor | function | Retrieves the system color for standard display elements. |
GetSysColorBrush | function | Retrieves a system brush for standard display elements. |
GetSystemMetrics | function | Retrieves various system metrics. |
GetSystemPaletteEntries | function | Retrieves an range of color entries from the system palette for a device. |
GetTextColor | function | The current text color in an device context. |
GetTextExtentExPoint | function | Calculates the number of characters, that fit into some horizontal space. |
GetTextExtentPoint | function | Computes the display width and height of an string. |
GetTextExtentPoint32 | function | Computes the display width and height of an string. |
GetTextMetrics | function | Retrieves the metrics for the currently selected font. |
GetTickCount | function | Number of ticks (milliseconds) elapsed since the computer was started. |
GetTickCount64 | function | Number of ticks (milliseconds) elapsed since the computer was started. |
GetViewPortExtEx | function | Returns the size of the viewport of an device context. |
GetViewPortOrgEx | function | Returns the origin of the viewport of an device context. |
GetWindowExtEx | function | Returns the extent of a window, in logical units. |
GetWindowLong | function | Returns attributes for the specified window handle. |
GetWindowOrgEx | function | Retrieves the window origin of an device context, in logical units. |
GetWindowRect | function | Retrieves the bounding rectangle for a window, including the window decoration in screen coordinates. |
GetWindowRelativePosition | function | |
GetWindowSize | function | Returns the Width and Height of a window, including the window decoration. |
GradientFill | function | Fills rectangle or triangle areas with gradient colors. |
HideCaret | function | Removes the caret from the screen. |
IndexToOverlayMask | function | Converts an imagelist index into an overlay index. |
InflateRect | function | Inflates the rectangle in all directions. |
InitializeCriticalSection | procedure | Initializes a Critical Section object. |
IntersectClipRect | function | Shrinks the clipping region of an Device Context to a rectangular boundary, e.g. a text area. |
IntersectRect | function | Intersects SrcRect1 and SrcRect2 into DestRect. |
InvalidateFrame | function | |
InvalidateRect | function | Marks a display area for repaint. |
InvalidateRgn | function | Marks a display area for repaint. |
IsCDIntfControl | function | |
IsCharAlphaNumeric | function | Checks for ASCII letter or digit characters. |
IsDBCSLeadByte | function | |
IsDesignerDC | function | |
IsIconic | function | True when the window is minimized. |
IsMobilePlatform | function | |
IsRectEmpty | function | Returns True if the rectangle is empty. |
IsWindow | function | Checks whether a handle refers to a window. |
IsWindowEnabled | function | Determines whether a window can receive mouse and keyboard input. |
IsWindowVisible | function | The definite Visible state of a window. |
IsZoomed | function | True when the window is maximized. |
KillTimer | function | Removes an timer. |
LeaveCriticalSection | procedure | Releases a critical section, for use by other threads. |
LineTo | function | Draws a line from the current position up to, but not including, the specified point. |
LoadBitmap | function | |
LoadCursor | function | |
LoadIcon | function | |
LParamExtractLoHiWord | procedure | Converts an Integer parameter value into low-order and high-order Word values. |
LParamHiWord | function | Gets the high-order Word value stored in the specified Integer pointer. |
LParamLoWord | function | Gets the low-order Word value stored in the specified Integer pointer. |
LPtoDP | function | Converts logical coordinates into device coordinates. |
MakeLong | function | Copies two words into a double word. |
MakeLParam | function | Copies two words into a double word, usable as a message lParam. |
MakeLResult | function | Copies two words into a double word, usable as a message Result. |
MakeROP4 | function | |
MakeWord | function | Copies two bytes into a word. |
MakeWParam | function | Copies two words into a double word, usable as a message wParam. |
MaskBlt | function | Copies part of an source DC into an destination DC, using the specified foreground and background raster operations. |
MessageBox | function | Displays a modal dialog with the given text, caption, icon and buttons. |
MonitorFromPoint | function | Finds an monitor from screen coordinates. |
MonitorFromRect | function | |
MonitorFromWindow | function | Finds the monitor which contains most of the specified window. |
MoveToEx | function | Moves the current position to the specified point. |
MoveWindowOrgEx | function | |
MsgKeyDataToShiftState | function | |
NotifyUser | procedure | |
NotifyUserAtXY | procedure | |
OffsetRgn | function | Moves a region by the specified relative offset. |
OpenDocument | function | Opens the document using the default application associated with the specified file. |
OpenURL | function | Opens a given URL with the default browser for the system. |
PaintRgn | function | |
PeekMessage | function | |
Pie | function | Draws a filled pie-shaped wedge, from an ellipse and two radials. |
PointToSmallPoint | function | |
PointToSmallPointNoChecks | function | |
PolyBezier | function | Draws Bézier curves. |
Polygon | function | Draws a Polygon. |
Polyline | function | Draws a sequence of lines. |
PostMessage | function | Sends a message to a window. |
PredefinedClipboardFormat | function | |
PromptUser | function | |
PromptUserAtXY | function | |
PtInRect | function | Checks whether a Point is within a Rect. |
PtInRegion | function | Determines whether the specified coordinates are within the given region handle. |
RadialArc | function | |
RadialChord | function | |
RadialPie | function | |
RawImage_CreateBitmaps | function | |
RawImage_DescriptionFromBitmap | function | |
RawImage_DescriptionFromDevice | function | |
RawImage_FromBitmap | function | |
RawImage_FromDevice | function | |
RawImage_QueryDescription | function | |
RealizePalette | function | |
Rectangle | function | |
RectInRegion | function | |
RectVisible | function | Indicates whether the specified rectangle in visible in the clipping region for the device context. |
RedrawWindow | function | Redraws (part of) a window. |
RegroupMenuItem | function | |
ReleaseCapture | function | Restores normal mouse input processing, after . |
ReleaseDC | function | Releases an Device Context obtained by GetDC. |
ReleaseDesignerDC | function | |
RemoveEventHandler | procedure | |
RemovePipeEventHandler | procedure | |
RemoveProcessEventHandler | procedure | |
RemoveProp | function | Removes a named property from a window. |
RequestInput | function | |
RestoreDC | function | Restores a Device Context (DC) to an previously saved state. |
RGB | function | Combines Red, Green and Blue values into an TColorRef value. |
RoundRect | function | Draws a rectangle with rounded corners to the specified device context. |
SaveDC | function | Saves the state of a Device Context in the context stack. |
ScreenToClient | function | Converts absolute Screen coordinates into Client relative coordinates. |
ScrollWindow | function | Scrolls the content of a window, by a number of pixels. |
ScrollWindowEx | function | |
SelectClipRGN | function | Sets the ClipRegion of an DeviceContext. |
SelectInFolder | function | Opens a system file manager, displays a directory, and optionally selects the given file. |
SelectObject | function | Selects an object into an device context. |
SelectPalette | function | |
SendCachedLCLMessages | procedure | |
SendMessage | function | Sends a message directed to a specific window to the message pool for the application. |
SetActiveWindow | function | Sets focus to the specified window, if the application is on top. |
SetBkColor | function | Sets the current background color of an device context. |
SetBkMode | function | Sets the background mix mode (transparency) of an device context. |
SetCanvasScaleFactor | procedure | |
SetCapture | function | Sets the mouse capture to the specified window. |
SetCaretPos | function | Moves the Caret to the specified coordinates. |
SetCaretPosEx | function | Moves the Caret into a window. |
SetCaretRespondToFocus | function | |
SetComboMinDropDownSize | function | |
SetCursor | function | Changes the shape of the mouse cursor. |
SetCursorPos | function | Changes the position of the mouse cursor. |
SetDCOpacity | procedure | |
SetEventHandlerFlags | procedure | |
SetFocus | function | Sets the keyboard input focus to the specified window handle. |
SetForegroundWindow | function | Moves a window in front of all other windows, and activates it. |
SetMapMode | function | Sets the mapping mode of an device context. |
SetMenu | function | Assigns a menu to a window. |
SetParent | function | Changes the parent of a window. |
SetProp | function | Adds a property to a window. |
SetRect | function | Copies coordinates into a rectangle. |
SetRectEmpty | function | Clears the rectangle to all zero coordinates. |
SetRectRgn | function | |
SetROP2 | function | Sets the Foreground Mixing Mode in an device context. |
SetRubberBandRect | procedure | |
SetScrollInfo | function | |
SetScrollPos | function | Changes the Position of an Scroll Bar slider. |
SetScrollRange | function | Sets the minimum and maximum position values for a scroll bar. |
SetStretchBltMode | function | Sets the StrechBlt mode for an device context. |
SetSysColors | function | Sets the colors for one or more display elements of window borders and desktop. |
SetTextCharacterExtra | function | Sets extra inter-character spacing in text output. |
SetTextColor | function | Sets the text color on a device context. |
SetTimer | function | Creates or resets an timer for the given time interval. |
SetViewPortExtEx | function | Sets the extent of the viewport for a device context. |
SetViewPortOrgEx | function | Sets the device origin corresponding to the window origin (0,0) in an device context. |
SetWindowExtEx | function | Sets the extent of the window for an device context. |
SetWindowLong | function | Sets an attribute of a window. |
SetWindowOrgEx | function | Specifies which window point maps to the viewport origin (0,0). |
SetWindowPos | function | Changes the size, position, and Z order of a window. |
SetWindowRgn | function | Defines the visible region of a window or control. |
ShowCaret | function | Shows the Caret (text cursor). |
ShowScrollBar | function | Shows or hides a Scroll Bar. |
ShowSelectItemDialog | function | |
ShowWindow | function | Shows a window in an specific state. |
SmallPointToPoint | function | Converts a TSmallPoint value to a TPoint value. |
StretchBlt | function | Copies a rectangular region into an device context, shrinking or stretching it as required. |
StretchDIBits | function | Copies a rectangular region from a DIB into an device context, shrinking or stretching it as required. |
StretchMaskBlt | function | |
SubtractRect | function | Computes the bounding box with the geometric difference between two rectangles. |
SystemParametersInfo | function | Retrieves or sets one of the system-wide parameters. |
TextOut | function | Draws an string without formatting (single line). |
TextUTF8Out | function | |
UnionRect | function | Computes the bounding box of the union of two rectangles. |
UpdateWindow | function | Forces an immediate repaint of a window, if required. |
WindowFromPoint | function | Finds the window containing the specified point. |
Types
TOpenParamStringProc | procedure type |
Variables
OnListViewDialogResult | variable | |
OnShowSelectItemDialogResult | variable | |
OpenDocumentWidgetsetImplementation | variable | |
OpenURLWidgetsetImplementation | variable |
Uses
UnixProcessMathClassesSysUtilsTypesLCLTypeLMessagesLCLStrConstsInterfaceBaseGraphTypeGraphMathFileUtilLazFileUtilsUTF8ProcessLazUTF8LazSysUtilsLazLoggerBaseMaps
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
