Hi, I'm pretty new at programing with Visual C++. Currently I'm trying to update a code compiled in 16 bit to 32 bit. I've read about 32 bit not supporting the "AfxRegisterVBEvent". In the last line of an insane amout of code I saw this line:
Thus I got rid of it. But then problem occurs when I close the program and get the "Debug Assertion Failed"
I have no clue how to get rid of this error. Here is the closing FileClose() function incase it would help anyone. Thank you in advance.
Code:
//{{AFX_VBX_REGISTER_MAP()
UINT NEAR VBN_CLICK = AfxRegisterVBEvent("CLICK");
//}}AFX_VBX_REGISTER_MAP
Thus I got rid of it. But then problem occurs when I close the program and get the "Debug Assertion Failed"
I have no clue how to get rid of this error. Here is the closing FileClose() function incase it would help anyone. Thank you in advance.
Code:
void CFd4App::FileClose()
{
GetAppDoc()->OnCloseDocument();
char fname[1020];
CString filename;
CStdioFile ReadFileName;
ReadFileName.Open( "filename.flw", CStdioFile::modeRead | CStdioFile::typeText );
ReadFileName.ReadString( fname, 1010 );
for (int i = 0; fname[i] != '.'; i++);
i++;
strcpy(&fname[i],"FLW");
fname[i+3] = '\0';
filename = fname;
ReadFileName.Close();
if (ReadFileName.Open( fname, CStdioFile::modeRead | CStdioFile::typeText ))
{
char header_rec[5];
ReadFileName.ReadString(header_rec,4);
if(atoi(header_rec) > 0)
b_ASCII = TRUE;
else
b_ASCII = FALSE;
ReadFileName.Close();
}
SetAppDoc( (CFd4Doc*)CWinApp::OpenDocumentFile((const char *)filename) );
}
//{{AFX_VBX_REGISTER_MAP()
// UINT NEAR VBN_CLICK = AfxRegisterVBEvent("CLICK");
//}}AFX_VBX_REGISTER_MAP