HexEdit/Explorer.cpp
void CExplorerWnd::Update(LPCTSTR file_name /* = NULL */)
{
	if (update_required_)
		return;                 // Update already flagged

	if (file_name == NULL)
		update_required_ = true;
	else
	{
		// Get the name of the folder containing the file
		CString ss(file_name);
		::PathRemoveFileSpec(ss.GetBuffer(1));
		ss.ReleaseBuffer();

		// If the file's folder is the folder we are displaying then remember that we need to refresh it
		if (AfxComparePath(ss, list_.Folder()))
			update_required_ = true;
	}
}
// When something happens to change a file we call this function so that if the file is
// in the active folder we can update the folder.  We only keep track of the fact that an
// update is needed and do the update later in OnKickIdle - this means that lots of
// changes to the folder will not cause lots of calls to Refresh().

When something happens to change a file we call this function so that if the file is
in the active folder we can update the folder.  We only keep track of the fact that an
update is needed and do the update later in OnKickIdle - this means that lots of
changes to the folder will not cause lots of calls to Refresh().
When something happens to change a file we call this function so that if the file is in the active folder we can update the folder . We only keep track of the fact that an update is needed and do the update later in OnKickIdle - this means that lots of changes to the folder will not cause lots of calls to Refresh () .
void CExplorerWnd::Update(LPCTSTR file_name )
{
	if (update_required_)
		return;                 
	if (file_name == NULL)
		update_required_ = true;
	else
	{
		CString ss(file_name);
		::PathRemoveFileSpec(ss.GetBuffer(1));
		ss.ReleaseBuffer();
		if (AfxComparePath(ss, list_.Folder()))
			update_required_ = true;
	}
}
void CExplorerWnd :: Update ( LPCTSTR file_name ) { if ( update_required_ ) return ; if ( file_name == NULL ) update_required_ = true ; else { CString ss ( file_name ) ; :: PathRemoveFileSpec ( ss . GetBuffer ( 1 ) ) ; ss . ReleaseBuffer ( ) ; if ( AfxComparePath ( ss , list_ . Folder ( ) ) ) update_required_ = true ; } }
When something happens to change a file we call this function so that if the file is
in the active folder we can update the folder.
When something happens to change a file we call this function so that if the file is in the active folder we can update the folder .
/* = NULL */ // Update already flagged
 // Get the name of the folder containing the file
 // If the file's folder is the folder we are displaying then remember that we need to refresh it
