epson 热敏打印机 打印 源码


epson 热敏打印机 打印 源码 vc6 热敏串口打印
资源截图
代码片段和文件信息
#include “stdafx.h“
#include 
#include “PubFunc.h“

extern short g_nLogLevel;

void CFunc::CutString(const CString &strRes CString &strOut long lLen)
{
CString strTmp = ““;
unsigned char ch = 0;
int iFlag = 0 i = 0;

if (strRes.IsEmpty())
{
strOut = ““;
return;
}
if (lLen >= strRes.GetLength()) 
{
strOut = strRes;
return;
}
lLen = lLen - 2;
i = 0; 
iFlag = 0;
while (i + 1 < static_cast(lLen))
{
ch = static_cast(strRes.GetAt(i));
if (ch > 127 || ch < 30)
{
strTmp += strRes.Mid(i 2);
i++;
}
else
{
strTmp += strRes.Mid(i 1);
}
i++;
}
strOut = strTmp + “..“;
return;
}

long CFunc::GetFldStr(const CString &strIn const CString &strFilter int iNo CString &strOut)
{
int i = 0 cnt = 0;
unsigned char ch = 0;

while ((ch = strIn.GetAt(i)) != NULL)
{
if (ch == strFilter.GetAt(0))
{
cnt++;
if (cnt == iNo)
{
break;
}
else
{
strOut.Empty();
}
}
else
{
strOut += CString(ch);
}
i += 1;
}

return cnt;
}

long CFunc::GetFldStr(CString &strIn const CString &strFilter CString &strOut)
{
int i = 0 cnt = 0;
unsigned char ch = 0;

if (strIn.IsEmpty())
{
return 0;
}

while ((ch = strIn.GetAt(i++)) != NULL)
{
if (ch == strFilter.GetAt(0))
{
strIn = strIn.Mid(cnt + 1);
break;
}
else
{
strOut += CString(ch);
}
cnt++;
}

return cnt;
}

long CFunc::GetFldStr(char* pszInbuf const char* pszFilter int iNo char* pszOutBuf)
{
long i = 0 j = 0 m = 0 n = 0;

while (*(pszInbuf + i))
{
if (*(pszInbuf + i) == *pszFilter)
{
m++;
if (m == iNo)
{
*(pszOutBuf + j) = 0x0;
break;
}
else 
{
memset(pszOutBuf 0 j);
j = 0;
}
}
else
{
*(pszOutBuf + j++) = *(pszInbuf + i);
}
i++;
}

return 0;
}

BOOL CFunc::IsDirExist(const CString &strPath)
{
BOOL bRet = FALSE;
char szCurrentDiretory[512] = {‘‘};

GetCurrentDirectory(512 szCurrentDiretory);
bRet = SetCurrentDirectory(strPath);
SetCurrentDirectory(szCurrentDiretory);

return bRet;
}

void CFunc::MakeDir(const CString &strDir)
{
BOOL bRet = FALSE;

bRet = IsDirExist(strDir);
if (!bRet)
{
::CreateDirectory(strDir NULL);
}
return;
}

long CFunc::GetSubFolderTotal(CString strPath)
{
CFileFind OneFile;
BOOL bWorking = FALSE;
long total = 0;

if (strPath.Right(1) != “\“)
{
strPath += “\*.*“;
}

bWorking = OneFile.FindFile(strPath);
while (bWorking)
{
bWorking = OneFile.FindNextFile();
if (OneFile.IsDirectory() && !OneFile.IsDots())
{
total++;
}
}
OneFile.Close();
return total;
}

long CFunc::GetDate(const CString &strFmt CString &strDate)
{
CTime vTime = CTime::GetCurrentTime();

if (strFmt == “YYYY-MM-DD“)
{
strDate.Format(“%04ld-%02ld-%02ld“ vTime.GetYear() vTime.GetMonth() vTime.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      61166  2011-07-11 16:00  ReceiptPrintDebugPubFunc.obj

     文件     127070  2011-07-11 16:00  ReceiptPrintDebugReceiptPrint.dll

     文件       1699  2011-07-11 16:13  ReceiptPrintDebugReceiptPrint.exp

     文件     221432  2011-07-11 16:00  ReceiptPrintDebugReceiptPrint.ilk

     文件       3724  2011-07-11 16:13  ReceiptPrintDebugReceiptPrint.lib

     文件      37928  2011-07-11 16:21  ReceiptPrintDebugReceiptPrint.obj

     文件    6604960  2011-07-11 16:00  ReceiptPrintDebugReceiptPrint.pch

     文件     386048  2011-07-11 16:21  ReceiptPrintDebugReceiptPrint.pdb

     文件        848  2011-07-11 16:00  ReceiptPrintDebugReceiptPrint.res

     文件     118013  2011-07-11 16:00  ReceiptPrintDebugStdAfx.obj

     文件     246784  2011-07-11 16:23  ReceiptPrintDebugvc60.idb

     文件     430080  2011-07-11 16:21  ReceiptPrintDebugvc60.pdb

     文件      57856  1998-10-19 13:41  ReceiptPrintPcomm.dll

     文件       7223  2003-12-30 15:23  ReceiptPrintPcomm.h

     文件      35218  1999-04-27 20:41  ReceiptPrintPcomm.lib

     文件      13495  2010-12-26 08:28  ReceiptPrintPubFunc.cpp

     文件       1428  2010-12-26 08:00  ReceiptPrintPubFunc.h

     文件       2642  2010-12-22 11:26  ReceiptPrintReadMe.txt

     文件      18092  2011-07-08 13:15  ReceiptPrintReceiptPrint.aps

     文件        358  2010-12-22 11:26  ReceiptPrintReceiptPrint.clw

     文件      16437  2012-01-06 15:07  ReceiptPrintReceiptPrint.cpp

     文件        324  2010-12-25 23:52  ReceiptPrintReceiptPrint.def

     文件       4609  2011-07-11 16:18  ReceiptPrintReceiptPrint.dsp

     文件        549  2010-12-22 11:26  ReceiptPrintReceiptPrint.dsw

     文件       1319  2010-12-22 11:26  ReceiptPrintReceiptPrint.h

     文件      99328  2012-01-06 15:07  ReceiptPrintReceiptPrint.ncb

     文件    1262592  2012-01-06 15:07  ReceiptPrintReceiptPrint.opt

     文件        260  2012-01-06 02:25  ReceiptPrintReceiptPrint.plg

     文件       3101  2010-12-22 11:26  ReceiptPrintReceiptPrint.rc

     文件      32205  2011-05-24 09:06  ReceiptPrintReleasePubFunc.obj

............此处省略19个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)