maheshj
May 29th, 2001, 04:48 PM
Hi,
I am using VC++ ver 5.0 under 2000 environment for my application. The following code is not working correctly in 2000, but the same code is working under Windows-95. IsModified function is always returning S_FALSE, even though file has modified.
Actually, My application is launching word application with document. The user can edit the document. I am calling the following function after the word application closed. The following function should return S_OK if the word file has modified.
bool CWorkPaperDoc::IsModified()
{
POSITION pos = pDoc->GetStartPosition();
COleClientItem *pItem;
while ( ( pItem = pDoc->GetNextClientItem( pos ) ) != NULL )
{
if ( pItem->IsModified() )
return true;
}
return false;
}
I will appreciate your help.
Thanks,
J. Mahesh.
I am using VC++ ver 5.0 under 2000 environment for my application. The following code is not working correctly in 2000, but the same code is working under Windows-95. IsModified function is always returning S_FALSE, even though file has modified.
Actually, My application is launching word application with document. The user can edit the document. I am calling the following function after the word application closed. The following function should return S_OK if the word file has modified.
bool CWorkPaperDoc::IsModified()
{
POSITION pos = pDoc->GetStartPosition();
COleClientItem *pItem;
while ( ( pItem = pDoc->GetNextClientItem( pos ) ) != NULL )
{
if ( pItem->IsModified() )
return true;
}
return false;
}
I will appreciate your help.
Thanks,
J. Mahesh.