CSPaintOnDC Function
Description
CSPaintOnDC draws the contents of the Consoul window using the specified hDC
Win32 API device context handle.
Syntax
VB/A 32bits
Private Declare Function CSPaintOnDC Lib "consoul_010205_32.dll" ( _
ByVal hWnd As Long, _
ByVal hDC As Long, _
ByVal lWidth As Long, _
ByVal lHeight As Long, _
ByVal iStartLine As Integer, _
ByVal iEndLine As Integer _
) As Integer
VB/A 64bits
Private Declare Function CSPaintOnDC Lib "consoul_010205_64.dll" ( _
ByVal hWnd As LongPtr, _
ByVal hDC As LongPtr, _
ByVal lWidth As Long, _
ByVal lHeight As Long, _
ByVal iStartLine As Integer, _
ByVal iEndLine As Integer _
) As Integer
Return Value
The return value is the number of console lines that Consoul rendered on the specified device context.
Parameters
hWnd
The window handle (HWND) of the Consoul window, as returned by CSCreateLogWindow.
hDC
The target display context on which Consoul will paint.
lWidth
The maximum width that the Consoul rendering engine can use horizontally on the target device context.
lHeight
The maximum height that the Consoul rendering engine can use vertically on the target device context.
iStartLine
The line number of the Consoul window queue from which the Consoul rendering engine will start painting.
iEndLine
The maximum number of the Consoul window queue that the Consoul rendering engine may render.
Remarks
No resizing occurs. Consoul will just paint on hDC
as it would on its own window DC.
As an example of what that API function can be used for, AsciiPaint actually uses this API function to create a windows bitmap of its canvas and then save it to disk.