User manual - プリンタライブラリマニュアルver.1.06(2014年6月13日)
Table Of Contents
- 表紙
- プリンタライブラリ.pdf
- 1. 概要
- 2. 動作環境
- 3. 関数
- 3.1 PRNOpen
- 3.2 PRNClose
- 3.3 PRNInitializePrinter
- 3.4 PRNPrintScreen
- 3.5 PRNPrintWindow
- 3.6 PRNTextOut
- 3.7 PRNImageOut
- 3.8 PRNBarcodeOut
- 3.9 PRNBMPOut
- 3.10 PRNCheckMarker
- 3.11 PRNGetStatus
- 3.12 PRNGetLastError
- 3.13 PRNSetPaperWidth
- 3.14 PRNGetPaperWidth
- 3.15 PRNSetPrinterProperty
- 3.16 PRNGetPrinterProperty
- 3.17 PRNDecodeBarcode
- 3.18 PRNResetDecoder
- 3.19 PRNSetBarcodeType
- 3.20 PRNGetBarcodeType
- 4. プログラミング上の注意点
- 5. ESCコマンド
- 6. DeviceEmulator
- 裏表紙(他のマニュアル用)

49
エラー時継続の場合
TCHAR ESCE[2] = {0x1B, 'E'}; // 未印字データの吐き出しコマンド
TCHAR ESCR[3] = {0x1B, 'R', 1}; // エラー時印字継続指定(継続設定)
TCHAR CAN = 0x18;
#define IMAGE_HEIGHT 96
#define IMAGE_WIDTH 72
#define FEED_LENGTH 0
void PrintText()
{
if (PRNOpen() != PRN_NORMAL)
{
MessageBox(NULL, L"Open error", L"Error", MB_OK);
return;
}
if (PRNTextOut(3, ESCR) != PRN_NORMAL)
{
if (CheckError() != TRUE)
{
PRNClose();
return;
}
}
if (PRNTextOut(11, L"0123456789\r") != PRN_NORMAL)
{
if (CheckError() != TRUE)
{
PRNClose();
return;
}
}
if (PRNTextOut(2, ESCE) != PRN_NORMAL)
{
if (CheckError() != TRUE)
{
PRNClose();
return;
}
}
PRNClose();
}
void PrintImage()
{
HANDLE hFile;