CTerminalEmulator::Create Method  
 
BOOL Create(
  HWND hWnd,  
  HFONT hFont,  
  UINT nEmulation,  
  UINT nColumns,  
  UINT nRows  
);

The Create method creates a new virtual terminal emulation display using the specified window and font.

Parameters

hWnd
Handle to the window that will be used to display the virtual terminal.
hFont
Handle to the font that will be used with the virtual terminal. This parameter may be NULL, in which case a default fixed-width font will be used. If a font is specified, it must be fixed-width, otherwise the virtual cursor positioning will be incorrect in some cases.
nEmulation
Identifies the virtual terminal emulation type. The following emulation types are currently supported.
Constant Description
NVT_EMULATION_NONE The virtual display does not emulate any specific terminal type, and does not process escape sequences.
NVT_EMULATION_ANSI The virtual display processes ANSI escape sequences for screen management and cursor positioning. This emulation also supports escape sequences to control the foreground and background color. The default keymap for ANSI function key escape sequences will be selected.
NVT_EMULATION_VT100 The virtual display processes DEC VT-100 escape sequences for screen management and cursor positioning. The default keymap for a DEC VT-100 terminal will be selected.
NVT_EMULATION_VT220 The virtual display processes DEC VT-220 escape sequences for screen management and cursor positioning. This emulation also supports DEC VT-320 escape sequences to control the foreground and background color. The default keymap for a DEC VT-220 terminal will be selected.
nColumns
The maximum number of columns used by the virtual display. This value must be at least 5, and no greater than 255.
nRows
The maximum number of rows used by the virtual display. This value must be at least 5, and no greater than 127.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero.

Remarks

The default colors for the display is a black background and white foreground. If ANSI terminal emulation is selected, bold characters will be displayed on a white background and blue foreground.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csnvtv10.lib

See Also

AttachHandle, DetachHandle