FIX: CRecordView:OnMove May Incorrectly Return FALSE

ID: Q124568

1.50 WINDOWS kbprg kbfixlist kbbuglist

The information in this article applies to:

SYMPTOMS

In some cases, CRecordView::OnMove may incorrectly return FALSE instead of TRUE. In some MDI applications, this can cause OnMove to be called twice.

RESOLUTION

Override OnMove in your class derived from CRecordView and return TRUE.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual C++ version 1.51 for Windows.

MORE INFORMATION

Because CRecordView::OnMove is mapped through ON_COMMAND_EX macro, it should always return TRUE as it does handle the message.

Sample Code

// CMyRecordView is derived from CRecordView

BOOL CMyRecordView::OnMove(UINT nIDMoveCommand) {
    CRecordView::OnMove(nIDMoveCommand);
    return(TRUE);
}

Additional reference words: 1.50 2.50 KBCategory: kbprg kbfixlist kbbuglist KBSubCategory: MfcDatabase

Keywords          : kb16bitonly kbbuglist kbfixlist
Version           : 1.50
Platform          : WINDOWS
Solution Type     : kbfix

Last Reviewed: September 20, 1997