摘要: CSize fontMetricsCSize(QString source, QPainter *pDC); CSize fontMetricsCSize(QString source, QPainter *pDC){ CSize sz; QFontMetrics fontMetrics(pDC-> 阅读全文
posted @ 2019-08-16 17:59 石首桃花山 阅读(177) 评论(0) 推荐(0) 编辑
摘要: typedef list<CNewParRange> ParList; const CString C_Pos_Start_Completion[] = { _T("M2208"), _T("M2240"), _T("M2272"), _T("M2304"), _T("M2336"), _T("M2 阅读全文
posted @ 2019-08-16 17:54 石首桃花山 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #ifndef QTREEWIDGETHELPER_H#define QTREEWIDGETHELPER_H#include <QTreeWidget>#pragma execution_character_set("utf-8")void QTreeWidgetSetHearderLabel(QT 阅读全文
posted @ 2019-08-16 17:52 石首桃花山 阅读(267) 评论(0) 推荐(0) 编辑
摘要: #include <QStringListModel>#include <QStandardItemModel>#include <QModelIndex> 初始化 model = new QStandardItemModel(ui->tableView); model->setColumnCoun 阅读全文
posted @ 2019-08-16 17:40 石首桃花山 阅读(847) 评论(0) 推荐(0) 编辑
摘要: SetSoftElemMonitorRunning = false; QObject::disconnect(this, SIGNAL(ShowData(unsigned char*, int, QString)), this, SLOT(ShowDataSlot(unsigned char*, i 阅读全文
posted @ 2019-08-16 17:39 石首桃花山 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #ifndef DLGPASSWORD_H#define DLGPASSWORD_H#include <QDialog>#include <afx.h>namespace Ui { class DlgPassWordClass;}class CDlgPassWord : public QDialog 阅读全文
posted @ 2019-08-16 17:37 石首桃花山 阅读(177) 评论(0) 推荐(0) 编辑
摘要: struct REGINFO{ CString strReg; int iRegNum; list<CString> m_lstFGK; REGINFO() { strReg=""; iRegNum=0; m_lstFGK.clear(); } }; typedef struct MONITORPR 阅读全文
posted @ 2019-08-16 17:34 石首桃花山 阅读(213) 评论(0) 推荐(0) 编辑
摘要: bool CSFCApp::IsAllNum(CString str){ if(str=="") return false;// if(str.GetAt(0) == '-') // str = str.Right(str.GetLength()-1); bool bNum = false; for 阅读全文
posted @ 2019-08-16 17:24 石首桃花山 阅读(105) 评论(0) 推荐(0) 编辑
摘要: ShellExecute(NULL,"open","SFC帮助文档.chm",NULL,NULL,SW_SHOWNORMAL); 阅读全文
posted @ 2019-08-16 17:23 石首桃花山 阅读(106) 评论(0) 推荐(0) 编辑
摘要: CString CSFCApp::DecToHex(int iSource){ CString str; str.Format(_T("%X"), iSource); return str;} void CSFCApp::DecToBin(CString strSource, CUIntArray 阅读全文
posted @ 2019-08-16 17:18 石首桃花山 阅读(149) 评论(0) 推荐(0) 编辑
摘要: double CSFCApp::HexToInt(CString strSource){ //字符串16进制转10进制 double nTemp=0; CString strTemp; strTemp=strSource; for(char cc='G',dd='g'; cc<='Z',dd<='z 阅读全文
posted @ 2019-08-16 17:17 石首桃花山 阅读(197) 评论(0) 推荐(0) 编辑
摘要: bool CSFCApp::IsNum(CString str){ if(str=="") return false; if(str.GetAt(0) == '-') str = str.Right(str.GetLength()-1); bool bNum = false; for(int i=0 阅读全文
posted @ 2019-08-16 17:16 石首桃花山 阅读(215) 评论(0) 推荐(0) 编辑
摘要: bool CSFCApp::IsHex(CString str){ int iLen = str.GetLength(); bool bHex = true; for(int i=0; i<iLen; i++) { if ((str[i] >= '0' && str[i] <= '9') || (s 阅读全文
posted @ 2019-08-16 17:16 石首桃花山 阅读(165) 评论(0) 推荐(0) 编辑
摘要: HANDLE hMutex=::CreateMutex(NULL,TRUE, _T("SFC"));//FirstName可以随便取一个唯一的名字 if (hMutex!=NULL) { if (GetLastError()==ERROR_ALREADY_EXISTS) { AfxMessageBo 阅读全文
posted @ 2019-08-16 17:14 石首桃花山 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 注意: 1、每种方法也要复制相应的DLL文件到相应目录,或者设定DLL目录的位置,具体方法为:"Properties" -> "Configuration Properties" -> "Debugging",在"Working Directory"设置dll的路径就可以了 2、无论是设置DLL目录 阅读全文
posted @ 2019-08-16 17:09 石首桃花山 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 为了避免同一个头文件被包含(include)多次,C/C++中有两种宏实现方式:一种是#ifndef方式;另一种是#pragma once方式。 阅读全文
posted @ 2019-08-16 17:07 石首桃花山 阅读(167) 评论(0) 推荐(0) 编辑