FIX: CRecordView:OnMove May Incorrectly Return FALSE

Last reviewed: September 18, 1997
Article ID: Q124568
1.50 WINDOWS kbprg kbfixlist kbbuglist

The information in this article applies to:

  • The Microsoft Foundation Classes, included with

        - Microsoft Visual C++ for Windows, version 1.5
    

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 kbprg
Technology : kbMfc
Version : 1.50
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.