Usando MDI a lo SDI
Publicado por Nelek (816 intervenciones) el 11/07/2006 10:48:58
He encontrado un comando que me puede ayudar a cerrar los documentos que tenga abiertos (en caso de que haya alguno)
CDocTemplate::CloseAllDocuments
virtual void CloseAllDocuments( BOOL bEndSession );
Pero tengo un problema, cuando llamo a esta funcion recibo un fallo de compilacion que dice:
error C2352: 'CDocTemplate::CloseAllDocuments' : Llamada ilicita a una funcion miembro
Yo lo estoy usando de la siguiente manera:
BOOL CFPSDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
p_nICount = 0; //Miguel: There are no Inputs
p_posI = NULL; //Miguel: No position, list empty
p_clIList.RemoveAll(); //Miguel: Deleting all the contents of the Inputs' list
p_nOCount = 0; //Miguel: There are no Outputs
p_posO = NULL; //Miguel: No position, list empty
p_clOList.RemoveAll(); //Miguel: Deleting all the contents of the Outputs' list
p_nRCount = 0; //Miguel: There are no Reglers
p_posR = NULL; //Miguel: No position, list empty
p_clRList.RemoveAll(); //Miguel: Deleting all the contents of the Reglers' list
CloseAllDocuments (false);
return TRUE;
}
Alguien me puede decir que estoy haciendo mal?
CDocTemplate::CloseAllDocuments
virtual void CloseAllDocuments( BOOL bEndSession );
Pero tengo un problema, cuando llamo a esta funcion recibo un fallo de compilacion que dice:
error C2352: 'CDocTemplate::CloseAllDocuments' : Llamada ilicita a una funcion miembro
Yo lo estoy usando de la siguiente manera:
BOOL CFPSDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
p_nICount = 0; //Miguel: There are no Inputs
p_posI = NULL; //Miguel: No position, list empty
p_clIList.RemoveAll(); //Miguel: Deleting all the contents of the Inputs' list
p_nOCount = 0; //Miguel: There are no Outputs
p_posO = NULL; //Miguel: No position, list empty
p_clOList.RemoveAll(); //Miguel: Deleting all the contents of the Outputs' list
p_nRCount = 0; //Miguel: There are no Reglers
p_posR = NULL; //Miguel: No position, list empty
p_clRList.RemoveAll(); //Miguel: Deleting all the contents of the Reglers' list
CloseAllDocuments (false);
return TRUE;
}
Alguien me puede decir que estoy haciendo mal?
Valora esta pregunta


0