CRecordView::IsOnLastRecord

Call this member function to determine whether the current record is the last record in the recordset object associated with this record view.

BOOL IsOnLastRecord( );

Return Value

Nonzero if the current record is the last record in the recordset; otherwise 0.

Remarks

This function is useful for writing your own implementations of the default command update handlers that ClassWizard writes to support a user interface for moving from record to record.

警告

The result of this function is reliable except that the view cannot detect the end of the recordset until the user has moved past it. The user must move beyond the last record before the record view can tell that it must disable any user interface objects for moving to the next or last record. If the user moves past the last record and then moves back to the last record (or before it), the record view can track the user's position in the recordset and disable user interface objects correctly. IsOnLastRecord is also unreliable after a call to the implementation function OnRecordLast, which handles the ID_RECORD_LAST command, or CRecordset::MoveLast.

Requirements

Header: afxdb.h

See Also

Reference

CRecordView Class

Hierarchy Chart

CRecordView::OnMove

CRecordView::IsOnFirstRecord

CRecordset::IsEOF

CRecordset::GetRecordCount

Other Resources

CRecordView Members