minifiredragon
Programmer
I recently was using a Learning edition of Microsoft Visual C++ (ver 6). A few days ago I went out and bought Visual C++ .net 2003 so I can have something that removes that annoying nag screen. Now, when I compile my previously working program, I get:
Visual Studio Projects\ICServer\ICServer\ICServerView.h(66): error C2555: 'CICServerView:
reTranslateMessage': overriding virtual function return type differs and is not covariant from 'CFormView:
reTranslateMessage'
and I don't know why. In my .h file it is defined as such:
protected:
virtual bool PreTranslateMessage(MSG* pMsg);
and in my .cpp file as such:
bool CICServerView:
reTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN && pMsg->wParam == 'I')
{
//Initialize InsertDlg window
CInsertDlg dlgInsertDlg;
//OPen Window
dlgInsertDlg.DoModal();
return 1;
}
//return CFormView:
reTranslateMessage(pMsg) ;
}
which is almost how I had it in the one that compiled in the previous Compiler. All I did is re-add the function using virtual and protected. Before it was just private.
Any suggestions?? I know you all help me alot before. I am very new to the MFC.
Visual Studio Projects\ICServer\ICServer\ICServerView.h(66): error C2555: 'CICServerView:
and I don't know why. In my .h file it is defined as such:
protected:
virtual bool PreTranslateMessage(MSG* pMsg);
and in my .cpp file as such:
bool CICServerView:
{
if(pMsg->message == WM_KEYDOWN && pMsg->wParam == 'I')
{
//Initialize InsertDlg window
CInsertDlg dlgInsertDlg;
//OPen Window
dlgInsertDlg.DoModal();
return 1;
}
//return CFormView:
}
which is almost how I had it in the one that compiled in the previous Compiler. All I did is re-add the function using virtual and protected. Before it was just private.
Any suggestions?? I know you all help me alot before. I am very new to the MFC.