急求高手帮忙!!!!
#include"afxwin.h"classCHelloApp:publicCWinApp{public:virtualBOOLInitInstance();};CHe...
#include "afxwin.h"
class CHelloApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CHelloApp theApp;
class CMainFrame:public CFrameWnd
{
public:
CMainFrame()
{
Create(NULL,"窗口",WS_OVERLAPPEDWINDOW,CRect(0,0,400,300) );
}
protected:
afx_msg void OnLButtonDown(UINT nFlags,CPoint point);
afx_msg void OnKeyDown(UINT nChar,UINT nRepCnt,UINT nFlags);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CMainFrame,CFrameWnd)
ON_WM_LBUTTONDOWN()
ON_WM_KEYDOWN()
END_MESSAGE_MAP()
void CMainFrame::OnLButtonDown(UINT nFlags,CPoint point)
{
MessageBox("鼠标点击",0);
CFrameWnd::OnLButtonDown(nFlags,point);
}
void CMainFrame::OnKeyDown(UINT nChar,UINT nRepCnt,UINT nFlags)
{
switch (nChar)
{
case VK_UP:
MessageBox("方向键上!");
break;
case VK_DOWN:
MessageBox("方向键下!");
break;
case VK_LEFT:
MessageBox("方向键左!");
break;
case VK_RIGHT:
MessageBox("方向键右!");
break;
}
CFrameWnd::OnKeyDown(nChar,nRepCnt,nFlags);
}
BOOL CHelloApp::InitInstance()
{
m_pMainWnd=new CMainFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
编译的时候,出现2个错误
e:\program files\microsoft visual studio 8\vc\atlmfc\include\atlchecked.h(82) : error C2660: “strcpy_s”:
函数不接受 3 个参数
e:\program files\microsoft visual studio 8\vc\atlmfc\include\atlchecked.h(93) : error C2660: “strcpy_s”: 函数不接受 3 个参数
我把atlchecked.h(82) (93)两行注释掉又能正常编译运行了,怎么回事啊?用的是VC++ 2005........
之后随便建立1个MFC程序都要出现这个“strcpy_s”: 函数不接受 3 个参数 的错误,只有把atlchecked.h相关strcpy_s的注释掉,才行...........
急求高手帮忙!!!!
我没有调用strcpy_s啊,怎么改?怎么会出现“strcpy_s”: 函数不接受 3 个参数 ....而且atlchecked.h那两行应该是检测strcpy_s函数规范的 展开
class CHelloApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CHelloApp theApp;
class CMainFrame:public CFrameWnd
{
public:
CMainFrame()
{
Create(NULL,"窗口",WS_OVERLAPPEDWINDOW,CRect(0,0,400,300) );
}
protected:
afx_msg void OnLButtonDown(UINT nFlags,CPoint point);
afx_msg void OnKeyDown(UINT nChar,UINT nRepCnt,UINT nFlags);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CMainFrame,CFrameWnd)
ON_WM_LBUTTONDOWN()
ON_WM_KEYDOWN()
END_MESSAGE_MAP()
void CMainFrame::OnLButtonDown(UINT nFlags,CPoint point)
{
MessageBox("鼠标点击",0);
CFrameWnd::OnLButtonDown(nFlags,point);
}
void CMainFrame::OnKeyDown(UINT nChar,UINT nRepCnt,UINT nFlags)
{
switch (nChar)
{
case VK_UP:
MessageBox("方向键上!");
break;
case VK_DOWN:
MessageBox("方向键下!");
break;
case VK_LEFT:
MessageBox("方向键左!");
break;
case VK_RIGHT:
MessageBox("方向键右!");
break;
}
CFrameWnd::OnKeyDown(nChar,nRepCnt,nFlags);
}
BOOL CHelloApp::InitInstance()
{
m_pMainWnd=new CMainFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
编译的时候,出现2个错误
e:\program files\microsoft visual studio 8\vc\atlmfc\include\atlchecked.h(82) : error C2660: “strcpy_s”:
函数不接受 3 个参数
e:\program files\microsoft visual studio 8\vc\atlmfc\include\atlchecked.h(93) : error C2660: “strcpy_s”: 函数不接受 3 个参数
我把atlchecked.h(82) (93)两行注释掉又能正常编译运行了,怎么回事啊?用的是VC++ 2005........
之后随便建立1个MFC程序都要出现这个“strcpy_s”: 函数不接受 3 个参数 的错误,只有把atlchecked.h相关strcpy_s的注释掉,才行...........
急求高手帮忙!!!!
我没有调用strcpy_s啊,怎么改?怎么会出现“strcpy_s”: 函数不接受 3 个参数 ....而且atlchecked.h那两行应该是检测strcpy_s函数规范的 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询