vc6.0代碼轉vs2017相關問題
命令行 error D8016: “/ZI”和“/Gy-”命令行選項不兼容
fatal error C1083: 無法打開包括文件: “WinSock2.h”: No such file or directory
(打開項目屬性-配置屬性-常規-平台工具集-‘Visual Studio 2010(v100)那一項’-重新編譯)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include
vs2010目錄
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
dir.h放入的目錄
#if !defined(__IOSTREAM_H)
//#include <iostream.h> //txwtech
#include <iostream>
#endif
fatal error C1083: 無法打開包括文件:“iostream.h”: No such file or directory
error C2238: 意外的標記位於“;”之前
vs2008
D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include
error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int. setItemBgColor(COLORREF itembg);前添加void
CSkin.h(31): error C2383: “_SetListHeaderSortInfo”: 此符號中不允許有默認參數
typedef (*_LoadSkin) (LPCTSTR skinName,bool bLoadFromIniFile=false);
vc版本:
typedef BOOL (WINAPI * ADD_ACL_QUERY)(TCHAR* sPathName, BOOL EnableComboApplication=FALSE);
升級到vs版本后為:
typedef BOOL (WINAPI * ADD_ACL_QUERY)(TCHAR* sPathName, BOOL EnableComboApplication );
將FALSE去掉不然會出現上述錯誤
///
error C2668: “pow”: 對重載函數的調用不明確
//if(m_deltaTime<(pow(10,-5))||m_deltaTime<0) //pow(10,-5)10的-5次方
if (m_deltaTime < (pow(10.0, -5)) || m_deltaTime < 0) //pow(10,-5)10的-5次方 txwtech
錯誤原因:
VS2010中,數學函數的參數檢查更為嚴格
關於pow()有“long double pow(long double,int)”或“float pow(float,int)”或“double pow(double,int)”
解決方法:
明確使用哪種數據類型
比如使用:pow((double)x,y)即明確使用double pow(double,int)
1>DataStatistics.cpp(58): error C2440: “static_cast”: 無法從“void (__thiscall CDataStatistics::* )(CMenu *,UINT,bool)”轉換為“void (__thiscall CWnd::* )(CMenu *,UINT,BOOL)”
bool改成BOOL
void CDataStatistics::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)//vs2017
//void CDataStatistics::OnInitMenuPopup(CMenu *pPopupMenu,UINT nIndex,bool bSysmenu)//vc6.0
1>InitDeviceDlg.cpp(40): error C2440: “static_cast”: 無法從“int (__thiscall CInitDeviceDlg::* )(void)”轉換為“AFX_PMSG”
在匹配目標類型的范圍內沒有具有該名稱的函數
VC 禁止顯示狀態 錯誤 2440 “static_cast”: 無法從“BOOL (__thiscall CMainFrame::* )(void)”轉換為“AFX_PMSG
2016/8/4 9:55:25 來源:apple 閱讀:1718
VC 禁止顯示狀態 錯誤C2440“static_cast”: 無法從“BOOL (__thiscall CMainFrame::* )(void)”轉換為“AFX_PMSG
關於上面的這個錯誤,查詢了很多資料,最后與前面的問題做了比較,得到另一個帖子的一些啟發,如下內容:
"
回復者:我也遇到過同樣的問題,將int改為void,然后將原函數中的return 0;這句話刪掉。一切就OK了。
追問:
我的返回值是有用的的不是返回一個,是好幾個。
追答:
這是個矛盾體,
回復者:那樣就沖突了,既是消息映射,又要有返回值。這個是沖突的。
"
AFX_PMSG類型:
void (AFX_MSG_CALL CCmdTarget::* )(void)
發生錯誤的源代碼:
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
ON_COMMAND(IDM_PATIENT_VIEWREPORT, OnPatientViewReport)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
關於我的理解,既然是消息映射,那就用前面的辦法吧!
使用“ON_MESSAGE(IDM_PATIENT_VIEWREPORT, OnPatientViewReport)//VC6->VS2015, 2016.8.4 by sms,將上面語句進行修正”,來代替“ON_COMMAND(IDM_PATIENT_VIEWREPORT, OnPatientViewReport)”,
同時還要參考前一篇文章的方法進行修改就行了。
OK Rebuild,通過~
1>WListBox.cpp(61): error C2556: “int CWListBox::SetTextColor(COLORREF)”: 重載函數與“void CWListBox::SetTextColor(COLORREF)”只是在返回類型上不同
//CWListBox::SetTextColor(COLORREF color) //txwtech
void CWListBox::SetTextColor(COLORREF color)
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): warning C4346: “iterator_category”: 依賴名稱不是類型
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): note: 用“typename”為前綴來表示類型
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(86): note: 參見對正在編譯的 類 模板 實例化 "std::iterator_traits<_It>" 的引用
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): error C2061: 語法錯誤: 標識符“iterator_category”
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): error C2238: 意外的標記位於“;”之前
解決方法:
typedef typename _It::iterator_category iterator_category; //txwtech,_It前加一個typename
vc6.0轉vs2010之后的編譯環境:
找到項目-屬性-》VC++目錄,包含目錄:添加以下三個路徑。
D:\Program Files (x86)\Microsoft Visual Studio\VC98\Include
D:\Program Files (x86)\Microsoft Visual Studio\VC98\ATL\Include
D:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\Include
引用目錄:
D:\Program Files (x86)\Microsoft Visual Studio\VC98\Lib
D:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\Lib
庫目錄:
D:\Program Files (x86)\Microsoft Visual Studio\VC98\Lib
D:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\Lib
否則報以下錯誤。
1>------ 已啟動生成: 項目: SMW200, 配置: Debug Win32 ------
1>StdAfx.cpp
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>
1>NOTE: WINVER has been defined as 0x0500 or greater which enables
1>Windows NT 5.0 and Windows 98 features. When these headers were released,
1>Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
1>
1>For this release when WINVER is defined as 0x0500 or greater, you can only
1>build beta or test applications. To build a retail application,
1>set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
1>to see if retail Windows NT 5.0 or Windows 98 headers are available.
1>
1>See the SDK release notes for more information.
1>
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(233): error C2065: “DWORD_PTR”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(233): error C2143: 語法錯誤 : 缺少“;”(在“GetWindowThreadProcessId”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2061: 語法錯誤 : 標識符“LONG_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2146: 語法錯誤 : 缺少“(”(在標識符“LONG_PTR”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2061: 語法錯誤 : 標識符“LONG_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2146: 語法錯誤 : 缺少“(”(在標識符“LONG_PTR”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31): error C2143: 語法錯誤 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): error C2182: “AtlTraceCloseProcess”: 非法使用“void”類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): error C2182: “AtlTraceSnapshotProcess”: 非法使用“void”類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(35): error C2143: 語法錯誤 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(35): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(35): error C2086: “int ATL::DWORD_PTR”: 重定義
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31) : 參見“ATL::DWORD_PTR”的聲明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(36): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(37): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(37): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(37): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2143: 語法錯誤 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2086: “int ATL::DWORD_PTR”: 重定義
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31) : 參見“ATL::DWORD_PTR”的聲明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2143: 語法錯誤 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2086: “int ATL::DWORD_PTR”: 重定義
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31) : 參見“ATL::DWORD_PTR”的聲明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(42): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(42): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(42): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(43): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(43): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(43): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(44): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(44): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(44): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(45): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(45): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(45): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(46): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(46): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(46): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(47): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(47): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(47): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(57): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(57): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(57): error C2182: “AtlTraceVA”: 非法使用“void”類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(58): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(59): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(59): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(59): error C2182: “AtlTraceVU”: 非法使用“void”類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(60): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(62): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(63): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(64): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(65): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(91): error C2146: 語法錯誤 : 缺少“;”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(91): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(91): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(99): error C2146: 語法錯誤 : 缺少“;”(在標識符“dwCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(99): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(99): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(102): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(102): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(102): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): error C2182: “AtlTraceGetModuleInfo”: 非法使用“void”類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): warning C4229: 使用了記時錯誤 : 忽略數據上的修飾符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): error C2182: “AtlTraceGetCategoryInfo”: 非法使用“void”類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(48): error C2833: “operator DWORD_PTR”不是可識別的運算符或類型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(48): error C2059: 語法錯誤 : “newline”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(48): error C2238: 意外的標記位於“;”之前
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(52): error C2146: 語法錯誤 : 缺少“;”(在標識符“m_dwCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(52): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(52): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(57): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(57): warning C4800: “int”: 將值強制為布爾值“true”或“false”(性能警告)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(57): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(83): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(89): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(122): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(124): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(124): error C2535: “void ATL::CTrace::TraceV(const char *,int) const”: 已經定義或聲明成員函數
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(121) : 參見“ATL::CTrace::TraceV”的聲明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(126): error C2146: 語法錯誤 : 缺少“;”(在標識符“RegisterCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(126): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(127): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(127): warning C4183: “RegisterCategory”: 缺少返回類型;假定為返回“int”的成員函數
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(138): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(145): error C2146: 語法錯誤 : 缺少“;”(在標識符“m_dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(145): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(145): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(73): error C2614: “ATL::CTrace”: 非法的成員初始化:“m_dwModule”不是基或成員
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(74): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(79): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(86): error C2065: “dwCategory”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(86): error C2065: “nLevel”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(86): error C2065: “eStatus”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(91): error C2065: “pnLevel”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(91): error C2065: “peStatus”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(92): error C2065: “dwCategory”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(92): error C2065: “pnLevel”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(92): error C2065: “peStatus”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(98): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(104): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(110): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(118): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(119): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(127): error C2065: “m_dwModule”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(139): error C2039: “m_dwModule”: 不是“ATL::CTrace”的成員
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(60) : 參見“ATL::CTrace”的聲明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(139): error C2065: “dwCategory”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(139): error C2065: “nLevel”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): error C2146: 語法錯誤 : 缺少“)”(在標識符“dwCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): error C2433: “IsTracingEnabled”: 不允許在數據聲明中使用“inline”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): warning C4800: “int”: 將值強制為布爾值“true”或“false”(性能警告)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): error C2059: 語法錯誤 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(149): error C2143: 語法錯誤 : 缺少“;”(在“{”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(149): error C2447: “{”: 缺少函數標題(是否是老式的形式表?)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(154): error C2061: 語法錯誤 : 標識符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “dwCategory”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “nLevel”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “pszFmt”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “args”: 未聲明的標識符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): fatal error C1003: 錯誤計數超過 100;正在停止編譯
1>已完成生成項目“SMW200.vcxproj”的操作 - 失敗。
========== 生成: 成功 0 個,失敗 1 個,最新 0 個,跳過 0 個 ==========
error C4578: “abs”: 從“float”到“int”的轉換,可能丟失數據(你的意思是調用“fabsf”或進行 #include <cmath>?)
// float abs_variable;
int abs_variable; //txwtech
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(226): warning C4348: “std::istreambuf_iterator”: 重定義默認參數 : 參數 2
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(228): note: 參見“std::istreambuf_iterator”的聲明
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(228): warning C4346: “_Tr::off_type”: 依賴名稱不是類型
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(228): note: 用“typename”為前綴來表示類型
error C2923: “std::iterator”: 對於參數“_D”,“_Tr::off_type”不是有效的 模板 類型變量
error C2664: “char *strcpy(char *,const char *)”: 無法將參數 1 從“WCHAR [32]”轉換為“char *”
//strcpy(m_lf.lfFaceName, strFont);
//_tcscpy(m_lf.lfFaceName, strFont);
wcscpy_s(m_lf.lfFaceName, strFont);
https://blog.csdn.net/u014628654/article/details/45246721
//如下都是vs2017包含頭文件名的順序有關系。順序不對,就一堆錯誤咯。
正確的順序:
#include "pch.h"
#include "stdafx.h"
//#include "main.h"
#include "Lable.h"
vs2017, pch.h (previous compiled header).cpp都是需要包含在第一個位置的。
引用或者調用使用其他的現有的cpp時,pch.h (previous compiled header).cpp都是需要包含在第一個位置的
1>Lable.cpp
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(47): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(48): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(49): error C2065: “m_crText”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(50): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(51): error C2065: “m_lf”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(52): error C2065: “m_font”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(52): error C2065: “m_lf”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(53): error C2065: “m_bTimer”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(54): error C2065: “m_bState”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(55): error C2065: “m_bTransparent”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(56): error C2065: “m_bLink”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(57): error C2065: “m_hCursor”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(58): error C2065: “m_Type”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(58): error C2065: “None”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(59): error C2065: “m_bFont3d”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(60): error C2065: “m_bNotifyParent”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(61): error C2065: “m_bToolTips”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(62): error C2065: “m_bRotation”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(63): error C2065: “m_cr3DHiliteColor”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(64): error C2065: “m_hwndBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(65): warning C4508: “CLable”: 函數應返回一個值;假定“void”返回類型
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(67): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(67): error C2523: “<未知>::~CLable”: 析構函數 標記不匹配
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(68): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(68): error C2084: 函數“int CLable(void)”已有主體
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(47): note: 參見“CLable”的前一個定義
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(70): error C2065: “m_font”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(71): error C2065: “m_hwndBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(72): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2270: “GetMessageMap”: 非成員函數上不允許修飾符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C3861: “GetThisMessageMap”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2146: 語法錯誤: 缺少“;”(在標識符“ThisClass”的前面)
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2065: “ThisClass”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(77): error C2653: “ThisClass”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(77): error C2065: “OnTimer”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(78): error C2653: “ThisClass”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(78): error C2065: “OnLButtonDown”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(79): error C2653: “ThisClass”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(79): error C2065: “OnSetCursor”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(80): error C2653: “ThisClass”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(80): error C2065: “OnSysColorChange”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(81): error C2653: “ThisClass”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(81): error C2065: “OnPaint”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(83): error C2248: “CWnd::GetThisMessageMap”: 無法訪問 protected 成員(在“CWnd”類中聲明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(3254): note: 參見“CWnd::GetThisMessageMap”的聲明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 參見“CWnd”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(88): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(90): error C2065: “m_font”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(91): error C2065: “m_font”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(91): error C2065: “m_lf”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(97): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(99): error C2355: “this”: 只能在非靜態成員函數或非靜態數據成員初始值設定項的內部引用
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(99): error C2512: “CPaintDC::CPaintDC”: 沒有合適的默認構造函數可用
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(104): error C2660: “GetClientRect”: 函數不接受 1 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8799): note: 參見“GetClientRect”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(106): error C2660: “GetWindowTextW”: 函數不接受 1 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8770): note: 參見“GetWindowTextW”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(112): error C2065: “m_bTransparent”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(126): error C2065: “m_crText”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(127): error C2065: “m_font”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(130): error C2065: “m_bTransparent”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(134): error C2065: “m_bState”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(134): error C2065: “m_Type”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(134): error C2065: “Background”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(136): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(137): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(139): error C2065: “m_hwndBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(143): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(144): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(146): error C2065: “m_hwndBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(158): error C2065: “m_hBackBrush”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(161): error C2065: “m_bState”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(161): error C2065: “m_Type”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(161): error C2065: “Text”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(165): error C3861: “GetStyle”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(168): error C3861: “GetStyle”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(171): error C3861: “GetStyle”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(174): error C3861: “GetStyle”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(179): error C3861: “GetStyle”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(193): error C2065: “m_bRotation”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(207): error C2065: “m_bFont3d”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(209): error C2065: “m_cr3DHiliteColor”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(211): error C2065: “m_3dType”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(211): error C2065: “Raised”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(225): error C2065: “m_bTransparent”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(232): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(234): error C2065: “m_bState”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(236): error C2660: “InvalidateRect”: 函數不接受 2 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8451): note: 參見“InvalidateRect”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(237): error C2660: “UpdateWindow”: 函數不接受 0 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8264): note: 參見“UpdateWindow”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(239): error C2248: “CWnd::OnTimer”: 無法訪問 protected 成員(在“CWnd”類中聲明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2848): note: 參見“CWnd::OnTimer”的聲明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 參見“CWnd”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(239): error C2352: “CWnd::OnTimer”: 非靜態成員函數的非法調用
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2848): note: 參見“CWnd::OnTimer”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(242): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(244): error C2065: “m_hCursor”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(246): error C2065: “m_hCursor”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(249): error C2248: “CWnd::OnSetCursor”: 無法訪問 protected 成員(在“CWnd”類中聲明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2847): note: 參見“CWnd::OnSetCursor”的聲明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 參見“CWnd”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(249): error C2352: “CWnd::OnSetCursor”: 非靜態成員函數的非法調用
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2847): note: 參見“CWnd::OnSetCursor”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(252): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(254): error C2065: “m_bNotifyParent”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(257): error C2660: “GetWindowTextW”: 函數不接受 1 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8770): note: 參見“GetWindowTextW”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(266): error C3861: “GetSafeHwnd”: 找不到標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(267): error C2660: “GetDlgCtrlID”: 函數不接受 0 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(5137): note: 參見“GetDlgCtrlID”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(268): error C2065: “NM_LINKCLICK”: 未聲明的標識符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(269): error C2660: “GetParent”: 函數不接受 0 個參數
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(9800): note: 參見“GetParent”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(272): error C2248: “CWnd::OnLButtonDown”: 無法訪問 protected 成員(在“CWnd”類中聲明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2830): note: 參見“CWnd::OnLButtonDown”的聲明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 參見“CWnd”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(272): error C2352: “CWnd::OnLButtonDown”: 非靜態成員函數的非法調用
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2830): note: 參見“CWnd::OnLButtonDown”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C2143: 語法錯誤: 缺少“;”(在“&”的前面)
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C2365: “CLable”: 重定義;以前的定義是“函數”
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(67): note: 參見“CLable”的聲明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C2653: “CLable”: 不是類或命名空間名稱
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): fatal error C1003: 錯誤計數超過 100;正在停止編譯
1>已完成生成項目“TXW888.vcxproj”的操作 - 失敗。