User manual

CLEARjet GmbH CX-one
The following source code (C++) shows a typical sequence using
CLEARjet Active CX SDK:
Print a label to the card:
// Define a variable for the status of transport the commands
long lRet = 0;
// Select the font size with wich you want to print
lRet += m_ctrlCXone.SelectFontSize( 3 ); // See printer manual
for fontsize parameter
// Set coordinates of the first textline
lRet += m_ctrlCXone.PrintPosX( 20 );
lRet += m_ctrlCXone.PrintPosY( 850 );
// Print first line
lRet += m_ctrlCXone.PrintText( "Phone", false ); // "false"
indicates that more lines follow
// Set coordinates of the second textline
lRet += m_ctrlCXone.PrintPosX( 40 );
lRet += m_ctrlCXone.PrintPosY( 650 );
// Print second line second part
lRet += m_ctrlCXone.PrintText( "Fax", true ); // "true"
indicates that no more lines follow
// Now the printer starts printing on the card
// Check if any command does not work
if( lRet )
{
// General transport error of the command
MessageBox( "Can't send the command", "Error" );
return;
}
Programmers Manual Page 7 / 53