把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
This commit is contained in:
gjm committed 2026-10-04 00:04:20 +08:00
1 parent 2b0c2055ff
commit 164968b62e
6171 files changed
+191244 -191243

No files matched your search

@@ -1,4 +1,4 @@
#include "StdAfx.h"
#include "StdAfx.h"
#include "BlkRecsPreviewCtrl.h"
#include "GsPreviewCtrl.h"
#include "math.h"
@@ -150,7 +150,7 @@ BOOL CBlkRecsPreviewCtrl::Init(int nRows,int nCols,int nCount,AcDbDatabase* pDb)
if (nCount > 0)
{
// 根据nCount创建viewCtrl
// 根据nCount创建viewCtrl
DWORD dwStyle = WS_CHILD | WS_VISIBLE;
CGsPreviewCtrl* pPreViewCtrl = NULL;
for (int i = 0;i < nCount;i++)
@@ -287,7 +287,7 @@ bool CBlkRecsPreviewCtrl::InitDBCtrlFor2D(LPCTSTR pszDWG, LPCTSTR sName)
Acad::ErrorStatus es = pDb->readDwgFile(pszDWG);
if (es != Acad::eOk)
{
AfxMessageBox(CString(_T("读取文件失败 \"")) + pszDWG + _T("\""));
AfxMessageBox(CString(_T("读取文件失败 \"")) + pszDWG + _T("\""));
DELETE_PTR(pDb);
return false;
}
@@ -384,12 +384,12 @@ BOOL CBlkRecsPreviewCtrl::Add(LPCTSTR pszDwgFile,LPCTSTR pszName)
Acad::ErrorStatus es = pDb->readDwgFile(pszDwgFile);
if (es != Acad::eOk)
{
AfxMessageBox(CString(_T("读取文件失败 \"")) + pszDwgFile + _T("\""));
AfxMessageBox(CString(_T("读取文件失败 \"")) + pszDwgFile + _T("\""));
DELETE_PTR(pDb);
return FALSE;
}
// 根据nCount创建viewCtrl
// 根据nCount创建viewCtrl
DWORD dwStyle = WS_CHILD | WS_VISIBLE;
CGsPreviewCtrl* pPreViewCtrl = NULL;
@@ -441,7 +441,7 @@ BOOL CBlkRecsPreviewCtrl::Add(LPCTSTR pszDwgFile,LPCTSTR pszName)
BOOL CBlkRecsPreviewCtrl::Add(AcDbDatabase* pDb,LPCTSTR pszName)
{
// 根据nCount创建viewCtrl
// 根据nCount创建viewCtrl
DWORD dwStyle = WS_CHILD | WS_VISIBLE;
CGsPreviewCtrl* pPreViewCtrl = NULL;
@@ -493,12 +493,12 @@ BOOL CBlkRecsPreviewCtrl::Add(LPCTSTR pszDwgFile,LPCTSTR pszShowRc,LPCTSTR pszNa
Acad::ErrorStatus es = pDb->readDwgFile(pszDwgFile);
if (es != Acad::eOk)
{
AfxMessageBox(CString(_T("读取文件失败 \"")) + pszDwgFile + _T("\""));
AfxMessageBox(CString(_T("读取文件失败 \"")) + pszDwgFile + _T("\""));
DELETE_PTR(pDb);
return FALSE;
}
// 根据nCount创建viewCtrl
// 根据nCount创建viewCtrl
DWORD dwStyle = WS_CHILD | WS_VISIBLE;
CGsPreviewCtrl* pPreViewCtrl = NULL;
@@ -564,7 +564,7 @@ Acad::ErrorStatus CBlkRecsPreviewCtrl::InitDrawingControl (CGsPreviewCtrl* pPreV
SetViewTo(pPreViewCtrl->mpView, pDb, xform);
// tell the view to display this space
//不显示当前模型空间记录的现有实体!!!![lfy-2013-2-20]
//不显示当前模型空间记录的现有实体!!!![lfy-2013-2-20]
//pPreViewCtrl->view()->add(spaceRec.object(), pPreViewCtrl->model());
}
return spaceRec.openStatus();
@@ -657,7 +657,7 @@ bool CBlkRecsPreviewCtrl::GetActiveViewPortInfo (AcDbDatabase *pDb, ads_real &he
// get the current working database as a backup
AcDbDatabase *workingDataBase = acdbHostApplicationServices()->workingDatabase();
////将导致渲染错误,文件保存,核查错误提示 LFY 2019-6-3
////将导致渲染错误,文件保存,核查错误提示 LFY 2019-6-3
// now set the working database
//acdbHostApplicationServices()->setWorkingDatabase(pDb);
@@ -706,7 +706,7 @@ bool CBlkRecsPreviewCtrl::GetActiveViewPortInfo (AcDbDatabase *pDb, ads_real &he
}
// now restore the original working database
//将导致渲染错误,文件保存,核查错误提示 LFY 2019-6-3
//将导致渲染错误,文件保存,核查错误提示 LFY 2019-6-3
//acdbHostApplicationServices()->setWorkingDatabase(workingDataBase);
return (true);
@@ -741,7 +741,7 @@ BOOL CBlkRecsPreviewCtrl::PreViewNamedRecs(LPCTSTR pszDwgFile,LPCTSTR pszHead)
m_arRecNames.Add(pszHead);
m_arDwgFiles.Add(pszDwgFile);
// 根据nCount创建viewCtrl
// 根据nCount创建viewCtrl
DWORD dwStyle = WS_CHILD | WS_VISIBLE;
CGsPreviewCtrl* pPreViewCtrl = NULL;
@@ -931,16 +931,16 @@ void CBlkRecsPreviewCtrl::OnPaint()
if (m_bInit) return;
//获取每页单元位置
//获取每页单元位置
CArray<CRect,CRect> arCells;
DrawGridCell(&dc,arCells);
//设置当前可见视的单元位置
//设置当前可见视的单元位置
SetShowViewPort(&dc,arCells);
DrawCurselCell(&dc);
//显示当前可见视
//显示当前可见视
CGsPreviewCtrl* pView = NULL;
for (int i = 0;i < m_arPreViewCtrls.GetSize();i++)
{
@@ -970,7 +970,7 @@ void CBlkRecsPreviewCtrl::DrawCurselCell(CDC* pDC)
nIndex = i * m_nCols + j;
if (nIndex == nCurCell)
{
//超出
//超出
int nTrueSel = m_nCurSel + GetScrollPos(SB_VERT) * (m_nRows * m_nCols);
if (nTrueSel > m_arPreViewCtrls.GetSize() - 1)
{
@@ -1074,7 +1074,7 @@ void CBlkRecsPreviewCtrl::SetShowViewPort(CDC* pDC,CArray<CRect,CRect>& arCells)
lf.lfWidth = 0;
lf.lfEscapement = 0;
lf.lfWeight = FW_NORMAL;
_tcscpy(lf.lfFaceName, _T("宋体"));
_tcscpy(lf.lfFaceName, _T("宋体"));
if (m_bLfFont)
{
memcpy(&lf,&m_lfFont,sizeof(LOGFONT));
@@ -1098,7 +1098,7 @@ void CBlkRecsPreviewCtrl::SetShowViewPort(CDC* pDC,CArray<CRect,CRect>& arCells)
rc = arCells.GetAt(nRcIndex);
pView->MoveWindow(rc);
//写文字标题
//写文字标题
rcLable = rc;
rcLable.top = rc.bottom;
rcLable.bottom = rcLable.top + s_nSpace;
@@ -1137,7 +1137,7 @@ void CBlkRecsPreviewCtrl::SetShowViewPort(CDC* pDC,CArray<CRect,CRect>& arCells)
lf.lfWidth = 0;
lf.lfEscapement = 0;
lf.lfWeight = FW_NORMAL;
_tcscpy(lf.lfFaceName, _T("宋体"));
_tcscpy(lf.lfFaceName, _T("宋体"));
if (m_bLfFont)
{
memcpy(&lf,&m_lfFont,sizeof(LOGFONT));
@@ -1156,8 +1156,8 @@ void CBlkRecsPreviewCtrl::SetShowViewPort(CDC* pDC,CArray<CRect,CRect>& arCells)
pView->MoveWindow(rc);
//写文字标题
//写文字标题
//写文字标题
//写文字标题
rcLable = rc;
rcLable.top = rc.bottom;
rcLable.bottom = rcLable.top + s_nSpace;
@@ -1197,7 +1197,7 @@ void CBlkRecsPreviewCtrl::OnLButtonDown(UINT nFlags, CPoint point)
lastSmall.DeflateRect(-2, -2, -2, -2);
cursSmall.DeflateRect(-2, -2, -2, -2);
// 更新外边框(红变白,白变红)
// 更新外边框(红变白,白变红)
CRgn lastRgn, lastSmlRgn, cursRgn, cursSmlRgn, rgnLast, rgnCurs;
lastRgn.CreateRectRgn(rcLast.left, rcLast.top, rcLast.right, rcLast.bottom);
cursRgn.CreateRectRgn(rcCurs.left, rcCurs.top, rcCurs.right, rcCurs.bottom);