CSSetLineSpacing Function

Description

Sets the height in pixels that should be added to the top or the bottom of each console line.

When the height is positive, the console lines grow and occupy more space.

When the height is negative for the top, the drawing rectangle is pulled up. Pulling the drawing rectangle higher than the line height, may make the text disappear.

When the height is negative for the bottom, it shrinks the drawing rectangle and cuts the output. This can be used to get rid of the extra space under each character that has no descender.

Syntax

VB/A 32bits

Private Declare Function CSSetLineSpacing Lib "consoul_010205_32.dll" ( _
  ByVal hWnd As Long, _
  ByVal wSpacing As Integer, _
  ByVal wTopOrBottom As Integer _
) As Integer

VB/A 64bits

Private Declare PtrSafe Function CSSetLineSpacing Lib "consoul_010205_64.dll" ( _
  ByVal hWnd As LongPtr, _
  ByVal wSpacing As Integer, _
  ByVal wTopOrBottom As Integer _
) As Integer

Return Value

The return value has no particular meaning.

Parameters

hWnd

The window handle (HWND) of the Consoul window, as returned by CSCreateLogWindow.

wSpacing

The height in pixels of the line spacing to add either on the top of the line if wTopOrBottom is 0 (zero), or on the bottom of the line if wTopOrBottom is 1 (one) or not zero.

Remarks

See also Line Height, CSGetLineSpacing, CSGetLinePadding and CSSetLinePadding.

Last updated: May 13 2022.